texts: Some users can not request the new password mail

texts:
I'm not able to figure out, why some users can not request the "Forgot Password E-Mails", so Magento can not send them to the users.
Magento shows message like "the mail isn't a correct one".
Tested in firefox, chrome but sometimes it works sometimes not.

have anyone idea about this problem?

  frontend/base/default/template/customer/form/forgotpassword.phtml


texts: Invalid Form Key. Please refresh the page in category page. Magento 2.3

texts:
I'm having a problem with the site when I change the language in both categories and products.

Opening the page of a category or product, it shows the writing "Invalid Form Key. Please refresh the page."

Changing language, the site opens the search results page and shows the error message again.

How can I solve it?

Thanks


texts: How do I organize products from newest to oldest?

texts: My products are showing in a random order. I would like to correct this to display products from the most recently added to oldest products.  Is this possible?


texts: Magento2 - External Image URL to product image

texts:
I'm using Magento2.3.4 and there is an API response that sends me JSON  to add a new product image:

{
  "base_image"  : [{"type":"url","value":"http://imgur.com/base_image.png"}],
  "small_image" : [{"type":"url","value":"http://imgur.com/small_image.png"}],
  "thumbnail"   : [{"type":"url","value":"http://imgur.com/thumbnail.png"}],
  "gallery"     : [
                   {"type":"url","value":"http://imgur.com/gallery_1.jpg"},
                   {"type":"url","value":"http://imgur.com/gallery_2.jpg"},
                  ]
}

as you can see from the json above , there is an external url that I need to save as product images, how can I do this?


texts: price filter in layered navigation to show only in-stock product count

texts:
My need is to show in-stock product count only in price filters on layered nav. Is there any possible solution for this?

Currently out of stock products are visible in frontend and price filter show total count of in stock and out of stock products.

I have tried editing catalog/product/model/layer/price.php file. But it doesn't provide me the proper solution. If any body met with this requirement before or anyone knows what to do, please help. Thanks.


texts: Magento2 validate billing & shipping address before place order

texts: How can I validate billing & shipping address form before place order. I have a payment method before place order I want to validate it. using js. Just like submit it form to display required validation


texts: How Does Magento 2 Generate the admin-icons Font Files?

texts:
In Magento 2, the icons for backend Menu Items are Private User Area code points added via a custom font file.

The _typography.less file appears to ship with the ability to conditionally include one of five font files (.eot, .svg, .ttf, .woff, .woff2).  The font file that defines these custom endpoint is named admin-icons.

What not clear is if Magento (via LESS CSS, or some other means) ships with the ability to generate these five font files, or if an extension developer is expected to create all five themselves?  i.e. it's easy enough to use an Icon Generation program like IcoMoon to create a svg version of the font, but does a Magento 2 module developer also need to create eot, ttf, woff, or woff2 files themselves?

If not -- how can you use Magento to generate these files from the svg.

If so -- what tools do people use to create the eot, ttf, woff, or woff2 versions of the font?


texts: Running Magento 2 on a subdomain of Magento 1.9

texts:
I did a fair amount of research before posting this question to ensure I am not asking a repeated question.
I am newbie to Magento, and I would like to get your advice on the below workflow:

I have a Magento 1.9 Installed on www.samplestore.com (it's a small store), and right now, I am thinking to open samplestore.com for another country market. (let's say France)

I understand Magento supports multiple stores, However, I want to use this as an opportunity to discover Magento 2.0, instead of sticking with 1.9.

Thus, we are thinking to install, Magento 2.0 on a subdomain. (Example: samplestore.com/FR/) and keep Magento 1.9 on the main store.

I know by doing this, all the customers and orders, and sales will be isolated from the main store, however, my questions are:

Does the above scenario makes any sense to implement?

How can I redirect all the terrific from France to /FR/ subdomain automatically? (Is it something that has to be handled at the server level and not Magento Level?)


texts: Magento 2.1.6 Unable to Set Transaction Email Logo

texts:
Logo was uploaded to Theme Settings -> Transactional Email. I've done the following:

Clear all cache.
Clear static content.
Test transactional email then
    repeat above process.

The default Magento logo persists. I'm running developer mode, is there something I missed?


texts:
Is it possible to add dynamic massactions to admin grids?

"Dynamic" in the way that the last dropdown options depend on previous selection?

For example I want to update some attribute values. Magentos "Update Attributes" massaction does not work, because it just replaces current values.

In may case (or maybe here: Magento Update Multiselect Attribute: add 1 option (dont overwrite curent0) via script or massupdate or extension) I want to append/remove values to/from current selected values.

So I need 4 dropdowns/input fields, that depend on previous selection:

1st dropdown to select action
2nd to select attribute
3rd to select "update type" (add/remove/replace value)
4th value to change

Example observer code ...

public function addMassactionToProductGrid($observer)
{
    $block = $observer->getBlock();
    if ($block instanceof Mage_Adminhtml_Block_Catalog_Product_Grid) {
        $attributes = ...

        $block->getMassactionBlock()->addItem(
            'my_massaction',
            array(
                'label'      => Mage::helper('catalog')->__('Update Attribute Values'),
                'url'        => $block->getUrl('*/*/mycontrolleraction', array('_current' => true)),
                'additional' => array(
                    'attribute' => array(
                        'name'   => 'attribute',
                        'type'   => 'select',
                        'class'  => 'required-entry',
                        'label'  => Mage::helper('catalog')->__('Attribute'),
                        'values' => $attributes,
                    ),
                    'update_type' => array(
                        'name'   => 'type',
                        'type'   => 'select',
                        'class'  => 'required-entry',
                        'label'  => Mage::helper('catalog')->__('Update type'), # e.g. add|delete|replace
                        'values' => #??? depends on `attribute` selection,
                    ),
                    'update_value' => array(
                        'name'   => 'value',
                        'type'   => 'select', # maybe also depending on previous selection
                        'class'  => 'required-entry',
                        'label'  => Mage::helper('catalog')->__('Update Value'),
                        'values' => #??? depends on `update_value` selection,
                    ),
                ),
            )
        );
    }

    return $this;
}

Any ideas to make update_type and update_value dynamic?


texts: How can I make a fresh install of 1.9 keeping my data?

texts:
I've been using Magento for a while, but somehow I screwed something. Some functions aren't working well (for example, the "Flush CSS/Javascript" buttons are gone, the shipping cost isn't shown on the Checkout Review, and some other weird issues.

I would like to make a fresh install, only keeping my template files, and everything else clean, but keeping my data. As far as I know, this is not possible only with Magento export options (only products and customers). I have some extensions with data I would like to keep and of course the categories and main configs.

Is there a way to do this without having to manually add the new data?


texts: category sub categories products count(is anchor)

texts:
Any one please help me.
I need parent category count of products(is_anchor), but I get category count. It is not equal to actual products count.

<?php $subcategory = $objectManager->create('Magento\Catalog\Model\Category')->load($catId);
        $subcats = $subcategory->getChildrenCategories();
foreach ($subcats as $subcat) {
                if ($subcat->getIsActive()) {
                $_category = $objectManager->create('Magento\Catalog\Model\Category')->load($subcat->getId());
                $_imgUrl = $_category->getImageUrl();
                    $subcat_url = $subcat->getUrl();
                   // echo $qty = $subcat->getQty(); exit;
                    $subcat_img = $store->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) . 'catalog/category/' . $subcat->getImage();
                    if($_imgUrl==''){
                    $_imgUrl = $store->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA)."catalog/category/notavailfull.gif";
            }
                    ?>

                        <a href="<?php echo $subcat_url; ?>">
                            <img class="img-responsive" src="<?php echo $_imgUrl; ?>"/>

<?php echo $subcat->getName(); ?>
                            <?php echo '('.$subcat->getProductCount().')' ;?>

                    <?php
                }
            }?>


texts: Run "bin/magento setup:upgrade" in custom.php

texts:
I tried to activate a module in my Magento2 system, which is on a Hosted environment without a CLI (command line /ssh shell) available.
Reading around, I've learned that this could be done by using a php file like this:

<?php
//system('php bin/magento deploy:mode:show');
//system('php bin/magento cache:flush');
//system('php bin/magento setup:static-content:deploy');
system('php -f bin/magento setup:upgrade');
//system('php  bin/magento cache:clean');
//system('php bin/magento module:enable Ubertheme_Ubdatamigration');
?>

But when I try to execute this file nothing happens. Why not? In a previous test-set-up I have been able to run this without any problems? What am I doing wrong here?
Also tried to use magento/bin instead but did not help either.


texts: magento with M2E Pro ReferenceError: ListingProductAddObj is not defined

texts:
I use M2E Pro with Magento 2.3.4 clear installation
When I'm trying set config in M2E Pro I got an error in console.
Have somebody the same error? is it a problem with extension or with Magento?


texts: How can i add "Cash on Delivery" Charges in PDF Invoice in Magento

texts:
In Magento PDF invoice the Payment Method is Showing as COD but the COD Charges is not appearing in PDF, how can i display COD Charges in PDF invoice.

in PDF invoice it will appear like this :

Subtotal: AED 672.00
Discount: -AED 20.00
Shipping & Handling: AED 20.00
Grand Total: AED 672.00

But in Actual Order

Subtotal: AED 672.00
Discount: -AED 20.00
COD Charges : AED 15.00
Shipping & Handling: AED 20.00
Grand Total: AED 687.00


texts: add to cart not working localhost Only in chrome (Magento 2 fresh install )

texts:
I've installed magento 2 fresh on localhost, and trying to add items to cart but didn't work..

when click on add to cart button, button will change into adding
and stays there, didn't add to cart item.

Any suggestion ?


texts: How to setup two PayPal Express Checkout in a store?

texts:
If the product is below a specific price, then use Paypal merchant account A, use PayPal merchant account B otherwise.

Is it possible to configure like these in Magento 2.x?

Or How could I achieve this use-case?

Thanks a lot !


texts: Magento 2.0 rawQuery, How to escape strings

texts:
I have this code, which was converted from a plugin created in Opencart.
Is there a function in Magento 2.0 to escape strings as the function mysql_escape_string can't be used in Magento 2.0?

$oc_item_synchro_tbl = $this->getRs()->getTableName('oc_item_synchro');
$oc_other_config = mysql_escape_string($serialized);
$id = 255;
$this->getConnection()->rawQuery("UPDATE $oc_item_synchro_tbl SET oc_other_config = '$oc_other_config' WHERE oc_product_id = '$id'");

UPDATED code:

public function addProduct($data)
{

    $oc_item_synchro = $this->getRs()->getTableName('oc_item_synchro');
    $id = (int)$data['oc_product_id'];
    $now = strtotime("Y-m-d h:ia");
    $conn = $this->getConnection('core_write');

    $sql = "INSERT INTO $oc_item_synchro SET ";
    $sql .= "oc_product_id = :OC_PRODUCT_ID, ";
    $sql .= "oc_item_category_id = :OC_ITEM_CATEGORY_ID, ";
    $sql .= "oc_item_duration = :OC_ITEM_DURATION, ";
    $sql .= "item_delivery_time = :ITEM_DELIVERY_TIME, ";
    $sql .= "is_posted = :IS_POSTED, ";
    $sql .= "oc_synchro_time = :NOW";
    $binds = array(
        'OC_PRODUCT_ID' => $id,
        'OC_ITEM_CATEGORY_ID' => (int)$data['oc_item_category_id'],
        'OC_ITEM_DURATION' => $data['oc_item_duration'],
        'ITEM_DELIVERY_TIME' => $data['item_delivery_time'],
        'IS_POSTED' => (!empty($data['is_posted']) ? 1 : 0),
        'NOW' => $now
    );
    $conn->query($sql, $binds);

    $sql2 = "UPDATE $oc_item_synchro SET ";
    $sql2 .= "oc_other_config = :OC_OTHER_CONFIG ";
    $sql2 .= "WHERE oc_product_id = :OC_PRODUCT_ID";
    $binds2 = array(
        'OC_OTHER_CONFIG' => serialize($data['oc_other_config']),
        'OC_PRODUCT_ID' => $id
    );
    $conn->query($sql2, $binds2);
}


texts: How does magento 2 control that the email have to be unique

texts: I want to know how does magento 2 control that email exist or not  when creating an account because i have added  a custom attribute so that the customer can log in with his custom attribute(login) or with email but i can't find a way to make the custom attribute unique  i tried in installData and added the unique true but no result please any advice


texts: How to include/use JQuery in Magento2 Blocks

texts:
I am trying to use JQuery in my block functions, but I get an error saying JQuery not found. I tried google and some suggested to add it to local.xml but I think Magento2 does not have local.xml.

Can anyone help me on how to enable JQuery in Magento2?

Thanks


texts: Remove width="" and height="" from product images

texts:
I would like to remove width="" and height="" from my product images in Magento 2. I found in list.phtml the php img tag:

<?php echo $productImage->toHtml(); ?>

I already know how to control the sizes of the images in view.xml. But I want to remove the width and height tags from the IMG.

How can I do this?


texts: i am getting error while adding coupon value in magento 2.3

texts: invalid form key while adding discount coupon value in shopping cart in magento 2.3 i have tried increasing max_input_vars to 30000 but no luck can anyone help us in fixing this issue


texts:
I'm trying to upgrade Magento 2.3.4 and Magento 2.3.5-p1 to the latest release of Magento 2.4,
Is that possible ?
And How can I do this with composer ?
Thanks in advance


texts: how to set price filter in magento custom grid

texts:
How to filter the price in custom grid with exact result. if I give 500 it displays the digit relevant to 500 like 5000,7500 like, how could i avoid this

$this->addColumn("price", array( "header" =>
Mage::helper("dashboarddlr")->__("Price"), "index" => "price",
'width' => '150px', 'type' => 'currency','currency'=>'order_currency_code',
//'filter_index'=>'main_table.price',
"renderer" => new Vignesh_DashboardDealer_Block_Adminhtml_Renderer_Price(), ));


texts: How to add persistence to a image field dynamically

texts:
I have created an image uploader using UI component form in Magento 2 but I also want to fill data from DB dynamically using JS to the image uploader when someone edits the form.

Please help.


texts: Magento 2.3.4 Full Breadcrumbs on Product Detail Page

texts:
I'm trying to achieve same as this article how can I show full breadcrumbs category path on product page in Magento 2.3?
unfortunately cant get the suggested module to work. I get an error when trying to access the stores>configuration screen on M2.3.4. All other solutions tend to refer to M2.2.x versions.. Is there a solution someone can recommend that is working for 2.3.4?  Thanks


texts: Coupon Code is not working when overwrite the discount calculation

texts:
There will be a one time charge for each product called as handling charges. So, I did below,

Reference Tutorial is: http://excellencemagentoblog.com/blog/2012/01/27/magento-add-fee-discount-order-total/

       <sales>
            <quote>
                <totals>
                    <discount>
                        <class>Namo_Packing_Model_Courier</class>
                        <after>subtotal</after>
                    </discount>
                </totals>
            </quote>
        </sales>

Inside local/Namo/Giftcarfs/Model/Courier.php

<?php

class Namo_Packing_Model_Courier extends Mage_Sales_Model_Quote_Address_Total_Abstract {

    public function collect(Mage_Sales_Model_Quote_Address $address) {
            if ($address->getData('address_type') == 'shipping')
                return $this;

                $cart = Mage::getModel('checkout/cart')->getQuote();
                $courier_fee = 0;

                    $helper = Mage::helper('catalog/product_configuration');

                    $totalCourierFee = 0;
                    foreach ($cart->getAllItems() as $item) {
                        $courierFee = $item->getCourierFee();
                        $totalCourierFee = $totalCourierFee+$courierFee;
                    }
                $address->setCourierFee($totalCourierFee);
                $address->setBaseCourierFee($totalCourierFee);

                $address->setGrandTotal($grandTotal + $address->getCourierFee());
                $address->setBaseGrandTotal($baseGrandTotal + $address->getBaseCourierFee());

            return $this;
    }

    public function fetch(Mage_Sales_Model_Quote_Address $address) {

            if ($address->getData('address_type') == 'shipping')
                return $this;

            $amt = $address->getCourierFee();

            if ($amt != 0) {

                $address->addTotal(array(
                    'code' => 'Discount',
                    'title' => 'Courier Fee',
                    'value' => $amt
                ));
            }

        return $address;
    }

}

After adding this if I apply coupon code, I am getting error message as

  Coupon code "3A46-ZF1G-WE0X" is not valid.

If I comment <sales>...</sales> coupon code working fine.

Can someone help me?


texts:
I'm getting the infamous login loop in a fresh 1.9 install

The install is on a vagrant machine and it is accessed via the url: http://magento9.local locally.

I have cleared /var and cookies numerous times, reset all my permissions numerous times, its a clean install, theres no modules, i even tried the core file hacks (basically everything in this thread Magento 1.9 Can’t login to admin panel!)

I destroyed the instance and started again, and still can't get past the log in,

Home page works fine. n98-magerun

Magento was intsalled via

I am completely at a loss


texts: Sending product to backend without cart for order quotation?

texts: I have created a product and i want to remove its price instead i want to label it as "Ask quotation" then i want to send this product to backend as order but without shopping cart, is there any way to do this?


texts: Cron tab and schedule: is it needed for layout compile/custom modules?

texts:
My current store's staging instance does not have crontab set up as far as I can tell. The cron_schedule table is empty. Is this needed for custom modules/themes/etc to work properly?

What is the most basic setup I can do in order to get the above to work if needed?

Thanks.


texts: Magento 2.3.1 - Some order e-mail's fail - 550 Messages should have one or no Content-Type headers, not 2

texts:
We are experiencing a problem with order emails. The order emails aren't send sometimes, we found no link between the failed emails so far.
The admin email of the shop receives the following email:
"This is the mail system at host production.server123.io.
I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can delete your own text from the attached returned message.
The mail system
info@email.nl: host srv2.flexfilter.nl [100.00.0.000] said: 550
    Messages should have one or no Content-Type headers, not 2. (in reply to
    end of DATA command)"
Has anyone seen this problem before? Thanks in advance!


texts: Magento - How to get current category name on product view Page?

texts:
I want current category name on product view Page.

How to get current category name on product view Page?


texts: Can i call getMediaUrl method in template file with a default block instance?

texts: In my custom phtml file (say foo/bar.phtml file), i need to call $this->getMediaUrl(some/imagefile), How do i use $this instance with a default block instance(say core/template).


texts: Launching magento 2 application(s) in chrome and firefox results in DNS_PROBE_FINISHED_NXDOMAIN

texts:
Steps taken:

Followed warden doc. howto initialize an environment for setup of
the Magento 2 application for local development. See
https://docs.warden.dev/environments/initializing.html

Launch a magento application in chrome/firefox:
https://app.exampleproject.test/
https://app.exampleproject.test/backend/
https://rabbitmq.exampleproject.test/
https://elasticsearch.exampleproject.test/

Result: Chrome/firefox

This site can’t be reached. Check if there is a typo in app.exampleprj.test.
DNS_PROBE_FINISHED_NXDOMAIN

I'm sure there is no typo!


texts:
I am testing my website on "https://developers.google.com/speed/pagespeed/insights/" and have only low ratings (9-12/100).

  My Setup:

  Virtual Server (CentOS) with 16 GB RAM, 6 cores (Intel Xeon), SSD
  Storage                      Magento 2.1.7           Apache 2.4.6
  MariaDB 10.1

I made sure to have 14GB RAM in my php.ini (memory_limit = 14000M).

Also edited .htaccess and .user.ini in magento root directory and pub directory (all have 14 GB RAM).

My configuration file for MariaDB (/etc/my.cnf) looks like this:

  [client]           port       = 3306                   socket     =
  /var/lib/mysql/mysql.sock

  [mysqld]                  port        = 3306 socket       =
  /var/lib/mysql/mysql.sock   skip-external-locking   key_buffer_size =
  384M    max_allowed_packet = 10M
  table_open_cache = 4096            sort_buffer_size = 16M
  read_buffer_size = 4M          read_rnd_buffer_size = 14M
  myisam_sort_buffer_size = 64M        thread_cache_size = 256

  query_cache_type = 1 query_cache_limit = 4M

  query_cache_size = 512M thread_concurrency = 8

  log-bin=mysql-bin server-id   = 1 innodb_buffer_pool_size = 3000M
  innodb_additional_mem_pool_size = 80M

  [mysqldump]           quick            max_allowed_packet = 512M

  [mysql]               no-auto-rehash

  [myisamchk]                key_buffer_size = 256M
  sort_buffer_size = 256M                        read_buffer = 4M
  write_buffer = 4M

  [mysqlhotcopy] interactive-timeout

I don't know why my website is still so slow (server response is always 1-2.5 seconds according to google pagespeed), even though my hardware is good enough (enough RAM).

PS: My magento mode is developer and all css js minify and merge options are off.


texts:
probably missing something simple here, but I can not get my css to load after adding it to new child theme

Here is my folder structure

I have added the following into my /layout/default_head_blocks.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
    <css src="css/styles-m.css" />
    <css src="css/custom.css" media="screen and (min-width: 768px)"/>
    <css src="css/print.css" media="print" />
</head>

And the header in my sit has changed and is referencing the files in the  tag as expected

<title>Home page</title>
<link  rel="stylesheet" type="text/css"  media="all" href="http://dev.modzinc.co.uk/pub/static/version1487891140/frontend/Modzinc/basic/en_GB/mage/calendar.css" />
<link  rel="stylesheet" type="text/css"  media="all" href="http://dev.modzinc.co.uk/pub/static/version1487891140/frontend/Modzinc/basic/en_GB/css/styles-m.css" />
<link  rel="stylesheet" type="text/css"  media="screen and (min-width: 768px)" href="http://dev.modzinc.co.uk/pub/static/version1487891140/frontend/Modzinc/basic/en_GB/css/styles-l.css" />
<link  rel="stylesheet" type="text/css"  media="screen and (min-width: 768px)" href="http://dev.modzinc.co.uk/pub/static/version1487891140/frontend/Modzinc/basic/en_GB/css/custom.css" />

put when I open the url : http://dev.modzinc.co.uk/pub/static/version1487891140/frontend/Modzinc/basic/en_GB/css/custom.css

I get this error

Unable to resolve the source file for 'frontend/Modzinc/basic/en_GB/css/custom.css'
#0    /home/ubodoco/public_html/dev/vendor/magento/framework/App/StaticResource.php(97): Magento\Framework\View\Asset\File->getSourceFile()
#1 /home/ubodoco/public_html/dev/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\StaticResource->launch()
#2 /home/ubodoco/public_html/dev/pub/static.php(13): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\StaticResource))
#3 {main}

Through the command line I have tried setup:upgrade    , Cache:clean  , cache:flush and nothing will make it work ??

Any ideas on what I am doing wrong

thanks


texts: $this->getChildHtml('custom_block') is not working

texts:
I used below code in base/default/layout/namespace_module.xml

<review_product_list>
        <block name="product.review.form" >
            <block type="core/template" name="custom_block" template="namespace/module/form.phtml"/>
        </block>
</review_product_list>

And on base/default/template/review/form.phtml

echo $this->getChildHtml('custom_block');

This code is also not working. Do you have idea what I am missing?


texts: Magento 2.3.0 Composer Fatal error when installing

texts:
Trying to install anything on Magento 2.3.0 using Composer I get the following error.
anyone know how to fix this?
> Fatal error: Uncaught TypeError: Return value of
> Magento\InventoryComposerInstaller\Plugin_composer_tmp1::initModuleDeployment()
> must be an instance of Magento\InventoryComposerInstaller\void, none
> returned in
> phar:///opt/cpanel/composer/bin/composer/src/Composer/Plugin/PluginManager.php(195)
> : eval()'d code:69 Stack trace:


texts: Can't re-upload packed to Magento Marketplace?

texts:
After i was fixed issues validate my module and re-upload packed to Magento Marketplace get

  The "100.1.2" archive version has to be equal or greater than the  "101.0.1" version.

File name modulename_patch_v100.1.2.zip.

Any help would be appreciated!


texts: How does a Magento 2 Grid Cell get it's value?

texts:
Looking at the customer grid in Magento 2's backend, it's not 100% clear to me how Magento's javascript code populates values in grid cells.

For example, it appears the view model constructor for the Name cell is

Magento_Ui/js/grid/columns/column

and this cell has a header and body KnockoutJS template of

Knockout.js headerTmpl: ui/grid/columns/text
Knockout.js bodyTmpl: ui/grid/cells/text

If I look at the source file for the text cell body template

#File: vendor/magento/module-ui/view/base/web/templates/grid/cells/text.html

It's not 100% clear how the value for the cell is rendered.  The div itself is empty, and even if we expand the text="" attribute into native KnockoutJS

It's still not clear what's going on.  There's a text binding that will set a value -- but it's not clear where the object in $col or $row come from.

Has anyone dug through this to figure out what's going on?


texts: How to add +30% to associated simple product price if an attribute = YES?

texts:
If configurable product attribute=yes add 30% to associated simple products prices.

Have an attribute afiliate in my configurable product.

Need to add 30% to the associated simple product price if afiliate is yes.

Is it possible?


texts: changed default attribute code to other and issues in shipping module

texts:
I have changed the default attribute code(assigned other attribute in place of original) like

Attribute | Original | Assigned New
----------x----------x------------------
Height => | height =>|  dimension_height
Width  => | width  =>|  dimension_width
Length => | length =>|  dimension_length
Width  => | width  =>|  dimension_width

Now obviously this will not calculate the shipping cost. I'm using fastway shipping module : in fastway shipping module : fastway.php (Model/carrier) i guess it's taking attributes values as

$packageWeight = $request->getPackageWeight();
$packageheight = $request->getPackageHeight();
$packagewidth = $request->getPackageWidth();
$packagedepth = $request->getPackageDepth();

But as i changed this to $request->getPackageDimension_weight() and others like so. It's not calculating shipping value while checking out.


texts: magento upgrade not listing latest available upgrade in connect manager

texts:
I want to upgrade my magento version.

I am using Magento Enterprise editon 1.12

When I goto connect manager and use "Check for upgrade". No upgrade is listed. But Magento 1.14 is latest version and it is not listed.

Any reason on why didn't the available is not listed?

For community edition we can upgrade manually by downloading the latest files and inserting  our custom modules in that.

But in Enterprise Edition is there any way to do like that? Because Enterprise Edition is not open source


texts: How to call custom javacript in ui_component form?

texts:
Below is my field in Ui_component.

<field name="received_amount" formElement="input">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">received_amount</item>
                    <item name="visible" xsi:type="boolean">true</item>
                </item>
            </argument>
            <settings>
                <validation>
                    <rule name="required-entry" xsi:type="boolean">true</rule>
                    <rule name="validate-digits" xsi:type="boolean">true</rule>
                </validation>
                <dataType>text</dataType>
                <label translate="true">Received Amount</label>
                <dataScope>received_amount</dataScope>
            </settings>
        </field>

So wanted to make calculation onBlur java script event and willing to set value to next field available in same form.

How can I achieve this ?


texts: Magento 2: Promotion percentage off, but only upto a fixed amount

texts:
I want to make a rule where I offer my customers a discount of:

  50% on their whole cart, but the max discount amount is
  fixed to 20$.

Can I make this in Magento 2, using one or a couple of rules?

Help!


texts:
I purchased a search module that displays a popup and would like to add the price of the product I searched for in it, I found the file that I should make the changes, but what should I add to display the product price

This is the responsible function for displaying the product characteristics

protected function _prepareProducts()
{
    $isEnabledImage = (bool) Mage::getStoreConfig(self::ENABLE_IMAGE_CONFIG);
    $imageHeight    = (int) Mage::getStoreConfig(self::IMAGE_HEIGHT_CONFIG);
    $imageWidth     = (int) Mage::getStoreConfig(self::IMAGE_WIDTH_CONFIG);

    $isEnabledDescription = (bool) Mage::getStoreConfig(self::ENABLE_DESCRIPTION_CONFIG);
    $lengthDescription    = (int) Mage::getStoreConfig(self::DESCRIPTION_LENGTH_CONFIG);

    $collection = $this->_getAlternativeProductCollection();

    // $this->_prepareQueryPopularity($collection->getSize());

    $toolbar = $this->getToolbarBlock();

    $toolbar->setCollection($collection);

    $size = (int) Mage::getStoreConfig(self::RESULT_SIZE_CONFIG);
    $collection->setPageSize($size);
    // $collection->getSelect()->limit($size);
    $sortOrder = Mage::getStoreConfig(self::SORT_ORDER_PRODUCT);

    if (0 < count($collection)) {
        $this->_suggestions[$sortOrder][] = array('html' =>
            '
' . $this->__("") . '
'
        );
    }
    if ($isEnabledImage) {
        $helper = Mage::helper('catalog/image');
    }

    foreach ($collection as $_row) {

        $_product = Mage::getModel('catalog/product')
            ->setStoreId($this->getStoreId())
            ->load($_row->getId());

        $_image = $_srcset = $_description = '';

        if ($isEnabledImage) {
            $_image  = (string) $helper->init($_product, 'thumbnail')->resize($imageWidth, $imageHeight);
            $_srcset = (string) $helper->init($_product, 'thumbnail')->resize($imageWidth * 2, $imageHeight * 2);
            $_srcset .= ' 2x';
        }
        if ($isEnabledDescription) {
            $_description = strip_tags($this->_trim(
                $_product->getShortDescription(),
                $lengthDescription
            ));
        }

        // $store = Mage::app()->getStore();
        // $path = Mage::getResourceModel('core/url_rewrite')
        //     ->getRequestPathByIdPath('product/' . $_product->getId(), $store);
        // // $url = $store->getBaseUrl($store::URL_TYPE_WEB) . $path;
        // $url = rtrim(Mage::getUrl($path, array('_store' => $store->getStoreId())), '/');
        $url = $_product->getProductUrl();
        $this->_suggestions[$sortOrder][] = array(
            'name'        => $_product->getName(),
            'url'         => $url,
            'image'       => $_image,
            'srcset'      => $_srcset,
            'description' => $_description,

        );
    }

}


texts: magento 1.9 dont want to change order state to complete automatically

texts:
I am using magento 1.9 . as we know magento mark order state to complete once payment is received and shipment is created. i want to make completed state independent.
like no matter payment is received and shipment is created i dont want magento to change the state to completed automatically. i just want the state to be as it was before creating shipment.


texts:
Although I have seen many examples of overriding a function in Magento2, I still cannot manage to make the following work:

Disabling the Welcome-Email for new customers.

The Welcome-Email is sent by the newAccount() function in $MAGENTO_HOME/vendor/magento/module-customer/Model/EmailNotification.php.
The goal is to override this function with a empty body such that no Email is sent.

For that purpose, a new module "MyCustomer" was created in $MAGENTO_HOME/app/code/MyModules/.

I also added the following files:

$MAGENTO_HOME/app/code/MyModules/MyCustomer/registration.php:

<?php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'MyModules_MyCustomer',
    __DIR__
);

$MAGENTO_HOME/app/code/MyModules/MyCustomer/etc/di.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Customer\Model\EmailNotification" type="MyModules\MyCustomer\Model\Rewrite\EmailNotification" />
</config>

$MAGENTO_HOME/app/code/MyModules/MyCustomer/etc/module.xml:

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="MyModules_MyCustomer" setup_version="1.1.0">
    </module>
</config>

The actual file is located at:

$MAGENTO_HOME/app/code/MyModules/MyCustomer/Model/Rewrite/EmailNotification.php:
<?php
/**
 * Copyright Â© 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace MyModules\MyCustomer\Model\Rewrite;

use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Framework\Mail\Template\TransportBuilder;
use Magento\Customer\Helper\View as CustomerViewHelper;
use Magento\Customer\Api\Data\CustomerInterface;
use Magento\Framework\Reflection\DataObjectProcessor;
use Magento\Framework\Exception\LocalizedException;

/**
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
 */
class EmailNotification extends \Magento\Customer\Model\EmailNotification
{
    /**
     * Send email with new account related information
     *
     * @param CustomerInterface $customer
     * @param string $type
     * @param string $backUrl
     * @param string $storeId
     * @param string $sendemailStoreId
     * @return void
     * @throws LocalizedException
     */
    public function newAccount(
        CustomerInterface $customer,
        $type = self::NEW_ACCOUNT_EMAIL_REGISTERED,
        $backUrl = '',
        $storeId = 0,
        $sendemailStoreId = null
    ) {

    }
}

The issue is, that still, the original function is executed and the welcome email is sent.
Log files seem to be clean.
After code changes were made, the following script was executed:

php bin/magento setup:upgrade
php bin/magento setup:di:compile

php bin/magento indexer:reindex

php bin/magento cache:flush
php bin/magento cache:clean

chown -R wwwrun:www $MAGENTO_HOME

The module seems to be successfully registered as it appears in $MAGENTO_HOME/app/etc/config.php


texts: Change Product Image Gallery On Options Select

texts: I have a configurable product with multiple colors/sizes, and each simple product has its own images. I have three images for the main configurable product. When I pick a color option for the product, the first of the three images changes to the right color, but the other two don't. How can I get the other two to change images?


texts:
When I click on the product in the store, it will return a 404 error page.
I check with adding new products but the result is same. How can I resolve this?


texts: Magento 2: Sql query is automatically printing on frontend while getting collection in phtml file

texts:
I am trying to get data by a specific id in phtml file in Magento 2.
Here is the code:

 $chartid = $this->getData('widgetlist');
 $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
 $chart = $objectManager->create('Nfusionsolutions\NfusionWidgets\Model\ResourceModel\Nfusionwidgets\Collection');
 $chart->load($chartid);
 $chart_detail = $chart->getData();

I am getting result from this code but it also prints sql query in frontend like this:

 SELECT `main_table`.* FROM `nfusionwidgets_nfusionwidgets` AS `main_table`

I found that if I comment 4th line, sql query does not print but I have to load this by id anyhow.

Is there any solution to remove sql query from frontend.


texts: How to include CMS block in template file(.phtml)?


texts: which table save Downloadable-Product link and sample-title

texts:
When i add/Edit downloadable Product, I Can't get Link and Sample-Title and Links can be purchased separately checkbox value.

I need details in which table it get saved/stored ? And how it is store ?


texts: How to return value from knouckout js Ajax call

texts:
I have a knouckout js to return data to html template. But I can't able to return values from ajax call done function.

My knouckout js like below,

define(
    [
        'jquery',
        'mage/url',
        'mage/storage'
    ],
    function ($, urlBuilder, storage) {
        'use strict';
        var url = null;
        return Component.extend({
            defaults: {
                template: 'Vendor_Module/test'
            },
            getUrl: function () {
                var serviceUrl = urlBuilder.build('module/index/index');
                var res = storage.post(
                    serviceUrl,
                    ''
                ).done(
                    function (response) {
                        /* here get results bot logs prinited in console */
                        console.log(response);
                        console.log(response.url);
                        url = response.url;
                    }
                ).fail(
                    function (response) {
                        alert(response);
                    }
                );
                /* But here url is null */
                console.log(url);
                return url;
            }
        });
    }
);

And my template is,

Click

From ajax call response I get the result, but that value not binds to my html template. Please help me someone to done this.


texts: Change type columns on Adminhtml Magento 2

texts:
I've got a table for my own module, and i want to change the type of the column that i added.

My render looks like:

protected function _prepareToRender()
    {
        $this->addColumn('code', ['label' => __('Code'), 'style' => 'width:120px']);

        $this->addColumn('cost', ['label' => __('Extra Cost'), 'style' => 'width:120px']);

        $this->addColumn('shopavailable', ['label' => __('Delivery'), 'type' => 'checkbox' , 'style' => 'width:320px']);

        $this->addColumn('none', ['label' => __('None'), 'style' => 'width:320px']);

        $this->_addButtonLabel = __('Add Attribute');
    }

I was trying to set it by using 'type' but i couldnt.

Any idea of how could set to this column a type checkbox or boolean?


texts: What param is expected in getBaseUrl() function in Magento 2

texts:
I want to return the image URL using getBaseUrl() function but I can't understand what value to set to the $value variable.

$url = $this->_storeManager->getStore()->getBaseUrl(
    \Magento\Framework\UrlInterface::URL_TYPE_MEDIA) . 'catalog/category/' . $value;


texts: How do I exclude a PHTML file within a CMS page from Magento's Full Page Cache?

texts:
Running Magento Enterprise v1.14.2.

I have a standard CMS page which contains a PHTML file (needed for a dynamic section of the page).

The PHTML is included in the CMS page like this:

{{block type="core/template" template="catalog/product/form-top.phtml"}}

Because the page is dynamic, I want to completely exclude it from Magento's Full Page Cache.

How do I do this?

P.S. I've already tried using <action method="setCacheLifetime"></action> in the CMS Page -> Custom Layout XML section


texts: Magento 2: How to Check if a Module's Installed

texts:
In Magento 2, is it possible to check if a module's installed at runtime?

In Magento 1 I'd either use the isModuleEnabled helper method, or manually fetch the global configuration tree and check the nodes under <modules/>.

Is there an isModuleEnabled equivalent in Magento 2?  If not how can I grab the global configuration and check for the module nodes I want?


texts:
I buy extension from marketplace.magento and try to install via component manager in backend magento v.2.1.11

Unfortunately, when I choose this,the page non-stop loading "Please wait".

I tried to change the browser and clean cache browser but nothing helps.


texts: Thumbnail images not changing with main image in magento 1.9

texts:
I am having issues with configurable swatch.

When click on color at product detail page main image changes but thumbnail isn't changing.

No custom extension used, Using default color swatch of magento.

Any help would be appreciate.


texts: How to edit a success notification message in Magento 1.9

texts:
How to edit checkout/cart/configure/id/397514/ page success notification message in Magento 1.9 and project file location?
How to custom [object object] message?


texts: Is the "Multi store" the right strategy?

texts:
I've a Magento CE 1.7 install with 1 website, 1 store and 2 storeviews (fr/en).

In a closed futur, I'll have to deal with a partner who sells our products on his website (part of our catalog).
I need to find the correct organization strategy for working with him.
The products information exchange is already organized (through product export). We have also plane to retrieve the partner orders into our Magento with an "order creation process" using REST Api.

Now, the point is: we want to separate the order from our Partner. I think the best way is to associate the partner's orders with a specific store (and storeviews).
Thus, we can deal with order starting with specific number (related to each storeview of the "Partner store").

BUT, there is one problem. I'll create a new store, then 2 storeviews for it (partner_fr, partner_de). For the order created on the Partner store > Partner_de view, the products catalog data will stay the default ones (french in my case). It is a problem because the transactionnal emails will includes the product name and product description that are reliables to the storeview! I don't want to define a 2nd time the product name/description for the partner_de view because it has been already done for the default_de view.

My 2 questions:
1) Is it the correct strategy?
2) If yes, it mean i'll have to modify all my product import/update process to make product translation available for the partner_de view.
2.1) Is there a possibility to "duplicate" a storeview?


texts: How to access REST APIs as guest in Magento 2.1.x

texts: I am building a mobile application for a Magento instance. I can use Token Based Authentication to make the API calls. However I want to enable guest access in my app. The users should be able to browse the categories and products and add to card without signing in, and only need to sign in when they are checking out. Is this possible?


texts:
I'm in the middle of setting up some new servers (2 webservers behind a load balancer) and have decided to use apc as my main backend cache and the file system as the slow backend.

When I try to run the site I get the following errors:

Notice: Undefined index: data  in /var/www/html/site/releases/20130726082711/lib/Zend/Cache/Backend/TwoLevels.php on line 250

#0 /var/www/html/site/releases/20130726082711/lib/Zend/Cache/Backend/TwoLevels.php(250): mageCoreErrorHandler(8, 'Undefined index...', '/var/www/html/h...', 250, Array)
#1 /var/www/html/site/releases/20130726082711/lib/Zend/Cache/Core.php(303): Zend_Cache_Backend_TwoLevels->load('HP_CORE_CACHE_O...', false)
#2 /var/www/html/site/releases/20130726082711/app/code/core/Mage/Core/Model/Cache.php(339): Zend_Cache_Core->load('CORE_CACHE_OPTI...')
#3 /var/www/html/site/releases/20130726082711/app/code/core/Mage/Core/Model/Cache.php(432): Mage_Core_Model_Cache->load('core_cache_opti...')
#4 /var/www/html/site/releases/20130726082711/app/code/core/Mage/Core/Model/Cache.php(469): Mage_Core_Model_Cache->_initOptions()
#5 /var/www/html/site/releases/20130726082711/app/code/core/Mage/Core/Model/App.php(1137): Mage_Core_Model_Cache->canUse('config')
#6 /var/www/html/site/releases/20130726082711/app/code/core/Mage/Core/Model/Config.php(412): Mage_Core_Model_App->useCache('config')
#7 /var/www/html/site/releases/20130726082711/app/code/core/Mage/Core/Model/Config.php(294): Mage_Core_Model_Config->_canUseCacheForInit()
#8 /var/www/html/site/releases/20130726082711/app/code/core/Mage/Core/Model/App.php(395): Mage_Core_Model_Config->loadModulesCache()
#9 /var/www/html/site/releases/20130726082711/app/code/core/Mage/Core/Model/App.php(329): Mage_Core_Model_App->_initModules()
#10 /var/www/html/site/releases/20130726082711/app/Mage.php(637): Mage_Core_Model_App->run(Array)
#11 /var/www/html/site/releases/20130726082711/index.php(88): Mage::run('', 'store')
#12 {main}

I'm using Capistrano to deploy which means the cache folder for the filesystem is held on a symlinked directory but this obviously works as it does write into the folder.  Anyone else come across this and know what I need to do to sort it?


texts: How to get events/observers in magento 2

texts:
In Magento 1 I can get list of events/observers by debugging dispatchEvent() method from Mage.php like below.

/**
     * Dispatch event
     *
     * Calls all observer callbacks registered for this event
     * and multiple observers matching event name pattern
     *
     * @param string $name
     * @param array $data
     * @return Mage_Core_Model_App
     */
    public static function dispatchEvent($name, array $data = array())
    {
        Mage::log($name,null,'Events');
        Varien_Profiler::start('DISPATCH EVENT:'.$name);
        $result = self::app()->dispatchEvent($name, $data);
        Varien_Profiler::stop('DISPATCH EVENT:'.$name);
        return $result;
    }

In magento 2 where I can get list of events/observers?


texts: Magento Cart empty after login @ checkout /w Safari browser and Magento 1.9.0.1

texts:
We have this problem. Customers have 3 products in cart. Then go to checkout & log-in: after login their cart is empty! Not good for conversion.

I see some questions actually requesting this functionality- but none that address our issue. Persistent shopping cart is set to NO

Question: Is there a setting to prevent the cart from being emptied after login?

Basically what we want is that no-matter-what the situation: the cart a user is "actively" populating (read: now) is always the cart. No merging, no resetting. Just use the cart as-is


texts:
Difference between

->addColumn('created_at', Table::TYPE_TIMESTAMP, null, ['nullable' => false, **'default' => Table::TIMESTAMP_INIT]**,'Created At')

VS

 ->addColumn('created_at', Table::TYPE_TIMESTAMP, null, [], 'Created At')

If anyone knows please explain me....


texts: Group product price is featuring as $0.00 in the wishlist section in the Customer Account Magento2

texts:
If I add any group product to the wishlist, then the product price display $0.00 In the customer account the Wishlist section.
How to add the minimal-price in the wishlsit in the customer account.


texts: Magento 2 with sample data not showing stock quantity on the frontend

texts:
I've installed an fresh installation of Magento 2 with the sample data. I configured the products to show the stock quantity on the frontend. Followed this instructions to be sure.

After that flushed and cleared the cache and reindex. The stock quantity does not show on the frontend. Another installation has the same issue. Both using 2.1.2


texts: magento 2 enterprice client side less compilation

texts: When i change server side less compilation on client side, i have 404 with all my less files.


texts: Automatic order e-mails not send, manual sending work

texts:
I am currently using Magento 1.9.x and ran into a problem. It is not sending automated new order e-mails out. But the weird (in my opinion is), is it sending e-mails when I click the  'send mail'-button at the order screen.

When I browse to an order, it actually says 'confirmation e-mail not send'. When I send it manually, it changes into 'confirmatin e-mail send'. So the sytem knows it's not sending out the e-mails.

What can I do? The .cron seems to be working fine, as it actually tells me that the last heartbeat is x minutes ago and I can see the cron-timeline. It's not giving me any red messages either.


texts: add external .csv files to magento to update product details

texts:
I want to add an extra attribute value to all products.

so we are planning to update through import products using .csv

please give me the procedure to add only one attribute values.

thanks in advance


texts: firstname attribute not showing on checkout page magento 2

texts:
I have migrated my magento 1 website to magento 2 and the website seems to be working fine. But the firstname attribute is not showing on checkout page for shipping address.

I tried solving it using the solutions given in the below link:
Magento 2 Checkout not showing first name
The above link has 2 different solutions but none worked for me. Now I am trying to debug it using phtml files. I found a file that I feel is responsible for rendering the shipping section HTML.
The file is located at:
/public_html/vendor/magento/module-checkout/view/frontend/web/template/shipping-address/form.html

This is the code rendering HTML on frontend

Now I feel Magento is using this section to load HTML
<!-- ko foreach: getRegion('additional-fieldsets') -->

I also found a piece of code in checkout_index_index.xml file that I feel is related to the above line
<item name="displayArea" xsi:type="string">additional-fieldsets</item>

But still I am not able to find where magento has defined that shipping address block should show first name, last name, etc fields. If the method I am using is wrong then plz let me know how magento is showing different fields in shipping address and where is this code defined.
For example say I want to remove a field middle name from shipping address section and I want to remove it using code and not from admin panel and also I want to use magento's default way to achieve this.


texts: How can I combine a new email-template with second contact form for revocation?

texts:
I have some problems with a second contact form for revocation. The normal contact forms works fine, but I need a second form with special fields like OrderID, OrderDate, Address, ....

I made a new form-template near the form.phtml called revocation.phtml. Works fine

I made an url rewrite from contact/index to revocation. Works fine

Put a second declaration for revocation in the contacts.xml Works fine. Is that maybe wrong?

I made an email template for the special values of the revocation. Here is the problem.

When I send the revocation form magento use the normal contact mail template and the values for OrderId, OrderDate ... are lost. The shop owner only gets the normal contact email with name, text...

How can I use the revocation email template instead of the contact email template?

In the admin configuration I can choose the standard template for the contact form, but i can´t find a solution for the revocation email.

Here the contacts.xml

<layout version="0.1.0">

    <contacts_index_index translate="label">
        Contact Us Form
        <reference name="head">
            <action method="setTitle" translate="title" module="contacts"><title>Contact Us</title></action>
        </reference>
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
            <action method="setHeaderTitle" translate="title" module="contacts"><title>Contact Us</title></action>
        </reference>
        <reference name="content">
            <block type="core/template" name="contactForm" template="contacts/form.phtml"/>
        </reference>
        <remove name="topslider"/>
        <remove name="topseller"/>
    </contacts_index_index>

    <contacts_index_index translate="label">
        Revocation
        <reference name="head">
            <action method="setTitle" translate="title" module="contacts"><title>Revocation</title></action>
        </reference>
        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
            <action method="setHeaderTitle" translate="title" module="contacts"><title>Revocation</title></action>
        </reference>
        <reference name="content">
            <block type="core/template" name="contactForm" template="contacts/revocation.phtml"/>
        </reference>
        <remove name="topslider"/>
        <remove name="topseller"/>
    </contacts_index_index>
</layout>

I use magento 1.8.1


texts:
I have installed the theme manually and performed all the changes according to the documentation guide but still my homepage doesn't respond to the changes. It keeps showing like the screenshot.

I have looked for many solution and applied it but none of them worked, its still showing my homepage broken like this.

please help me to solve this issue
Thank you in advance


texts: Use USPS Shipping Method for APO Address Only

texts:
How can I enabled USPS Shipping method for APO Addresses Only? I have USPS working fine, however we only want to use it for US military addresses (APO, FPO or DPO) only. Our primary shipping method is UPS which is working fine, however our customers are now selecting USPS address and we are loosing money on those shipping methods.

How can I lock down USPS shipping method to only be an option for APO addresses? Currently in Magento backend there is only options to select Applicable Countries.

Thanks


texts: "Gang of Four" Design Patterns in Magento Core

texts:
There are a few very obvious patterns in use in Magento's core, such as:

Singleton
Registry
Event/Observer
Factory
Model/View/Controller

But there are others that may be in use in Magento that I'm not aware of such as Actor, Decorator, Strategy patterns.

Is there a reference list of the usage of all pattern types in Magento or how to implement in third party modules that don't unnecessarily replicate built-in functionality of Magento?


texts: Magento2.3.2 During data migration I got Only enties mismatch error . Only orders data in not migrated

texts:
My migration is from Magento 1.9.1.0 to Magento 2.3.2.
 I ran the below command :

php -dmemory_limit=-1 bin/magento migrate:data vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.1.0/config.xml
-r -vvv -a

It completed the migration but showing no result in the order grid only. Rest all Products and customer are shown in my M2.

  [2019-09-12 07:45:14][WARNING]: Mismatch of entities in the document:
  sales_order_grid Source: 37050 Destination: 0 [2019-09-12
  07:45:14][WARNING]: Mismatch of entities in the document:
  sales_shipment_grid Source: 33540 Destination: 0 [2019-09-12
  07:45:14][WARNING]: Volume Check failed

Please help me out from this issue and if possible then let me know how only migrate only orders SQL way, programmatically and any other way.

Thanks!


texts: Magento 2.2.1 Unable to save shipping information. Please check input data

texts:
Using PHP 7.x
Ubuntu 16.04
NGinx 1.10.2

After adding the product in the cart and filling out all the necessary information and clicking Next to checkout is giving me this error

Unable to save shipping information. Please check input data.

I am not able to find any solution wondering if there's some one who can assist.

Thanks


texts: Magento 2: Configure just only for one country

texts: We have a magento 2 store, with more than 20 stores location and they are being separately maintained in the same web site, we do sell only in the country. is there anyway that I could completely get rid of those events where they pop up at certain occasions asking to select country, since we operate only in the country I want to get omitted(hide would be better) each and every event where a customer is being questioned asking for the country.


texts: Magento: Discount each items differently inside cart

texts: The requirements are to have a discount code that if the items are already on discount, then discount extra x%, if the items are not on discount, then discount y%. I need to handle the case that both type of these above items appear in the same cart? Is there a existing solutions, or if I need to implement myself, where would I start. Thank you


texts:
My magento community version is Magento ver. 1.7.0.2.

I need product detail page for http://www.indiaflowerplaza.com/eggless-cakes/eggless-lemon-cake.html

I have to enable Use Categories Path for Product URLs.

But product detail page also open in http://www.indiaflowerplaza.com/eggless-lemon-cake.html
url.

so, How to fix this issue


texts:
I have use Enterprice edition
I want to set the session for magento site like Gmail.

The user login, the session will set.
Once user click logout button the session will destory.
Other wise the the session is active.
If browser is closed, then again Open the browser the session should be active.
if i restart the system, then again Open the magento site the session should be active.

FYI: Also i have tried to set cookie session time out in admin panel. But its not working when the system is restart.
Thanks for help


texts: Multi-Store issues with loading some template files/skins

texts:
We're having an issue here, where some stores load the store view with Magento defaults (only one of them does this out of 7 of them).

SetEnvIf for MAGE_RUN_CODE is set in .htaccess based on request domain, then index.php launches the store view.
base_url and secure_base_url configured in the System settings

All of them are set correctly like the others, but when it comes to loading the template files for one of them, it just reverts to default Magento theme. I cannot understand why it is doing this. Is there something in xml that has been overlooked? We changed all the store codes, and directed domain names to the index.php, and changed all the settings to match in htaccess and Manage Stores, all of the other domains we set up are working fine except one. Where can I check for breakpoints? There are no exceptions being thrown it seems when Magento falls back on the default.

Adding the new store views to the cms home page doesn't work, we either get a 404 (no-route) or an error that there is no cms page set.


texts: font awesome icon without cdn - magento 2.0.8

texts:
I am looking to integrate font awesome icon into magento2. I have downloaded font-awesome version 4.6.3. The tree structure of the font-awesome folder is shown below.

I referred this link and got some idea about where to place fonts and css but I don't know where to place the remaining folder less and scss.

can anyone explain the step by step process of integrate font-awesome icon into magento2.


texts: Turpentine Varnish - Cart ist cached in one theme

texts:
I've configured Turpentine Varnish Cache and on our store we run 2 themes, one with an ajax cart, which works fine, the other with a non-ajax cart which seems to be cached.

In our page.xml file for this theme, the cart is defined as:

<block type="checkout/cart_sidebar" name="cart_sidebar" as="topcart" template="checkout/cart/topbar.phtml" />

in our header block

            <block type="page/html_header" name="header" as="header">
            <block type="page/template_links" name="top.links" as="topLinks"/>
            <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
            <block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"/>
            <block type="directory/currency" name="store_currency_selector" as="store_currency_selector" template="directory/currency_top.phtml"/>
            <block type="core/text_list" name="top.menu" as="topMenu" translate="label">
                Navigation Bar
            </block>
            <block type="page/html_wrapper" name="top.container" as="topContainer" translate="label">
                Page Header
                <action method="setElementClass"><value>top-container</value></action>
            </block>
            <block type="checkout/cart_sidebar" name="cart_sidebar" as="topcart" template="checkout/cart/topbar.phtml" />
        </block>

According to the Turpentine FAQ I should define it as follows to disable the block from being cached:

                <block type="checkout/cart_sidebar" name="cart_sidebar" as="topcart" template="checkout/cart/topbar.phtml">
                <action method="setEsiOptions">
                    <params>
                        <access>private</access>
                    </params>
                </action>
            </block>

But this has no effect at all.

In the turpentine_esi.xml it is defined as:

<reference name="cart_sidebar">
    <action method="setEsiOptions">
        <params>
            <access>private</access>
        </params>
    </action>
</reference>

How can I get this to work? Does anyone have any idea?

Thanks.


texts: Shipping address edit content not loading in fields Magento 2

texts: While clicking the edit button in shipping address on the one-page checkout Magento 2, field values are not loading in the popup. Please help me.


texts: Display 50 if attribute value is blank in backend

texts:
please visit this : link

search for Rs 10 using ctrl + F

here i am  displaying attribute value [i.e 10 ] ,

1) If we entered value as "0" in textfield than we displaying "free delivery" as here

If there is no value entered in textfield [attribute value], than i want to display "50" = > Selling price + Rs 50 Delivery. but now its displaying like this : link

attribute code : "mp_local_shipping_charge"

Price.phtml

<?php echo $_specialPriceStoreLabel ?>
<span class="price" id="product-price-<?php echo $_id ?>
<?php echo $this->getIdSuffix() ?>"
<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>
<?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>
<?php $deliveryPrice = $_product->getData("mp_local_shipping_charge");
if($deliveryPrice == 0){ ?>

<?php echo "Selling Price (Free Delivery )"; ?>

<?php }elseif(empty($deliveryPrice)) { ?>

<?php echo "Selling Price + Rs 50 Delivery "; ?>

<?php }else { ?>

<?php echo "Selling Price"; ?>
<?php echo "+ Rs " . $_product->getData("mp_local_shipping_charge") . " Delivery "; ?>
<?php } ?>


texts:
Static contents are not able to deploy in MAGENTO 2.2.0
I have downloaded default setup of magento 2.2.0 and configured using NGINX.
After deployment static content are not loaded.


texts: Migration from M 1.9.2.4 to M 2.4.1 XML file is invalid

texts:
I have created a custom module then override the config.xml & map.xml for 1.9.2.4 folder as instructed by magento.
I have added the source and destination db info. and M1's key as requested there.

Also I rename .dist file in vendor folder's migarion tool dir as mentioned in magento's dev doc and rename them in option tag as required in config.xml file.

All these steps I have followed in M 1.9.2.4 to M 2.3.3 and migration was successful but in M 2.4.1 I have got below error message when run the command:
php bin/magento migrate:settings "/home/public_html/app/code/Project/Migration/etc/opensource-to-opensource/1.9.2.4/config.xml" --reset

[2021-03-16 09:32:53] main.ERROR: XML file is invalid.
#0 /home/public_html/vendor/magento/data-migration-tool/src/Migration/Console/AbstractMigrateCommand.php(117): Migration\Config->init('/home/public_html...')
#1 /home/public_html/vendor/symfony/console/Command/Command.php(221): Migration\Console\AbstractMigrateCommand->initialize(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /home/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /home/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Migration\Console\MigrateSettingsCommand\Interceptor->___callParent('run', Array)
#4 /home/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Migration\Console\MigrateSettingsCommand\Interceptor->Magento\Framework\Interception\{closure}(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /home/public_html/generated/code/Migration/Console/MigrateSettingsCommand/Interceptor.php(23): Migration\Console\MigrateSettingsCommand\Interceptor->___callPlugins('run', Array, Array)
#6 /home/public_html/vendor/symfony/console/Application.php(1009): Migration\Console\MigrateSettingsCommand\Interceptor->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /home/public_html/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Migration\Console\MigrateSettingsCommand\Interceptor), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /home/public_html/vendor/magento/framework/Console/Cli.php(115): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /home/public_html/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /home/public_html/bin/magento(23): Symfony\Component\Console\Application->run()
#11 {main} [] []


texts:
Magento Collection: can we set a query /w joins and all as collection/resource?

We are creating a custom grid. And accessing a data collection query from different angles. In Model/Resource we normally can set something like

class Class_Module_Model_Preorders extends Mage_Core_Model_Abstract
{
    protected function _construct()
    {
        $this->_init('module/table');
    }
}

In our grid.php we access and join several tables to a collection. The problem is that we cannot access it from everywhere. So my question would be

Question: How can make the query below a resource collection that we can access from anywhere?

protected function _prepareCollection()
{

    // Base collection is preorder
    $collection = Mage::getModel('somemodule/table')->getCollection();
    // Pre orders only
    $collection->getSelect()->where("main_table.is_preorder = 1");
    // Add Order item table to get orderitem data + order id
    // Filter by parent_item_id IS NOT NULL to get child only (parent link is then missing: have to join again to get the data)
    $collection->join(array('soi' =>'sales/order_item'), 'main_table.order_item_id = soi.item_id AND soi.parent_item_id IS NOT NULL', array('item_id', 'order_id', 'parent_item_id','sku' , 'name', 'qty_ordered'));


texts: Magento2 : How to update attribute option programmatically?

texts: How to update attribute option (update label for a store) programmatically?


texts: Magento 2 Cannot save product (Invalid option value)

texts:
On a specific product I cannot save any changes at all, I always get the error:

  Invalid option value

I believe this is down to the custom options and probably this issue:
https://github.com/magento/magento2/issues/4085

I was on 2.1.0rc3 when the error occurred and have since upgraded to 2.1.1

It's not just that I can't save custom options, I can't save any changes at all even to basic fields such as product name.

Maybe the issue is something else, but I can't find any clues in the logs and the error message is not very helpful.


texts: Magento mobile navigation menu to right side of screen

texts:
I've setup a single line custom header in desktop view. With a sticker header, everything works but I can't seem to find much information on mobile site.

I want to change the navigation menu in mobile mode (view) from Magento 2 left side to the right side of the screen. I've tried playing around with CSS settings, but no success.

Any help, thanks in advance.


texts: How can I choose specific products by id on owl-carousel?

texts:
I'm trying to add some specific products (choose by product_id, for example) on my homepage using the owl-carousel and a cms block. I did it for categories using the category_id filter, but it doesn't work for product_id.

How can I make this carousel for a list of chosen product_ids (some filter like: products with id 1234, 2142 and 1235) ?

The default version for the owl-carousel and the block:

    {{block type="filterproducts/latest_home_list" category_id="5" template="filterproducts/list.phtml"}}

Thanks :)


texts: Getting at custom attributes in Magento2 - Does it really require a new module?

texts:
I have created a custom attribute so we can mark products as either "Best Seller", "Customer Favourite" or "Express Service".

I want to pull this information through to the category pages, so I can show a small icon in the top right of each product that has this customer attribute set.

In Magento 1 this was as simple as using the addAttributeToSelect method.

However, everything I can see for Magento 2 tells me I need to create a new module and extend existing core code just to achieve the same thing.

Is this correct? Is there no easier way of getting at custom attributes?

If it is correct can somebody explain the logic to me behind this decision making process. Why make a common customizable feature so complex to get at in comparason in the new version of Magento?


texts:
My Magento 2 site can't be indexed anymore.

not sure what created the problem, when I run php bin/magento indexer:reindex, It shows following error

  userxx@host [~/public_html/magento2]# php bin/magento indexer:reindex
  Design Config Grid index has been rebuilt successfully in 00:00:00
  Customer Grid index has been rebuilt successfully in 00:00:00 Category
  Products indexer process unknown error: SQLSTATE[HY000]: General
  error: 4047 CREATE TEMPORARY TABLE is not allowed with
  ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE., query was: CREATE TEMPORARY
  TABLE IF NOT EXISTS shrp_catalog_category_product_index_store1_tmp
  LIKE shrp_catalog_category_product_index_store1 Product Categories
  indexer process unknown error: SQLSTATE[HY000]: General error: 4047
  CREATE TEMPORARY TABLE is not allowed with ROW_FORMAT=COMPRESSED or
  KEY_BLOCK_SIZE., query was: CREATE TEMPORARY TABLE IF NOT EXISTS
  shrp_catalog_category_product_index_store1_tmp LIKE
  shrp_catalog_category_product_index_store1 Catalog Rule Product
  index has been rebuilt successfully in 00:00:00 Product EAV index has
  been rebuilt successfully in 00:00:00 Stock index has been rebuilt
  successfully in 00:00:00 Inventory index has been rebuilt successfully
  in 00:00:00 Catalog Product Rule index has been rebuilt successfully
  in 00:00:00 Product Price index has been rebuilt successfully in
  00:00:00 Catalog Search index has been rebuilt successfully in
  00:00:00 userxx@host [~/public_html/magento2]#

I'm using Magento ver 2.3.2

I googled it but couldn't find any useful info on this error


texts: customer_save_after and customer_register_success event in custom observer customer session is blank in mycustom fuction?

texts:
This is my observer function for customer_register_success and customer_save_after  event it execute my custom url but i m getting blank session

$customerData = Mage::getSingleton('customer/session')->getCustomer();

public function doSomething($observer)
{
 $AccountController = $observer->getEvent()->getAccountController();
  $Customer = $observer->getEvent()->getCustomer();

      $session=Mage::getSingleton('customer/session');
   $session->setBeforeAuthUrl(Mage::getSingleton("mymodule/session")->getCompurl().'state_new/1');
    if (!$Customer->getCustomerActivated()) {
    }
    else{
       //$session->setCustomerAsLoggedIn($Customer);
       $response1 = Mage::app()->getResponse(); // observers have event args

        $dataarray = Mage::getSingleton("mymodule/session")->getData_array();
        $sampleid=$dataarray['sampleid'];

        $state=$dataarray['state'];
        if($state==1)
        {
          $collection=Mage::getSingleton('mymodule/mymodule')->customisesaved($sampleid);
        if($collection)
        {
            $url=Mage::getUrl('mymodule/mymodule/customshow');
             Mage::log($url,null,"url.log");
                Mage::app()->getFrontController()->getResponse()->setRedirect($url);
             Mage::app()->getResponse()->sendResponse();
             exit;
        }

    }

}
}

Suggest me some solution.print_r($url) $url  has my custom controller url but not executing it.This is my custom controller where i want to redirect and continue the process

public function customaddAction()
    {
     $sampleid=$this->getRequest()->getParam('sampleid');

    $login_new=$this->getRequest()->getparam('state_new');
        Mage::getSingleton("mymodule/session")->setData('data_array',array('sampleid'=>$sampleid,'state'=>1));
            if((!Mage::helper('customer')->isLoggedIn())||(!$login_new))
        {
        Mage::getSingleton("mymodule/session")->setData('data_array',array('sampleid'=>$sampleid,'state'=>1));
           Mage::getSingleton("mymodule/session")->setData('compurl',Mage::helper('core/url')->getCurrentUrl());
            Mage::getSingleton('customer/session')->setBeforeAuthUrl(Mage::helper('core/url')->getCurrentUrl());
            Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl('customer/account'));
            $this->_redirect('customer/account/login');

        }
     if((Mage::helper('customer')->isLoggedIn())||($login_new==1))
        {
        Mage::getSingleton("mymodule/session")->setData('data_array',array('sampleid'=>$sampleid,'state'=>0));
         $sampleid=$this->getRequest()->getParam('sampleid');

          $collection=Mage::getSingleton('mymodule/mymodule')->customisesaved($sampleid);
        if($collection)
        {
        $this->_redirect('mymodule/mymodule/customshow');
        }
        else{
                 $this->_redirectReferer();
            }
        }
    }


texts: Magento 1.8 - Edit sales/order/view/order_id/2222/ template

texts:
I'm working on a magento ecommerce and i need to change the template inside of the red square ( See Picture )

Location of frontend design: app/design/tiffosi/default/template/

What is the file?


texts: Magento 2 Custom Controller get MetaTitle

texts:
In my controller I have the following code but I want to display also the meta title of the product in the browser. Can anyone help me with this? Thanks!

class Product extends \Magento\Framework\App\Action\Action
{
protected $pageFactory;
public function __construct(Context $context, PageFactory $pageFactory)
{
    $this->pageFactory = $pageFactory;
    return parent::__construct($context);
}

public function execute()
{
    $page_object = $this->pageFactory->create();
    return $page_object;
}
}


texts: customizable option file(.pdf) is not open

texts:
In product custom option type is File. I allow only png, jpeg, txt, pdf extension.

In place order time when I select PDF, it's work. A custom option also select.

But when we open that file (pub/media/custom_options/quote/n/e/jMvJIA50kksnMXL1gxcC0um5Hm0vL0HA) it displays error.


texts: Find customers with same name and other details but different email

texts: I have few accounts with same details except different email. Is there any way to figure out their details ? like selecting emails which have same first name & last name using an SQL query ?


texts: Magento2: switch shipping methods placement with address fields

texts:
In the checkout page how can I switch the placement of shipping address fields below the choose shipment option?

I already extended the Checkout module and at this file
app/code/[Vendor]/Checkout/view/frontend/layout/checkout_index_index.xml


texts:
How do you disable /sales/billing_agreement/ I have changed the xml file in the layout folder so it doesnt show up on the menus but the url is still active

I added comments around the following in the billing_agreement.xml

<action method="addLink" translate="label"><name>billing_agreements</name><path>sales/billing_agreement/</path><label>Billing Agreements</label></action>


texts:
By default we will show empty value attribute in the frontend – in product detail page (product additional information). The empty Magento dropdown attribute will show as “No” or “N/A”.

This is a solution to hide all empty value attribute :

If you have found “attributes.phtml”, find and replace following coding:

FIND:

  htmlEscape($this->__($_data['label'])) ?> productAttribute($_product, $_data['value'], $_data['code']) ?>

REPLACE:

 getResource()->getAttribute($_data['code']); if (!is_null($_product->getData($_attribute->getAttributeCode())) && ((string)$_attribute->getFrontend()->getValue($_product) != '')) { ?>  htmlEscape($this->__($_data['label'])) ?> productAttribute($_product, $_data['value'], $_data['code']) ?>

I would like an other solution, i will change the default empty value attribute to '*'. I would your help for that. I can't found where i edit this default value.
Thanks


texts:
i wrote below observer to add extra price to product price based on get paramter id of product

 <catalog_product_load_after>
            <observers>
                <setcustomprice>
                    <type>singleton</type>
                    <class>Mour_Customgroup_Model_Observer</class>
                    <method>loadaftercatalog</method>
                </setcustomprice>
            </observers>
    </catalog_product_load_after>

observer.php

    public function loadaftercatalog(Varien_Event_Observer $event) {

            $pricetoadd=Mage::getModel('catalog/product')->load(233); // error caused after adding this line

            $product = $event->getEvent()->getProduct();
            $originalprice = $product->getPrice();
            $customprice = $originalprice+$pricetoadd->->getPrice();
            $product->setPrice($customprice);

   }

after adding code to observer i keep on getting error maximum nesting level of 500 reachesd i thing my observer i getting called more than once any better way to solve the issue

pls suggest

What i am trying to do :

1: there are two categories A, B
if user browser any product of A he has option to buy it with any other product in B

so i pass id of product in A via get parameter and show Products of category B with added price based on id of product in get parameter


texts: How to add Backend grid of order, add a coulmn Shipping method In Magento 2

texts:
How to add backed grid of order add a column Shipping method in
programmatically if have any idea or suggestion to slow this in
and related links so give me ASAP.
Thank you.


texts: Magento 2: How to integrate Pay Pal Payment gateway with Magento 2 REST API for Android?

texts:
We are trying to build the generic android mobile app which can be used by magento 2 owners using REST API for Magento2 and have implemented the basic features for the app.

As most of the people uses paypal for the payment gateway, we planned to use the paypal Android SDK for our mobile app but the problem is that we are not able to find the REST API to submit the transactionId or PaymentId to magento2.

Do we need to write our own API for this or is there any existing rest API which we can use and submit the transactionId to magento2 store?

Please help us.


texts: Shipping methods does not display on checkout page until I change country

texts:
I'm facing a strange issue with Magento 2.2
I've 4 allowed countries on my store
Shipping methods on checkout page are not displaying until user changes any country.
Default country is set to United Arab Emirates, if any user from UAE tries to place an order he sees UAE as default selection .. so he does not change it which causes no Shipping Methods.

I'm thinking either I should not select UAE as default country, but how to do it?

or

How to refresh shipping methods block automatically?

You can visit the store yourself at: www.trydealz.com


texts:
Help Me. i am using all latest version.
During the installation of Magento 2.4 an error appears when creating an admin account:
An abstract factory could not create an instance of magentoframeworkappdeploymentconfig(alias: Magento\Framework\App\DeploymentConfig)


texts: Additional data: URL key for specified store already exists even after deleting catalog_product_entity

texts:
I keep getting

Additional data: URL key for specified store already exists.

when i try to import the csv products even after deleting the catalog_product_entity table completely.

Is there any other table to be deleted.

I see the product ids gets incremented even after truncating the table.


texts: Many shipping methods configured and would like to select a default one

texts:
I have various shipping methods configured and would like to select a default one.

I don't have a clue where to start on magento 2


texts: Error: Invalid request for adding product to quote

texts:
I am trying to Add Products to Cart with respect to customer (programmatically) but getting error "Invalid request for adding product to quote". I have both Simple products (with custom options) and configurable products. Below is my code. Please help. Many thanks in advance.

public function addtocartAction(){
    try {
        $cusId = $this->getRequest()->getParam('cusId');
        $customer = Mage::getModel('customer/customer')->load($cusId);
        $quote = Mage::getModel('sales/quote')->loadByCustomer($customer);
        $quoteId = $quote->getId();
        //$products = $this->getRequest()->getParam('products');
        $products = json_decode('[{"proId": "906","proQty": "1", "options":{"17":"wq","16":"18"}}]');

        foreach($products as $product) {
            /*if (!$product->getId()) {
                throw new Exception();
            }*/
            foreach ($product->options as $optKey => $optValue) {
                $optAll[$optKey] = $optValue;
            }

            $mainProduct = Mage::getModel('catalog/product')->load($product->proId);
            $params = array(
                'product' => $product->proId,
                'qty'     => $product->proQty,
                'options' => $optAll
            );
            echo "<pre />"; print_r($params);
            $quote->addProduct($mainProduct, $params);
            $quote->setIsActive(1);
            $quote->collectTotals()->save();
        }
        $rslt['success'] = '1';
        $rslt['message'] = 'Product has been succefully added to cart';
    }
    catch(Exception $e){
        $rslt['success'] = '0';
        $rslt['message'] = $e->getMessage();
    }
    print_r(json_encode($rslt));

}


texts: how to setup more than offer Buy 2 Get 1 free in magento?

texts:
I setup Buy 2 Get 1 free offer in magento. it's working fine. But I setup morethan one in same way it's not working?

Can you tell me any one how it is?

and how to setup if cellphone purchase! memory card free?

thanks in advance...........


texts: System.log and exact URL of page caused that record

texts:
My System.log if full of Notices..

2016-03-11T08:23:39+00:00 ERR (3): Notice: Undefined offset: 0  in /var/../app/code/local/Magerevol/Brands/Block/Prodpage.php on line 29

I know what cause this notice, I know how to fix it and it's good that those notices are written in System.log.

The cause  that this notice appear is that I forgot to add an image in some places on product pages...

lirics...
The question is: How can I find the exact frontpage product url which caused this notice?


texts: Get Submitted Data from Amasty Custom Form through REST

texts:
Our company uses Amasty custom forms for front end forms. I've been tasked to get the form data into our ticketing system and then close the form in Magento 2. I'm finding no information on how to use the API. I can't figure out what the URL of the call should be or if I need to do anything else to set it up.
I assume it has an API as I can set the permissions for the integration account.

Also, there is a folder called API within its vendor folder.


texts:
Did anyone run into this problem before?

I get the following error when accessing Magento 2 site:

  There has been an error processing your request

Below is the error log content. I ran permissions, compiled, re-index... and clear cache, but nothing changed

  Magento\Framework\App\Http\Interceptor does not exist
  {"exception":"[object] (ReflectionException(code: -1): Class
  Magento\Framework\App\Http\Interceptor does not exist at
  /home/accountfolder/public_html/vendor/magento/framework/Code/Reader/ClassReader.php:19)"}
  []


texts: Magento2.3.5 New Column to cms page store with declarative Schemas no saving

texts:
I have added a new column with declarative schema found here: https://devdocs.magento.com/guides/v2.4/extension-dev-guide/declarative-schema/db-schema.html
Is all added to the table cms_page_store and the backend form but when I save I can see the data in post but is not populating the field in cms_page_store table.
My setup:
db_schema.xml
<?xml version="1.0"?>
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
    <table name="cms_page_store">
        <column xsi:type="varchar" name="ucri" nullable="true" length="50" comment="Unique Code Cmc Page Relation Identifier"/>
        <constraint xsi:type="unique" referenceId="CMS_PAGE_STORE_UCRI_STORE_ID">
            <column name="ucri"/>
            <column name="store_id"/>
        </constraint>
    </table>
</schema>

cms_page_form.xml
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="search_engine_optimisation">
        <field name="ucri" sortOrder="1">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">text</item>
                    <item name="label" xsi:type="string" translate="true">Unique Code</item>
                    <item name="formElement" xsi:type="string">input</item>
                    <item name="source" xsi:type="string">page</item>
                    <item name="dataScope" xsi:type="string">ucri</item>
                </item>
            </argument>
        </field>
    </fieldset>
</form>

db_shcema_whitelist.json
{
    "cms_page_store": {
        "column": {
            "ucri": true
        },
        "constraint": {
            "CMS_PAGE_STORE_UCRI_STORE_ID": true
        }
    }
}

Any idea ami missing something else here ?


texts: How to change all the blue colors of RWD theme to another color?

texts: How to change all the blue color of RWD theme to another color?Actually this question may be duplicate but please help me none of the methods worked for me in Google or in MSE.


texts: Magento Cookie Issue When Logging Into Customer Account

texts:
I have a server setup locally with Vagrant which is running nginx + php5-fpm + mysql + varnish. I've disabled varnish for now just to rule that out.

I've been having issues when trying to login into a customer account on the frontend - it redirects backs to the homepage. The domain is set as www.site.local. I can log in into the admin area fine.

It appears that when redirecting to a successful login, it's creating a new session but not updating the cookie.

When running it via Lynx on the server itself, the cookie is set to fine - the only difference I can see is that it's using 127.0.0.1 as the domain rather than www.site.local

I tried the suggestion on this article - http://www.novusweb.com/1340/e-commerce-technology/fix-for-passing-magento-session-ids - and it works, but I'd rather not have to modify code when there's likely something server-side that can be changed.

If you need any of the configurations of the server I can update the post.


texts: How do I customize the layout of products on a category page? I want all rows and no columns with a small pic and the ability to input quantities

texts:
I want to decrease the amount of space a product takes up on the catalog page.

I don't want grid or list view. I want the customer to be able to see 100 products per page listed as if they were in rows of excel.

Product name - Very small picture - description - text box for quantity.

I'm having trouble finding the proper html files folks speak of on forums, have looked through themes and extensions. Can someone explain the scope of what I'm trying to accomplish, where it is to be performed and in pretty simple language. I'm kind of a beginner. Thanks in advance.


texts:
I try to translate a text in a function inside sales_helper_data with this code $this->__('TEXT') but it just returns the same input string.

I Also tried Mage::helper('sales')->__("TEXT"), Mage::helper('Admin')->__("TEXT"). Admin due to my module is admin module and created Mage_sales.csv in local/[lanfuage]

I Debugged the code and the Mage::app()->getTranslator()->getData() is an empty array. what's the problem?


texts: Magento 2 : How to remove default sort by options and add custom sort by options?

texts:
I need a help ASAP related to sort by functionality in magento 2

1] I need to remove default sort by options.

2] I need to add my own sorting options.

I tried a custom module in which I have override the block file

vendor/magento/module-catalog/Block/Product/ProductList/Toolbar.php

In which I have override the setCollection() function

I have define custom options like:

class Toolbar extends \Magento\Catalog\Block\Product\ProductList\Toolbar {
  public function setCollection($collection) {
    $this->_collection = $collection;
    $this->_collection->setCurPage($this->getCurrentPage());
    $limit = (int) $this->getLimit();
    if ($limit) {
        $this->_collection->setPageSize($limit);
    }
    if ($this->getCurrentOrder()) {
        switch ($this->getCurrentOrder()) {
            case 'created_at_desc':
                    $this->_collection
                            ->addAttributeToSort('name');
                            //->order('e.created_at ASC');
                break;
        case 'created_at_asc':
                    $this->_collection
                            ->addAttributeToSort('name');
                            //->order('e.created_at DESC');
                break;
        case 'price_low_to_high':
                $this->_collection
                        ->addAttributeToSort('price');
                        //->order('price_index.price ASC');
                break;
        case 'price_high_to_low'://need to change
                $this->_collection
                        ->addAttributeToSort('price');
                break;
        case 'model'://need to change
                $this->_collection
                        ->getSelect()
                        ->joinLeft(
                                ['admin' => $collection->getTable('cataloginventory_stock_status')], 'e.entity_id = admin.product_id')->where('admin.stock_status = 1');
                break;
            case 'new_to_old':
                $this->_collection
                            ->getSelect()
                            ->order('e.created_at DESC');
                break;
            case 'old_to_new':
                $this->_collection
                            ->getSelect()
                            ->order('e.created_at ASC');
                break;
            default:
                $this->_collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection());
                break;
        }
    }
    return $this;
  }
}

I get the 'old_to_new' and 'new_to_old' code and its working fine,
but need the other remaining following options too. I tries all possible options but can't get the result.

This are the following remaining options I need :

-created_at_desc--- name by asc(A-Z)

-created_at_asc--- name by desc(Z-A)

-price_low_to_high--- price low to high

-price_high_to_low--- price high to low

Thanks


texts: How to change the quantity box to dropdown in magento2. I want in dropdown what we add quantity in admin it will show in dropdown up to that value. I mean if I select quantity option to 4 in admin it shows in fronend drop down with 4 values.


texts: Cache a value which is based on config and tax settings

texts:
I calculate a value which is based on configuration settings and on the tax rates.

How can I cache it in a way that it automatically gets cleared when one of those infos changes?

Is this all about using the right tags and then it will get cleared automatically?


texts: Magento website page redirects to localhost dashboard

texts:
I transfer my Live site to localhost and changed the URL in core_config_data table.Setting the database connection in local.xml file

My website home page is running well in localhost but when I click any link on home page it redirects to localhost dashboard.

here is my .htaccess file code

DirectoryIndex index.php
<IfModule mod_php5.c>
## enable rewrites
    Options +FollowSymLinks
    RewriteEngine on
## you can put here your magento root folder
## path relative to web root
    RewriteBase /
    #RewriteRule ^(.*)\/(\?.*)?$ $1$2 [R=301,L]
## rewrite API2 calls to api.php (by now it is REST only)
    RewriteRule ^api/rest api.php?type=rest [QSA,L]
## workaround for HTTP authorization
## in CGI environment
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
## never rewrite for existing files, directories and links

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
## rewrite everything else to index.php

    RewriteRule .* index.php [L]
RewriteRule ^products/(.*)$ /$1 [L,R=301]

RewriteRule ^(.*)/products/(.*).html$ http://%{SERVER_NAME}/$1/$2.html [NC,R=301,L]
</IfModule>

Please help me to find the solution


texts: Installer script to insert data from excel

texts:
I am creating a module for Magento. For this I need already inserted data in table. For this I need to write sql/module_setup/mysql4-install-0.1.0.php installer script to insert data from excel or csv to table.

my installer script is like this to create table

$installer = $this;

$installer->startSetup();

$installer->run("

CREATE TABLE `{$this->getTable('module_setup_data')}` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `code` varchar(255),
  `code_type` varchar(255),
  PRIMARY KEY  (`id`),

) ENGINE=InnoDB DEFAULT CHARSET=utf8;

    ");

$installer->endSetup();

Please guide me how to write sql/module_setup/mysql4-install-0.1.0.php installer script to insert query from excel or csv.


texts:
After patching a Magento 1.6.0.0 site with SUPEE-9767 I am getting an infinite redirect loop.

There were no errors applying the patch.

I am running it on Apache2.2 with PHP 5.4 on CentOS 6.

The site has 2 stores on it, not sure if that could be causing it?

The logs show that it is doing a bunch of 302 redirects:

{IP_ADDRESS} - - [02/Jun/2017:11:09:52 -0400] "GET / HTTP/1.1" 302 217 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
{IP_ADDRESS} - - [02/Jun/2017:11:09:52 -0400] "GET / HTTP/1.1" 302 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
{IP_ADDRESS} - - [02/Jun/2017:11:09:52 -0400] "GET / HTTP/1.1" 302 217 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
{IP_ADDRESS} - - [02/Jun/2017:11:09:52 -0400] "GET / HTTP/1.1" 302 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
{IP_ADDRESS} - - [02/Jun/2017:11:09:53 -0400] "GET / HTTP/1.1" 302 217 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"

Any idea how to fix this?