texts: Magento - Upgrade extension folder structure for version 1.9+ (1.7 - 1.9)

texts:
Considering my extension name - myextensionfolder, the current structure is compatible to CE Magento versions 1.7, 1.8, 1.8.1

app/code/community/myextensionfolder

app/design/frontend/default/default/layout/myextensionfolder
app/design/frontend/default/default/template/myextensionfolder
app/design/adminhtml/default/default/layout/myextensionfolder
app/design/adminhtml/default/default/template/myextensionfolder

skin/frontend/default/default/css/myextensionfolder
skin/frontend/default/default/images/myextensionfolder
skin/frontend/default/default/js/myextensionfolder

After installing it for version 1.9, admin end works as expected but does not work for frontend(only). Though it works by replacing app/design and skin/frontend folders as shown below.

app/design/frontend/rwd/default/layout
app/design/frontend/rwd/default/template

skin/frontend/rwd/default/css
skin/frontend/rwd/default/js
skin/frontend/rwd/default/images

If I put the files in default rwd theme then it does not reflect anything on frontend for ver 1.7-1.8

What should be the correct approach to modify my extension folder structure to make it compatible till version 1.9+ so that user can install it for version 1.7 - 1.9.2.1

P.S. - The question is to alter extension folder structure to make it compatible till version 1.9+ and NOT to simply upgrade Magento Community Edition version.


texts: Custom attributes values not getting added to flat table

texts:
I'm having several product attributes that I need inside the flat table (or as an alternative: joining them into my collection from basic eav table). Therefore I set them to "Used in Product Listing" = yes.

Now this works for some attributes but some won't get filled. I compared with another attribute that is also a simple varchar/text input with same settings which gets correctly filled into the flat table.

Any guesses why some attributes get indexed and some not while the only difference is the name and for one that works that is set to be used in quick search?


texts: Magento 2 data migration error ConfigurablePrices step mismatch of entities

texts:
I'm migrating data from M1 v1.9.3.2 to M2 v2.1.5, and receiving this error at the volume check for ConfigurablePrices:

[2017-04-03 19:16:34][INFO][mode: data][stage: volume check][step: ConfigurablePrices step]: started
100% [============================] Remaining Time: 1 sec
[2017-04-03 19:16:34][ERROR]: Mismatch of entities in the document: catalog_product_entity_decimal

The mismatch is due to 3 records being added to the M2 catalog_product_entity_decimal table that aren't in the M1 table.

I don't understand where this is coming from. I've done a few migrations and the only times I've run into something like this is when versions of the sites, the migration tool, and migration maps don't match.

I am certain I am using v2.1.5 of the tool to match the M2 site, and I am using v1.9.3.2 config and mappings to match M1.

I have run and rerun this into a fresh M2 DB, reloaded the M1 DB, etc., but nothing gets me past this error.

Any thoughts??


texts: How to display data from 2 tables that already have data on Magento 2.3

texts:
How to display data from two tables quote_item

and sales_order_item

from the database to .phtml file.

Can anyone help me step by step, I am new to Magento, if someone can help me, it's very useful for me, help me, please! Many thanks


texts:
Facing the same problem as the user here (Why does PATCH_SUPEE-6788 appear to have no effect on a 1.7.0.2 installation?) -- I followed the suggested steps - downloaded a clean local copy of 1.7.02 off the Magento archive, and replaced the .htaccess and .htaccess.sample files on the server with the clean ones from the download. But when I go to execute the .sh file, I'm still getting an error --

Checking if patch can be applied/reverted successfully... ERROR: Patch can't be applied/reverted successfully.

 Hunk #1 FAILED at 131.

Any thoughts as to what may still be the problem?


texts:
class CartProductUpdateAfter implements \Magento\Framework\Event\ObserverInterface
{

    /**
     * Execute observer
     *
     * @param \Magento\Framework\Event\Observer $observer
     * @return void
     */
    public function execute(
        \Magento\Framework\Event\Observer $observer
    ) {
        $item = $observer->getEvent()->getData('quote_item');
        $product = $item->getProduct();
}

the above code is giving error to  get $item and $product values in this page? what is the correct syntax to get those values on the shopping cart page?


texts: Magento 1.9 - Custom Attribute - input_renderer / frontend_input_renderer not going into database

texts:
I'm creating an attribute like this

$installer = new Mage_Eav_Model_Entity_Setup('core_setup');

$installer->startSetup();
$entityTypeId = 'catalog_product';
$installer->addAttribute($entityTypeId, 'ask_a_pharmacist', array(
    'group'             => 'SEO',
    'label'             => 'Ask A Pharmacist',
    'note'              => "Add lots of rows",
    'type'              => 'text',
    'input'             => 'textarea',
    'input_renderer'     => 'categoryatribute/adminhtml_helper_jcf',
    'default'           => '{"controls":{"locked":true,"maxrows":-1,"fields":["question","answer","author","date"]},"data":[]}',
    'visible'           => true,
    'required'          => false,
    'searchable'        => false,
    'filterable'        => false,
    'comparable'        => false,
    'user_defined'      => true,
    'visible_on_front'  => true,
    'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,));
$installer->endSetup();

And the attribute is created, but the catalog_eav_attribute value remains null for this attribute. If I manually update frontend_input_renderer in the database to categoryatribute/adminhtml then it works fine, but not until then.

I need it working without this extra step but can't figure out what I need to change.

Here's my config.xml

<?xml version="1.0"?>
<config>
<adminhtml>
    <layout>
         <updates>
              <categoryatribute>
                    <file>innoxcategoryatribute.xml</file>
              </categoryatribute>
         </updates>
    </layout>
</adminhtml>
<modules>
    <Innox_CategoryAtribute>
        <version>0.0.8</version>
    </Innox_CategoryAtribute>
</modules>
 <global>
    <helpers>
        <categoryatribute>
            <class>Innox_CategoryAtribute_Helper</class>
        </categoryatribute>
    </helpers>
    <models>
        <categoryatribute>
            <class>Innox_CategoryAtribute_Model</class>
        </categoryatribute>
    </models>
    <blocks>
        <categoryatribute>
            <class>Innox_CategoryAtribute_Block</class>
        </categoryatribute>
    </blocks>
    <resources>
        <add_category_attribute_setup>
            <setup>
                <module>Innox_CategoryAtribute</module>
                <class>Innox_CategoryAtribute_Model_Resource_Setup</class>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </add_category_attribute_setup>
        <add_category_attribute_write>
            <connection>
                <use>core_write</use>
            </connection>
        </add_category_attribute_write>
        <add_category_attribute_read>
            <connection>
                <use>core_read</use>
            </connection>
        </add_category_attribute_read>
    </resources>
</global>


texts: After Production mode and JS minification, 404 error for all JS files

texts:
I have enabled JS minification and Merging while in developer mode.
Then i enabled production mode.

Cleared cache and ran below commands:

  php bin/magento setup:upgrade

  php bin/magento indexer:reindex

  php bin/magento setup:di:compile

  php bin/magento setup:static-content:deploy

but still i get 404 error for all JS files in console.

Magento still tries to look for Non-minified version of JS files!

Note: In developer mode everything works fine!


texts:
The currency in my Magento isn't 'technically' setup correctly. When converting USD to Mexico Peso's, it writes '1 969,85 MX$' when it should be '1969.85 MX$' (no space and a period, not a comma). Any idea how I would go about changing this?

This is setup in Magento as 'Mexican Peso'. The owner of the site got an email saying that Google has suspended us in South America until we fix this.


texts: What does "setOriginAddress()" does to sales order?

texts:
I have seen this function in code,
i am assuming it is used to "Set origin address for shipping rate estimation"
I am not much, its used for what purpose & why it takes/sets "System > Configuration > Shipping Settings > Origin" in request.
Any guidance, if anybody knows its better ?


texts:
I'm using the blacknwhite theme.  There instructions tell you to add a bunch of markup to the cms hompepage to set it up as per there demo.  I've dine this and it works but I'd rather put it in a template file as it will be easier to manage.

If I add the below to the cms page content I can call from a template

{{block type="core/template" template="monsoon/homepage.phtml"}}

But then how do I call the below from the template file:

{{block type="page/html_topmenu" block_id="catalog_topnav" template="page/html/topmenu.phtml"}}


texts: In default Magento 2 Why "e" is allowed to be entered and no any other letters in Qty textbox, It should allow only numbers.


texts: How to create a special website for mobile devices?

texts: I have a 'responsive theme' on my Magento 1.9.1 store but it's not good enough...What is the best way to setup for mobile devices (tablets, mobile phones) so that both the customers and Google be happy?


texts: Setting Store-Specific Options for the non-Default Store via CLI

texts:
The Magento CLI application allows you to set store URLs directly, like so:
bin/magento setup:store-config:set \
--base-url="http://example.dev/" --base-url-secure="https://example.dev/"

But how can you set the store URL for the second Magento store? I've tried setting the MAGE_RUN_CODE, like so, but this only changed the default base store.

bin/magento setup:store-config:set \
--magento-init-params="MAGE_RUN_CODE=otherstore&MAGE_RUN_TYPE=website" \
--base-url="http://example2.dev/" --base-url-secure="https://example2.dev/"

Is there something I'm missing? Is it possible to set store config options for stores other than the default store?


texts:
I have this requirement:

A product should have each individual price and case / package price.

For each product, N items make a case. For example: In product, A 20 items makes a case. In product B 5 items make a case.

When a user enters the quantity, the code should automatically check how many case can be purchased and how many individual product can be purchased.

For example: If a user types 125 quantity, it should automatically check the case product count (20 items in this case),

125 products can be purchased as 6 cases (20 items in a case) and 5 individual items.

I hope my comment is understandable.

Please refer to the image attached.


texts:
I want to override js function on shipping method section :
i checked on inspect Element below is the function is calling on click on continue
  button Can you please help me to find out where i can get that function

onclick="shippingMethod.save()

<checkout_onepage_index>
    <reference name="head">
                    <action method="addItem"><type>skin_js</type><name>js/custom.js</name></action>
        </reference>
        </checkout_onepage_index>

path : skin\frontend\package\theme\js\custom.js

// shipping method
var ShippingMethod = Class.create();
ShippingMethod.prototype = {
    initialize: function(form, saveUrl){
        this.form = form;
        if ($(this.form)) {
            $(this.form).observe('submit', function(event){this.save();Event.stop(event);}.bind(this));
        }
        this.saveUrl = saveUrl;
        this.validator = new Validation(this.form);
        this.onSave = this.nextStep.bindAsEventListener(this);
        this.onComplete = this.resetLoadWaiting.bindAsEventListener(this);
    },

    validate: function() {
        var methods = document.getElementsByName('shipping_method');
        if (methods.length==0) {
            alert(Translator.translate('Your order cannot be completed at this time as there is no shipping methods available for it. Please make necessary changes in your shipping address.').stripTags());
            return false;
        }

        if(!this.validator.validate()) {
            return false;
        }

        for (var i=0; i<methods.length; i++) {
            if (methods[i].checked) {
                return true;
            }
        }
        alert(Translator.translate('Please specify shipping method.').stripTags());
        return false;
    },

    save: function(){
alert('tttttttttttttttttttt');
        if (checkout.loadWaiting!=false) return;
        if (this.validate()) {
            checkout.setLoadWaiting('shipping-method');
            var request = new Ajax.Request(
                this.saveUrl,
                {
                    method:'post',
                    onComplete: this.onComplete,
                    onSuccess: this.onSave,
                    onFailure: checkout.ajaxFailure.bind(checkout),
                    parameters: Form.serialize(this.form)
                }
            );
        }
    },

    resetLoadWaiting: function(transport){
        checkout.setLoadWaiting(false);
    },

    nextStep: function(transport){
        if (transport && transport.responseText){
            try{
                response = eval('(' + transport.responseText + ')');
            }
            catch (e) {
                response = {};
            }
        }

        if (response.error) {
            alert(response.message);
            return false;
        }

        if (response.update_section) {
            $('checkout-'+response.update_section.name+'-load').update(response.update_section.html);
        }

        payment.initWhatIsCvvListeners();

        if (response.goto_section) {
            checkout.gotoSection(response.goto_section, true);
            checkout.reloadProgressBlock();
            return;
        }

        if (response.payment_methods_html) {
            $('checkout-payment-method-load').update(response.payment_methods_html);
        }

        checkout.setShippingMethod();
    }
}

Can you please help me to find out the exact location & file name


texts:
I have a MAMP with PHP 7.1.8 up and running. I downloaded my production Magento 2.2 based website and also imported the MySQL database into my localhost phpMyAdmin.Then I changed the URL in the core_config_data table to reflect the localhost URL to get to the site.

However now when I go to the site in the browser I get this error
An error has happened during an application run. See exception log for details.

when I look at the exception.log I see it says

main.CRITICAL: PDOException: SQLSTATE[HY000] [2002] No such file or directory in /Applications/MAMP/htdocs/devkisseurope/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:128

I googled around and see mention that it may mean that the PHP version. being used is not the same version that MAMP uses.
However, I edited the ~/.bash_profile as well as the ~/.profile files and rebooted. now when I run

which PHP

I see the below which is the correct bath the php I am using

/Applications/MAMP/bin/php/php7.1.8/bin/php

So I am not sure what i am missing to get my Magento2 running locally for development?

I have been able to install a Magento 2.2 from scratch with no issues. I am just not able to get a copy of an already developed production magento 2.2 site to run locally on my mamp server so I can further develop it.


texts:
I installed Magento 2 via Composer and after I followed the steps and it was installed I received this on the frontend:

Basically all URLs go to 404 (admin as well).
I am using Ubuntu 18 and Apache server. This is my virtual host configurations:

<VirtualHost *:80>
    ServerAdmin email@gmail.com
    ServerName m2.local
    ServerAlias www.m2.local
    DocumentRoot /var/www/html/magento2
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    <Directory /var/www/html/magento2>
        #Options Indexes FollowSymLinks
        Order Deny,Allow
        Allow from all
        #AllowOverride All
        #Require all granted
    </Directory>
</VirtualHost>

And this is my user, group and permissions:

drwxrwxr-x  6 magento magento   4096 Okt 21 18:55 app
-rw-rw-r--  1 magento magento    138 Okt 17 10:54 auth.json.sample
drwxrwxr-x  2 magento magento   4096 Okt 17 10:54 bin
-rw-rw-r--  1 magento magento 434977 Okt 17 10:54 CHANGELOG.md
-rw-rw-r--  1 magento magento  12673 Okt 17 10:54 composer.json
-rw-rw-r--  1 magento magento 336461 Okt 27 15:37 composer.lock
-rw-rw-r--  1 magento magento    650 Okt 17 10:54 COPYING.txt
drwxrwxr-x  5 magento magento   4096 Okt 21 18:54 dev
drwxrwxr-x  3 magento magento   4096 Okt 27 15:38 generated
-rw-rw-r--  1 magento magento     57 Okt 17 10:54 grunt-config.json.sample
-rw-rw-r--  1 magento magento   2994 Okt 17 10:54 Gruntfile.js.sample
-rw-rw-r--  1 magento magento   1370 Okt 21 19:01 index.php
drwxrwxr-x  4 magento magento   4096 Okt 21 18:54 lib
-rw-rw-r--  1 magento magento  10376 Okt 17 10:54 LICENSE_AFL.txt
-rw-rw-r--  1 magento magento  10364 Okt 17 10:54 LICENSE.txt
-rw-rw-r--  1 magento magento   5495 Okt 17 10:54 nginx.conf.sample
-rw-rw-r--  1 magento magento   1416 Okt 17 10:54 package.json.sample
-rw-rw-r--  1 magento magento    804 Okt 17 10:54 php.ini.sample
drwxrwxr-x  2 magento magento   4096 Okt 17 10:54 phpserver
drwxrwxr-x  6 magento magento   4096 Okt 17 10:54 pub
-rw-r--r--  1 magento magento      5 Okt 21 18:51 readme.md
-rw-rw-r--  1 magento magento   4191 Okt 17 10:54 README.md
drwxrwxr-x  7 magento magento   4096 Okt 17 10:54 setup
drwxrwxrwx  6 magento magento   4096 Okt 27 15:38 var
drwxrwxr-x 60 magento magento   4096 Okt 27 15:37 vendor

Also I followed up the permissions from the documentation:

cd <your Magento install dir>
find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} +
find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} +
chmod u+x bin/magento

Can someone give me an idea what I should try?


texts: Magento 2: Any Quick Option how to Make Magento 2.2.x Website compatible with PHP 7.3 without Magento Version Upgrade?

texts:
i want to make my magento 2.2.X website compitable with php version 7.3 without upgrading the magento version of my site.
Please help!


texts: Magento 2: what to do after changing product prices from an external app to have good data integrity?

texts:
I am working on a refectoring of an app from Magento 1 to Magento 2. The app changes product prices for Magento 2. I am doing this by invoking the object manager and using Magento 2 models.

Now my questions is. What do I have to do after I change prices in Magento 2? I am thinking of Caches, Indexes, Price rules etc?

For magento 1 we have below code

Mage::getSingleton('index/indexer')->getProcessByCode('catalog_product_price')->reindexEverything();
Mage::getSingleton('index/indexer')->getProcessByCode('catalog_product_flat')->reindexEverything();

$resource = Mage::getResourceSingleton('catalogrule/rule');
$resource->applyAllRulesForDateRange($resource->formatDate(mktime(0,0,0)));
Mage::app()->removeCache('catalog_rules_dirty');

What is the equivalent for Magento 2 and do I need to do additional things to have good data integrity?


texts: Magento 2: values of multiselect attribute don't ever change!

texts:
i have a multiselect product attribute, that when ever i change its settings and save, i get

but the settings don't get changed.
Here's the attribute's database values:

I'm on magento 2.2.4, any idea how to fix this?


texts: Include custom extension_attribute in tax calculation on checkout page - Magento 2

texts:
I have an extension_attribute named extra_fee showing in the cart and the value of this attribute is also being added to the cart total (see screenshot).
My problem is, this attribute is required to be included in the checkout tax calculation and I am after some advice on how to do this, please.

What I am trying to achieve is for the tax row in the screenshot to also include the extra_fee value * the customer tax rate. In the screenshot this would be 20 * 0.2 = 4.00. Then 4 should be added to the Tax row and the Order Total row.

Does the extension attribute need to be added to one of the Tax API data interfaces? If so, which one?

Please let me know if any more information is required to help provide a solution for this problem.

Update

On the back of Prachi's suggestion I have manually calculated the tax within the observer using the base_subtotal and tax_amount values in the database.

I'm sure this could be improved by using a built in Magento class to get the tax data from the quote, as I can see this data is stored in the applied_taxes field.
Please suggest any improvements where necessary, thanks.

use \Magento\Framework\Event\ObserverInterface;
use \Magento\Framework\Event\Observer;
use \Psr\Log\LoggerInterface;

class ChangeTaxTotal implements ObserverInterface
{

    /**
     * @var LoggerInterface
     */
    protected $logger;

    public function __construct(
        LoggerInterface $loggerInterface
    )
    {
        $this->logger = $loggerInterface;
    }

    public function execute(Observer $observer)
    {
        /** @var Magento\Quote\Model\Quote\Address\Total */
        $total = $observer->getData('total');
        $quote = $observer->getData('quote');
        $shippingAssignment = $observer->getData('shipping_assignment');
        $extraFee = $quote->getExtraFee();

        //make sure tax value exist
        if (count($total->getAppliedTaxes()) > 0) {

            // NEXT STEPS
            // 1 .get tax rate for customer / country
            $taxRate = $this->getQuoteTaxRate($total);
            // 2. calcuate tax on fast turn around option
            $extraFeeTax = $this->getQuoteExtraFeeTax($extraFee, $taxRate);
            // 3. add exrtrafee tax to quote totals
            $total->addTotalAmount('tax', $extraFeeTax);
            $total->addBaseTotalAmount('tax', $extraFeeTax);
            $total->setGrandTotal($total->getGrandTotal() + $extraFeeTax);
            $total->setBaseGrandTotal($total->getBaseGrandTotal() + $extraFeeTax);

        }

        return $this;
    }

    /**
     * get tax rate for customer
     *
     * @return float
     */
    private function getQuoteTaxRate($total)
    {
        return intval(($total->getTotalAmount('tax') / $total->getBaseSubtotal()) * 100);
    }

    /**
     * get tax amount for extra fee cost
     *
     * @param float $extraFeeAmount
     * @param int $taxRate
     *
     * @return float
     */
    private function getQuoteExtraFeeTax($extraFeeAmount, $taxRate)
    {
        return floatval($extraFeeAmount * ($taxRate / 100));
    }
}


texts:
What is bluefoot in Magento2 enterprise edition and how to use this.

Please suggest me how we can customize element.


texts:
When performing the setup:upgrade I get this error :
"Could not validate a connection to Elasticsearch. No alive nodes found in your cluster"

I have not enabled It previously, updating from Magento 2.3.5 p1.


texts: Magento2 how to set default columns in admin grid

texts:
You guys would be knowing that magento provides columns control in admin grid made using ui component. In that you can add all columns but only few can be displayed by default when grid load initially.

Here, I am showing same example with catalog product admin grid:

I have tried to find out reagrding how to implement this within my custom module admin grid. Unfortunately, I could not able to find it.

Can someone please let me know how we can define these default columns in admin grid? That would be really helpful.

Thanks,


texts: How i show cart page content after redirecting

texts: I have to redirect cart page link /checkout/cart to http://lab.ghrix.com/eee_neha/checkout/winkelwagen/ .After redirect the cart page content not show on /checkout/winkelwagen/. How i show the cart page content on /checkout/winkelwagen/.


texts:
We've made a custom implementation for Magento 1.9.2.2 in which a customer can select his preferred shipping method in the cart. The form for the implementation in the cart looks like this <form id="co-shipping-method-form" action="<?php echo $this->getUrl('checkout/cart/estimateUpdatePost') ?>"> and then hits:
    {
        $code = (string) $this->getRequest()->getParam('estimate_method');
        if (!empty($code)) {
            $this->_getQuote()->getShippingAddress()->setShippingMethod($code)/*->collectTotals()*/->save();
        }
        $this->_goBack();
    }

So far so good I think.
We're using Idev's OneStepCheckout where customers can login during the checkout. When people login during the checkout the preferred shipping method selected in the cart is changed. It looks like something happens with the quote upon login. When echoing the shippingmethods $code before the login we get the right value. But after logging in the value changes.
Is it possible the quote isn't being merged properly upon login? I can't seem to find the solution. Maybe some out here has the proper answer. Please feel free to ask any questions regarding this post. Maybe I can supply the post with more information if needed.
Thanks in advance.
I.J.


texts: Magento2 Forbidden You don't have permission to access / on this server

texts:
I think i messed up the whole permissions for my website and now when i try to acces it i get this message:

  Forbidden You don't have permission to access / on this server.

Some folder have the permision 0000 and in ftp they appear with flcmdpe instead of rwxr-xr-x
Does any of you know how can i set my permissions back to normal so i can see the website again, please? Thanks!


texts:
I have setup multi-website in one magento. All the website working fine.

Now, I have tried to add review from admin but its gives below error.

A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, try again later.

I have enabled default ratings named Price, Quality and value for all the stores.

Please help me to how to resolve this issue.


texts: How to show custom block on shipping method select in Magento 2

texts:
Using reference link how to add custom block at shipping methods below in onepage checkout?, I am able to create additional shipping block on the bottom.

But, I would like to show content only, when the shipping method is selected. When a shipping method is selected by the customer, the cursor should go to additional information and custom fields and the user should enter the data.

When we select another shipping method, the information related to that should come if present else the div should get hidden.

Same like http://excellencemagentoblog.com/blog/2011/11/07/magento-advanced-shipping-method-development/ in Magento 2. I had implemented it in Magento 1.


texts: Magento 2.3.0 | How to convert custom popup into PDF and Download

texts:
I am having an Custom popup code which appears on the product page, I need to download this as PDF, I tried with dumpdf but couldn't succeeded. My code is following:

<?php
$prodArr = $this->getProdArr();;
$prodName =  $prodArr[0];
$prodSku =  $prodArr[1];
?>

<img style="width:51%" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA); ?>wysiwyg/icotheme/zeus/logo/cc-logo-010.png">

CERTIFICATE OF AUTHENTICITY

We certify that, to the best of knowledge the product,

<?php echo $prodName; ?>

 SKU:<?php echo $prodSku; ?>

you have purchased is 100% authentic and guaranteed for its workmanship. The products sold on our platform is in accordance with the recognised industrial quality standards.

               <img class="certificate-image" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);?>frontend/zeus/default/images/authentic-certificate-001.png">
               <img class="authentic_partner_image"  src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);?>frontend/zeus/default/images/authentic-partner.png">


texts:
I've got this block of code in my CMS that renders my contact form. However, It does not submit the form. Upon submit it routes to a 404.

{{block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml"}}


texts: Layout update not working (customer navigation/dashboard)

texts:
It seems that I'm missing something elementary here, though I'm not able to spot it.

When trying to add a link to the customer dashboard (from a custom module) the link doesn't show up on the frontend.

Here is my layout update (warranty.xml, in the base/default/layout directory)

<?xml version="1.0"?>
<layout version="0.1.0">
<customer_account>
    <reference name="customer_account_navigation">
        <action method="addLink">
            <name>warranty</name>
            <path>warranty/index/index</path>
            <label>Warranties</label>
        </action>
    </reference>
</customer_account>

Some config details:

There is a custom theme being used (all of the layout changes are in a local.xml file)
Running Enterprise edition (though I don't think this should matter)

What I've tried:

Disabled Cache
Copied the warranty.xml to the current theme directory
Added the  to the local.xml (this seemed to work, but want to do it the right way)

The XML file is being loaded (when xml not formatted correctly the system throws an error)

Update:
Since I haven't been able to figure out what is wrong with the syntax (it seems fine to me), I went ahead and used an observer:

Event: core_block_abstract_to_html_before

public function addLink(Varien_Event_Observer $observer){
    $block = $observer->getBlock();
    if (!isset($block)) {
        return $this;
    }
        if ($block->getType() == 'customer/account_navigation') {
            $block->addLink('custommod', 'custommod', 'Custom customer page');
        }
}


texts: Version not changed, after applying patch SUPEE 7405 1.1

texts:
I applied latest patch (PATCH_SUPEE-7405_CE_1.9.2.3_v1.1-2016-02-23-07-46-32) to a fresh magento 1.9.2.3 installation

The compiler has never run, all caches are disabled

The patch was applied successfully but after logging in back to back-end I still see 1.9.2.3 on the footer, while it should be 1.9.2.4

I reverted and reapplied the patch successfully but no luck.

Any thoughts on that?


texts: How do I get a custom controller to present in view?

texts:
I'm currently working on a simple process where I've built a controller that lets me know if a person's browser is not running something comparable to the setup I'm putting together. If I go to http://example.com/useraction/index/checkbrowser then the code will either return a commented line that reads <!--- GOOD TO GO ---> or it will return an image and link to encourage the user to upgrade their browser.  I'm doing this through a controller that I have built because it does seem to work as is without all of that caching that Magento does. Let's face it, if I were to do this on the view (even though I would think of this as something that normally SHOULD be on the view) then the proper browser information would not return to the user.

With this in mind I have tried the following:

echo $this->getChildHtml('/useraction/index/checkbrowser');
echo $this->getChildHtml('/useraction/index/checkbrowser',false);
echo $this->getLayout()->createBlock('page/template')->setTemplate('/useraction/index/checkbrowser')->toHtml();
include('/useraction/index/checkbrowser');

None of this is working. What am I missing?


texts: try restarting transaction erro while add a product?

texts:
While adding a product in local system i got this error

SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction

How i fix it?


texts: Magento 2 How to get all active shipping methods via mysql?

texts:
I need to be able to query from mysql these fields

shipping_method_code
shipping_carrier_code

for a custom shipping method (ShipperHQ) I am trying to use from the REST Api.

Thanks


texts: Google and bing spider crawling useless URLs

texts:
After upgrading my site from magento 1.938 to 1.942, google and bing spiders began crawling useless URLs such as

  https://www.example.com/cms/index/noCookies/

and

  https://www.example.com/wishlist/index/add/product/101/form_key/QRh31BjtGTfy2Ur9

Google and bing are crawling these URLs in large numbers, and they have never stopped, which consumes a lot of server resources.

I have added the following command to robots.txt a long time ago.

Disallow: /cms/

Disallow: /wishlist/

But this seems to be useless.

Before I upgraded to magento 1.942, I never found out that google and bing spiders would crawl these URLs in Online Customer tab.

Why is this happening, how to prohibit the crawl of these two URLs?

I have checked the robots.txt in google robots.txt Tester. There is no error in my robots.txt

robots.txt Tester showed these two URLS has been blocked.

Here's screenshot


texts: How to add a custom text field inside product edit page?

texts: I want to add a text field which would actually store a link to my vendors' product  URL. It will be used by management only and should not be visible to customers. How to do that? I am using Magento 2.3.3


texts: Magento2 top header section change layout

texts:
Currently in my site display this

I need search section move to top  as look wise below

If anyone idea reply me how to search section move in magento2


texts:
I am running Magento 2.3.3 and I an issue with product catalog images not showing both on frontend and adminhtml.
I have seen that it is a common problem, but I tried all recommended solutions, but nothing worked.
This is what I have tried so far:
chmod -R 0777 var/ pub/
bin/magento deploy:mode:set developer
bin/magento setup:static-content:deploy -f en_US he_IL --language en_US --language he_IL
bin/magento cache:flush
bin/magento cache:clean
bin/magento indexer:reindex

I also tried to rename pub/media/catalog/product/cache to _cache.
When I tried bin/magento catalog:image:resize I am getting this error on all images:
Cannot resize image "/home/mysite/public_html/releases/20201220114403/pub/media/catalog/product/5/1/5113-g.jpg" - original image not found

I think that this is related to this bug in core magento, that apparently was fixed in 2.3.4:
magento catalog:images:resize now Database Media Storage mode aware (Again!)
I am pretty sure that images exists on disk and database (how can I test this?), just that magento is stuck on old cache and is not refreshing.
Any suggestions to solve this issue?


texts: How to use Web Hook with send Cloud Magento1

texts: I  use sendCloud API to track shipement so i want to use web hook to change the state of order  during deliver process so if you have any experince with that plezse provide me advices and thanks in advance


texts: Problem while calling "ShoppingCartInfo"

texts:
I am getting error while calling "shoppingCartInfo" magento api

SoapFault - faultcode: 'SOAP-ENV:Server' faultstring: 'Call to a member function setFinalPrice() on a non-object' faultactor: 'null' detail: null. Please let me know in which it occurs.


texts: Advice on closing orders that can not be viewed in a safe manner

texts:
In our order list, there are some which due to upgrading the payment
module can not be viewed and we are getting the error "The
requested Payment Method is not available". Considering that we already shipped the products regarding these orders, is it safe to delete them through sql query?  Or updating the order status in "sales_flat_order_grid" and "sales_flat_order"? what would be the best action?


texts: Magento Downloadable Products Link Expired

texts:
I have this situation.

I set max downloads to unlimited, and I got status Expired for this user.

Any ideas?

Thanks


texts: How to use custom variables in phtml file for email

texts:
I have created a Transactional Emails template in magento admin to send multiple coupon codes dynamically for this I have created a template file says email/custom.phtml and it is included in email template.

It is included in email template successfully but I am trying to add {{var code12}}, {{ var code13 }} etc. with multiple time but it is not working.

If I add these in direct email template in magento admin then it is working as I want but I want to create {{var}} also dynamically.

I am using below code for sending email :

$senderName = 'custom';
$senderEmail = Mage::getStoreConfig('trans_email/ident_general/email');

$emailTemplate = Mage::getModel('core/email_template')->loadByCode('Custom Template');;
$emailTemplateVariables = array();
$emailTemplateVariables['name'] = 'name';
$emailTemplateVariables['code12'] = 'AB56FFD';
$processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);
$mail = Mage::getModel('core/email')
        ->setToName('name')
        ->setToEmail('test@gmail.com')
        ->setBody($processedTemplate)
        ->setSubject('Coupon code')
        ->setFromEmail($senderEmail)
        ->setFromName($senderName)
        ->setType('html');
$mail->send();

My custom.phtml code is here :

##My shopping cart rule are product specific

<?php
$allProducts = array(10,20,30);
foreach($allProducts as $product_id)
{
    $product = Mage::getModel('catalog/product')->load($product_id);
    ?>

    <?php
    echo $product->getName();
    echo Mage::getModel('core/variable')->loadByCode('code12')->getValue('text');  // it is not working
    ?>
    {{var code12}}  // it is not working

    <?php
}
?>

And Transactional Emails template code is here :

...
{{block type="core/template"  name="email_custom" template="email/custom.phtml" }}
....

How to add custom variables in phtml file?


texts:
I use curl to call the web api to create a customer account according to the example here.

curl -X POST "http://local.magento/index.php/rest/V1/customers" \
     -H "Content-Type:application/json" \
     -d '{
    "customers": {
        "customer": {
            "email": "user@example.com",
            "firstname": "John",
            "lastname": "Doe"
        },
        "addresses": [
            {
                "defaultShipping": true,
                "defaultBilling": true,
                "firstname": "John",
                "lastname": "Doe",
                "region": {
                    "regionCode": "CA",
                    "region": "California",
                    "regionId": 12
                },
                "postcode": "90001",
                "street": ["Zoe Ave"],
                "city": "Los Angeles",
                "telephone": "555-000-00-00",
                "countryId": "US"
            }
        ]
    }
}'

It returns error as below.

{"message":"%fieldName is a required field.","parameters":{"fieldName":"customer"}}

What's wrong with it?


texts: Intended use for customer_note in tables

texts:
Whats the intended use for column customer_note that i find in a lot of tables.
Ex qoute, quote_address, sales_invoice, sales_order.

I'm going to add a comment field for customers on checkout, and this seem like an ok field to use instead of adding more fileds to the tables.

I can't find any use in CE but i guess it's used in EE?


texts: Magento: bundle item selected products view front end to separate box

texts:
I want to display all simple products of a bundle product without any select option (all simple products within the bundle product are required, hence the shop customer should not be able to choose between items in the bundle but s/he has to take all items within).

Can anyone direct me in how to accomplish this - or is there any extension available that would provide this functionality. Thanks.

Current and expected result in frontend:

I think a backend structure like this would be neat:


texts: Template Path Hints not accepting my IP address

texts:
I am currently having an issue with seeing my template path hints in 1.9.2.3 all of a sudden.

If I remove my IP address from the allowed IP's field (leaving it blank), then the template path hints show (not ideal!!). However, if I put in my current IP address, then the template path hints do not show (tried multiple browsers as well to double check).

Before anyone asks, yes I know how to turn them on an off and yes I've looked at all of the scopes.


texts: Page information and some modules not visible

texts: Due to malware attack I have changed the folder and file permission from 777 or 775 to 755 and 644. After this there are some modules and page section in CMS not working properly. I am not able to modify the page. Please help me out from this.


texts: Disable P.O. Box entry on Paypal Express?

texts: Is it possible to disallow orders shipping to PO Boxes when a customer is checking out using Paypal Express?


texts: Magento 2 How to store quote custom data into sales_invoice

texts:
I have created certain custom columns in quote, order, invoice and shipment tables and all the table columns are labeled with the same. Now i am able to store the data in quote and quote->order table successfully by now i want to store quote data to invoice table using observer-event when i generate invoice.

Need some help in achieving this.

Thanks


texts: Products missing from price index after order place

texts:
There seem to be many issues around the re-indexing of product prices on order placement. See the other issue re deadlocks which is related...
Price re-index causes DB deadlocks during checkout

I have reported this to Magento and they have replied that I should set indexing to Manual so that it is not run. However I don't see how this is a solution.

In addition to deadlocks, we also notice that some products are suddenly missing from the catalog_product_index_price table after being ordered. They are configurable products and they are in stock, however some of their simple products are not.

The problem is products no longer show up on the website if they don't have a record in product price.

How can I prevent this from happening?

Or why does price have to be reindexed at this time?

I don't think this is needed:

8 /var/www/html/app/code/core/Mage/CatalogInventory/Model/Observer.php(689): Mage_Catalog_Model_Resource_Product_Indexer_Price->reindexProductIds(Array)


texts: Input field for Shipping Method in Admin Order Create

texts: When we create admin order in Shipping Method, I would like to have an input field for shipping method similar to the payment methods like Purchase Order Number in the Purchase Order. (Check the image below)


texts: Magento 2 - How to add a new sort options in category page

texts:
I want to add a new sort options in the toolbar sorter. I want to add "price low to high" and "price high to low" in Sort By dropdown in product listing page.

I try to create a new module, I found this code but is not work:

app/code/Vendor/Module/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">

    <type name="Magento\Catalog\Block\Product\ProductList\Toolbar">
        <plugin name="custom_custom_block_toolbar" type="Vendor\Module\Plugin\Catalog\Block\Toolbar" />
    </type>

    <type name="Magento\Catalog\Model\Config">
        <plugin name="custom_catalog_model_config" type="Vendor\Module\Plugin\Catalog\Model\Config" />
    </type>

</config>

app/code/Vendor/Module/Plugin/Catalog/Model/Config.php

<?php

namespace Vendor\Module\Plugin\Catalog\Model;

class Config
{
    public function afterGetAttributeUsedForSortByArray(
    \Magento\Catalog\Model\Config $catalogConfig,
    $options
    ) {

        $options['low_to_high'] = __('Price - Low To High');
        $options['high_to_low'] = __('Price - High To Low');
        return $options;

    }

}

app/code/Vendor/Module/Plugin/Catalog/Block/Toolbar.php

<?php
namespace Vendor\Module\Plugin\Catalog\Block;

class Toolbar
{

    /**
    * Plugin
    *
    * @param \Magento\Catalog\Block\Product\ProductList\Toolbar $subject
    * @param \Closure $proceed
    * @param \Magento\Framework\Data\Collection $collection
    * @return \Magento\Catalog\Block\Product\ProductList\Toolbar
    */
    public function aroundSetCollection(
    \Magento\Catalog\Block\Product\ProductList\Toolbar $subject,
    \Closure $proceed,
    $collection
    ) {
    $currentOrder = $subject->getCurrentOrder();
    $result = $proceed($collection);

    if ($currentOrder) {
        if ($currentOrder == 'high_to_low') {
            $subject->getCollection()->setOrder('price', 'desc');
        } elseif ($currentOrder == 'low_to_high') {
            $subject->getCollection()->setOrder('price', 'asc');
        }
    }

    return $result;
    }

}

Maybe someone has fix this already and will be nice if he will share the solution with us.

Thank you


texts: Over ride the catalog product template in magento 2 not working

texts:
I am trying the magento 2 and over ride the product details template as follows:

app\design\frontend\Vendor\oppo\Magento_Catalog\templates\product\view/details.phtml

and added some code there but it is not working at it is still showing the the contents from the core module in

vendor\magento\module-catalog\view\frontend\templates\product\view/details.phtml

What is the right way to do so any guide.


texts:
what is the equivalent class of Mage_Core_Block_Text_Tag_Js in magento2?

class Mage_Core_Block_Text_Tag_Js extends Mage_Core_Block_Text_Tag
{

    protected function _construct()
    {
        parent::_construct();
        $this->setTagName('script');
        $this->setTagParams(array('language'=>'javascript', 'type'=>'text/javascript'));
    }

    function setSrc($src, $type=null)
    {
        $type = (string)$type;
        if (empty($type)) {
            $type = 'js';
        }
        $url = Mage::getBaseUrl($type).$src;

        return $this->setTagParam('src', $url);
    }

}


texts: What is the use of esconfig.xml found in the vendor\magento\module-elasticsearch\etc directory?

texts:
Does any one having any idea about esconfig.xml file exists in the vendor\magento\module-elasticsearch\etc directory?

As per name suggests, it looks like it is related with words configuration with ElasticSearch but can we configure max_clause and mapping related configurations in that file.

<?xml version="1.0" encoding="UTF-8" ?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Elasticsearch:etc/esconfig.xsd">
    <stemmer>
        <type>stemmer</type>
        <default>english</default>
        <de_DE>german</de_DE>
        <en_US>english</en_US>
        <es_ES>spanish</es_ES>
        <fr_FR>french</fr_FR>
        <nl_NL>dutch</nl_NL>
        <pt_BR>portuguese</pt_BR>
        <zh_Hans_CN>cjk</zh_Hans_CN>
    </stemmer>
    <stopwords_file>
        <default>stopwords.csv</default>
        <de_DE>stopwords_de_DE.csv</de_DE>
        <en_US>stopwords_en_US.csv</en_US>
        <es_ES>stopwords_es_ES.csv</es_ES>
        <fr_FR>stopwords_fr_FR.csv</fr_FR>
        <nl_NL>stopwords_nl_NL.csv</nl_NL>
        <pt_BR>stopwords_pt_BR.csv</pt_BR>
        <zh_Hans_CN>stopwords_zh_Hans_CN.csv</zh_Hans_CN>
    </stopwords_file>
</config>


texts:
I've recently started using the local.xml as my playground for layouts. Before I had my doubts using it because of...reasons.
I got to see it's advantages, but I hit a brick wall now.
In the default catalog.xml layout file there is a certain block (name not important). Using the layout.xml I added a generic child block to it where I want to place other blocks.

<reference name="not.important">
    <block type="core/text_list" name="extra.left.menu" as="extra" />
</reference>

So far so good.
But now, I have one extension that should add child block to the one declared above.
If I add this new block using local.xml it works nicely.

<block type="core/text_list" name="extra.left.menu" as="extra">
    <block type="myextension/some_block" template="some/template.phtml" as="some_name" name="some_name" />
</block>

But I don't want to do it via local.xml because this new extension might be disabled in the future. If I do it via local.xml and disable the extension it will flood my log files because the block does not exist anymore.
So in my extension layout file I add this:

<reference name="extra.left.menu">
    <block type="myextension/some_block" template="some/template.phtml" as="some_name" name="some_name" />
</reference>

But This way it does not work. I feel this happens because the local.xml file is loaded last, and I cannot add a module dependency so my extension layout file would be loaded after layout.xml.
How should I tackle this? Did I get something wrong?
Or if I want it like this I have to use the "good old way" of cloning catalog.xml in my theme and adding this new block in the catalog.xml of my theme?


texts:
We have been using Magento's REST/SOAP apis on version 1.7.0.2 and it is far from being performant for us. We constantly experience timeouts even with WSDL cache turned on especially if large data sets are involved.

After attending a Magento meetup I realized that we are not the only ones who experience these performance issues when it comes to the Magento API.

Are there any related optimizations we can take to speed up the Magento API other than not using the API?


texts: Magento 2: How to move amazon pay button on the checkout page down so it appears just before the Shipping Methods on the same checkout page

texts: This is the screenshot of the checkout page on my Magento 2 site using Argento luxury Theme. I am trying to move the Amazon Pay button down so the user may not have necessarily thought it is the only payment method offered


texts: Magento 2 Fedex Shipping Method Showing 0$ a lot of times

texts: I have integrated FEDEX Shipping in my Magento 2 Store. It was working till now. But suddenly from today It's showing a lot of 0$ options without any method name. Can anyone help me on this?


texts: my previous developer set the max quantity of purchase of determinated products to 1 and dont know how to fix it

texts: my problem is that my previous developer set the max quantity to purchase of determinated products ( with a especific attribute set) to max 1  and i dont know to change it to allow default quantity.thanks


texts: Creating Smart Categories With the Visual Merchandiser

texts:
I am currently trying to add a custom attribute to the visual merchandiser so that I can create a smart category from it.

However the attribute doesn't appear in the list on the merchandiser (Stores > Configuration > Catalogue > Visual Merchandiser). I have been informed that this may be due to the fact that the attribute in question can have multiple values selected for each product e.g the attribute recipient could have the values For Him, For Fathers and For Students for product X.

Could you please let me know how to get this attribute to appear in the visual merchandiser so that I can use it to make a smart category?


texts: How to parse session url from one store to another in Magento 1.9?

texts:
I have two stores.
Store A - Showing products as a catalog, unable to buy.
Store B - Able to buy for exclusive customers with a given login account.

That I want to do is, create a button on store A at product page called "Login and order". Clicking on this button will redirect the user to store B. Store B is configured in the way, that users can only access it if login.
Code for the URL link in view.phtml in Store A's template:

<?php
    $shopProId = $_product->getId();
    $shopProduct = Mage::getModel('catalog/product')->setStoreId(4)->load($shopProId)->getProductUrl();
?>
<a href="<?php echo $shopProduct; ?>">bestil

The url of the link looks like this: https://storeA.com/category/productname?SID=123456789&_storetitle

After clicking on the link, it will redirect the user to Store B and asked the user to login. The URL for the login page looks like this: https://storeB.com/customer/account/login/

But the problem is, the session was never passed, or it could maybe not be done like this. So after logging in, the website just redirected me to account dashboard. I also have change the status to "No" on System->Configuration->Customer->Customer Configuration > Login Options

I'm thinking this could maybe be done if modify the loginPostRedirect() function in AccountController.php?
But I have no idea how? Anyone have an example of how to do it?


texts:
I've got a problem in my M2.3.2 site which is affecting the customer login controls on the My Account page.

It's breaking the layout and I think it's being caused by core Magento css contained in vendor/magento/magento2-base/lib/web/css/docs/docs.css

The css is rendering a class from print css and the only place I've found it is

@media all and (min-width: 768px), print {
  .example-responsive-block {
    background: #ccf;
  }
  .example-responsive-block:before {
    content: 'Desktop styles ';
    font-weight: bold;
  }
}

on the front end of the website and I'm not sure that

@media all and (min-width: 768px), print {

is how to write css ANDs

Any ideas anyone?


texts: Add directory structure in (frontend)module

texts:
I'm creating a module. This all works fine. Put the thing is that I can access my module using: "/userproducts". But I don't know how to add a 'directory' structure so that I can use: "/userproducts" and "/userproducts/ajax"?

That I can have (besides the public function indexAction() ) something like: public function ajaxAction()

config:

<config>
    <global>
        <modules>
                <TEST_Userprods>
                        <version>0.1.0</version>
                </TEST_Userprods>
        </modules>
    <blocks>
        <userprods>
            <rewrite><userprods>TEST_Userprods_Block_Userprods</userprods></rewrite>
        </userprods>
    </blocks>
    </global>
        <frontend>
            <routers>
                <userprods>
                    <use>standard</use>
                    <args>
                          <module>TEST_Userprods</module>
                          <frontName>userproducts</frontName>
                    </args>
                </userprods>
            </routers>
        <layout>
            <updates>
                <userprods>
                      <file>userprods.xml</file>
                </userprods>
            </updates>
        </layout>
        <translate>
            <modules>
                <translations>
                    <files>
                        <default>TEST_Userprods.csv</default>
                    </files>
                </translations>
            </modules>
        </translate>
    </frontend>
</config>

Indexcontroller:

class TEST_Userprods_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
     $this->loadLayout(array('default'));
     $this->renderLayout();
    }
}


texts: An error occurred while saving the attribute set. magento 1.9.1

texts:
I am trying to save to attribute in attribute set but getting error like

  An error occurred while saving the attribute set

can anyone help.

In Exception Log file getting below error

  Exception message: SQLSTATE[23000]: Integrity constraint violation:
  1062 Duplicate entry '0' for key 'PRIMARY', query was: INSERT INTO
  eav_attribute_label (attribute_id, store_id, value) VALUES (?,
  ?, ?)


texts:
For example, in dashboard, I have a model edit form to edit the model which complete by UI component.

Now, I want add a dynamic link field in the edit page. Which is a link like .../admin/model-child/index/index/?id=(model_id), when click it navigate us to a dashboard page which show the model child listing. How to achieve that?

The difficult points is

How to add the custom link field.
How to put the dynamic model_id in the model-child link.

More general question is:

How to add a dynamic content in a admin page?


texts: Magento Wishlist product add not working

texts:
I am using this code for add product in customer wishlist. For first product it is working properly but when I try to add second product, it replace the first product in wishlist.

function addfavourites($customerId, $storeId, $productId)
    {
        /*************** Add wishlist - Start *****************/
        $arrProductIds = array();
        if ($customerId && $productId) {
            try {
                $wishlist = Mage::getModel('wishlist/wishlist')->loadByCustomer($customerId, true);
                $product = Mage::getModel('catalog/product')->load($productId);

                if (!$product->getId() || !$product->isVisibleInCatalog()) {
                    $responseData = "Cannot specify product.";
                    return array('status' => 0, 'msg'=> $responseData);
                }

                if ($storeId!='') {
                    $product->setStoreId($storeId);
                } else {
                    $product->setStoreId(1);
                }
                $params = array('product' => $productId, 'qty' => 1, 'store_id' => $storeId);
                $request = new Varien_Object();
                $request->setData($params);
                $request->setStoreId($storeId);
                $result = $wishlist->addNewItem($product, $request);
                $resultWishListId = $result['wishlist_item_id'];
                if (is_string($result)) {
                    Mage::throwException($result);
                }
                $wishlist->save();
                $responseData = 'Product added in favourites successfully.';
                return array('status' => 1, 'msg'=> $responseData, 'resultWishListId'=>$resultWishListId);
            } catch (Exception $exception) {
                $responseData = $exception->getMessage();
                return array('status' => 0, 'msg'=> $responseData);
            }
        } else {
            $responseData = 'Please enter customerId.';
            return array('status' => 0, 'msg'=> $responseData);
        }
        /*************** Add wishlist - End *****************/
    }


texts: Magento 2 - How to add custom attribute in knockout "data-bind="html: 'Product Attribute : ' + product_sku "

texts:
I want to show my custom attribute on the wishlist sidebar section, how to add my custom attribute "brand & Size" attributes into this,
eg:

Brand is my attribute, its not showing,

price is showing, how to display my brand attribute.
I want to add attribute : brand & size


texts: I need to get product image path with raw sql. Where does Magento store product image cache path? Table catalog_product_entity_media_gallery stores images but without the cache path (/2/0/20.jpg).


texts: CSS resets to start point after flush a cache

texts:
Ok, this is weird.

I bought a template, and when I change something in the CSS, and after flush the cache, or make some changes in the blocks, the CSS gets reset!

I thought changing the permissions would do the trick, but I was wrong.


texts: Magento 2: FedEx Freight setup for packages over 150lbs

texts:
We are using FedEx as shipping method and have products which are more then 150lbs. So, according to this, we need to use FedEx Freight (Allowed Methods: Freight). We contacted FedEx support and this method is already allowed/included into our FedEx account. But problem is when we add product with 150lbs weight or more, there are no shipping methods to choose. We got "Sorry, no quotes are available for this order at this time". Otherwise, if we add to cart product with less then 150lbs everything shows up normally. FedEx shopping methods setup is more/less default one.

We are using Magento 2.1.16

Does anyone have any clue how to make it (Freight) appear on storefront when we add to cart products with more then 150lbs weight?

Thanks in advance


texts: uiComponent popup with form in Magento 2 front in product detail page

texts:
I want to add custom form in popup with a few custom fields before the product gets addtocart.

Once the user clicks on addtocart button it will open popup and ask for a few inputs after fill-up those inputs it will allow the user to add product in the cart. I want to make it using uiComponet.

Can anyone have any hints?


texts:
A question that one would expect to find the answer to... But except for cron settings etcetera I can't find it.

Question: "How to import currency rates via shell"?


texts: Magento 2.1 js errors break backend - wrong paths in magento-ui?

texts:
// EDIT:

  This error was caused by the Firebug extension in Firefox.

  I would recommend anyone that uses this ext to disable and remove it
  immediately!

From a fresh composer setup, I receive a lot of js errors in both the backend and frontend. In the backend this actually breaks the navigation, does not load the products or order grid, so pretty much completely breaks the backend.

I tried 2.1.0 and 2.1.1, both seem to have the exact same issues. 2.0.7 did not have these issues. No extra modules installed, just a clean, fresh composer setup. I tried deleting cache dirs and re-deploying the static-content, making sure the user and file permissions are correct, but the missing files are never generated. The browser cache was flushed and pages force reloaded:

BE errors:

404 Not Found:

/pub/static/adminhtml/Magento/backend/en_US/Magento_Ui/js/lib/registry/bindings.js
/pub/static/adminhtml/Magento/backend/en_US/Magento_Ui/js/lib/registry/dom-observer.js

and sometimes:

/pub/static/adminhtml/Magento/backend/template/renderer.js

JS:

TypeError: ko is undefined (knockout-es5.js (line 428, col 5))
ko.track = track;

TypeError: utils.extend is not a function (class.js (line 129, col 30))
child.defaults = utils.extend({}, parent.defaults || {});

These .js files are never even created in the above path in the magento-ui.

instead I think the files now reside in js/lib/view/utils/ instead of js/lib/registry/. So the error may be in the Magento magento/module-ui version 100.1.0.

FrontEnd:

404 errors:

/pub/static/frontend/Magento/luma/en_US/Magento_Ui/js/lib/registry/bindings.js
/pub/static/frontend/Magento/luma/en_US/Magento_Ui/js/lib/registry/dom-observer.js

However, the FE errors dissapear after a few reloads, sometimes at least?

other error is the same as in the BE:

TypeError: utils.extend is not a function ( class.js (line 129, col 30) )
child.defaults = utils.extend({}, parent.defaults || {});

I have not been able to find any bug reports on this and no fixes.

Test System:

Docker container Debian 8
Server version: Apache/2.4.10 (Debian)
PHP 5.6.24
MySQL Community Server 5.6.32


texts: Why is the full page cache disabling block cache?

texts:
I have a static part which is included on every page (navigation), but takes long to generate. That is why I have set a cache lifetime and a static cache key.

Works fine, until FPC is enabled. Then the block is still generated again for a newly called page and not served from the block cache.

There is this line in Enterprise_PageCache_Model_Observer:

Mage::app()
    ->getCacheInstance()
    ->banUse(Mage_Core_Block_Abstract::CACHE_GROUP); // disable blocks cache

What is the reason for this? It makes sense to me to still cache certain blocks, even if FPC is on - because otherwise generation of pages which are not fully served from the cache are slowed down.

What is the design decission behind that?
What is a good solution around that?
Would it be harmful if I just remove this block cache banning?


texts: Magento2 How to pass argument parameters with multiple class

texts:
How to pass argument  Parameter configuration inheritance in using theme module inside di.xml

here one thing  in our theme inside header file inside define code below

<?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); ?>
<?php $customerSession = $objectManager->create('Magento\Customer\Model\Session'); ?>
<?php $customerUrl = $objectManager->create('Magento\Customer\Model\Url'); ?>

here is one for this argument inside pass it "Magento\Customer\Model\Session" and second is "Magento\Customer\Model\Url" so after pass to argument inside how to define in constructor inside and call to phtml inside if any idea reply me
but i need to not used object manager through customer url and session get


texts:
I've got a countdown timer that shows one thing before 2pm and another for after 2pm. I need to now add something else that shows something else on the weekend and hides the first part. Here is what I have so far:

<?php if ($_product->getAttributeText('select_program') == "Yes"): ?>

    <?php date_default_timezone_set('America/New_York'); ?>

    <?php

    /* This sets the $time variable to the current hour in the 24 hour clock format */
    $time = date("H");
    /* Set the $timezone variable to become the current timezone */
    $timezone = date("e");

    if ($time >= "8" && $time <= "14") {
        echo $this->getLayout()->createBlock('cms/block')->setBlockId('countdown-products')->toHtml();
    } else

    if ($time >= "15" && $time < "23") {
        echo $this->getLayout()->createBlock('cms/block')->setBlockId('countdown_tomorrow')->toHtml();
    }
    ?>

<?php endif ?>

<?php if ($_product->getAttributeText('cd_select_program') == "Yes"): ?>
    <?php
    if(date('D') == 'Sat' || date('D') == 'Sun') {
      echo $this->getLayout()->createBlock('cms/block')->setBlockId('countdownSatSun')->toHtml();
    }
    ?>
<?php endif ?>


texts: Unable to add Downloadable Product in Magento 1.7

texts: I am not able to add Downloadable Products. When I am going to ADD Product then in the dropdown all the options displaying except Downloadable Product. Also in the main admin panel under the SYSTEM menu Magento Connect option is not showing. It was all displaying 3 days ago. But suddenly what happens I could not understand. Please help. I am using Magento 1.7


texts: Get shipping methods from address in multi-address shipping

texts:
I am trying to merge Addresses and Shipping information tabs of multi-address shipping in one step. I have the addresses dropdown, when I select any address option I want to get the Shipping methods associated with that address. How to do it?

I have already wrote ajax when address is changed, it will call the function where I have to get all the shipping methods and then echo all the shipping methods to display in the dynamic div.

I have quote id, product id, item information, address information. How to get shipping methods from it?


texts: How To Translate Checkout Card Field Labels

texts:
I've created a translate.csv in my theme folder and confirmed working.

However, it's not working for labels that contain special characters.

I'm looking to change the wording for the following labels:

Credit/Debit Card Type
Credit/Debit Card Number
Security Code (CVV)

As mentioned Name on Card and Expiration Date work fine.

I'm assuming it is the special characters causing the issue (the "/" and "()")

Any ideas?

Thanks.


texts: How to clean up all the Product Recommendation logs?

texts:
How to clean up all the register that I have in my database related to the Product Recommendation logs?
Is it something that I can do from my side?


texts: Sending a welcome letter email next to the normal invoice email

texts:
After a customer has purchased a product from our Magento shop, he receives the invoice via email. That is working well.

Now I want to send another email, a "welcome letter", to the same email address if the customer has purchased a product of a certain category.

My question: Is there a built-in way (i.e. without PHP coding) to achieve that, tied to a product category or alike?

If not, what would be the easiest way to achieve that via PHP coding?


texts: Magento 2 - Setting orders to "complete" automatically after placing an order?

texts:
I'm trying to set the order status of new orders to "complete" after a new order has been placed but can't see how this is done in the Magento backend.
I can't select the "complete" status as default for any payment methods I'm using.
Any idea on how to do it?


texts:
I have created a store in magento.Order confirmation mails are not sending to customers or admin.

What i am missing please advice


texts: Magento: create order programatically: Configurable product issue

texts:
I am trying to create order programmatically.

There are configurable products having single base attribute i.e. Size. and some of configurable products have multiple (more than one) associated product having same size value.

Now, attempting to add such configurable product with particular size. But magento assigns the sibling/child/associated product which would encountered first! :( and Hence, deserving SKU/sibling dropped to create order with.

I followed code from below links:

http://www.blog.plazathemes.com/archives/2149

http://pravams.com/2011/11/11/magento-create-order-programmatically/

Is there any way to add config product with particular SKU ? (something like; acceptable parameters in "addProduct" method etc..).

Please, help me on this asap as I stuck since longer time and still couldn't get any solution. :(

--

Div, Thanks in advance!!


texts: For PayPal 2016 security roadmap, Can we expect a patch from Magento?

texts:
IPN Verification Postback to HTTPS

Magento is using  https://www.paypal.com as a postback url for IPN, but PayPal’s recommendation is ipnpb.paypal.com (http://screencast.com/t/pbGcUDXw)
As per the goal of this section Magento is already using the https url, but for PayPal’s recommendation can we expect a patch from Magento?


texts:
I imported a product, its sku and url_key is "my-product". Now, when I open the product in my browser, like that:

www.whatever.com/my-product

It always redirects to

www.whatever.com/my-product-1234

where 1234 is the products id. Why is that? Where does it come from? The product looks ok in admin.

Thanks!


texts:
It's possible for Magento to automatically add a sticker or flash animation that says ''new'' on a product. And if it is, can it automatically remove this sticker after a period of time?
hope my question is understandable.


texts: Magento 2.4.1 EE checkout and cart page blank with 400 products

texts: In magento2.4.1 EE I have added 400 products to cart. I click on proceed to checkout, getting blank page and cart page is also blank. My php_value memory_limit 756M php_value max_execution_time 18000 in .htaccess.


texts: How to migrate my database using another crypt key?

texts:
I have two Magento 2 stores, I'd like to create a database dump and import it into my second store, which uses a different crypt key.
When I do it, I see this issue below running bin/magento setup:upgrade.
Type Error occurred when creating the object: Magento\Framework\Locale\Resolver

How could I do it with no core changes?


texts:
Image path -> app/design/frontend/Mycustom/Mytheme/web/image/one.png how to get image in PHTML (app/design/frontend/Mycustom/Mytheme/Magento_Search/templates/form.mini.phtml) file,
<?php  echo __('Search');?>

I need to show image instead of text Search, any help thanks.


texts: How to get custom product attribute(programatically created) drop down values in a phtml in magento 2?

texts:
Created a custom product attribute by programmatically.
Now, I need to get the drop down option values in a phtml page.

$seriesname  =   $child->getAttributeText('series');

$values =   $product->getResource()->getAttribute('series')->getFrontend()->getValue($product);

$_attributeValue = $block->getProduct()->getResource()->getAttribute('series')->getFrontend()->getValue($block->getProduct());

Used the above three methods, but I didn't get all the values. I only get 'Select Option'. It has three option values, option1, option2, option3


texts: Magento 1.8 Product Sorting by Price not uniform for Single and Configurable products?

texts:
Take a look at http://goo.gl/N2ZzzZ

If I do a sort by price, ASC or DESC, the product sorting is all over the place (just compare the $ values).

Probably because some of the products are single products and some are configurable with multiple products defined within them.

I think Magento takes the highest priced product in those configurable products and then uses that for the sort, but if I order the products from min to max then that is all off.

Any idea if this can be fixed somehow?


texts: Why V1/guest-carts/{cart-Id}/ PUT api is not move guest cart item to customer cart in magento-2.2.7?

texts: I want to move guest cart item into customer cart by using this [PUT] /V1/guest-carts/{cart-Id}/  . But it give {"message": "Cannot assign customer to the given cart. You don't have permission for this operation."}. Why it can't move item to customer cart. Please help me to solve it.


texts: Unable to know magento version installed

texts:
I have installed Magento 2.3 using composer, now in admin, I cannot see Magento version it show as below :

  Magento ver. No version set (parsed as 1.0.0)

EVeI i tried running below command from putty same issue there also

php bin/magento --version

  Magento CLI No version set (parsed as 1.0.0)


texts:
A UK-based shop I look after ships products worldwide. For anything under 2kg they use Royal Mail which have prices by weight across 4 shipping zones, so I have just used a simple lookup table.

For anything over 2kg, the shop would send via courier, and although couriers charge by weight, the final cost could be vastly different depending on which country they are shipping to.

It seems that couriers do not price by shipping zone, but instead price by weight and the specific country. What is the best way of getting the shipping price accurate?

Is there such a thing as an extension which will take the weight and shipping address, send the details to a shipping company, and return a shipping cost to charge to the customer?

If this is not possible, how are other people tackling this issue so that they do not under-charge for international shipping?


texts: Add Custom Value Besides Price Recently Viewed Products

texts: Recently viewed products data is showing using Knockout, How can I add my custom dynamic value (PHP value) besides price as shown in image?


texts: Magento 2: Internal error : Huge input lookup when Configurable Product on click edit

texts:
I added one configurable product with 2000 variations so when i click on edit main product to view in admin page return

Warning: DOMDocumentFragment::appendXML(): Entity: line 1: parser error : internal error: Huge input lookup in /var/www/html/test1/vendor/magento/framework/View/TemplateEngine/Xhtml/Template.php on line 60

so please help me, It is serious problem.


texts: Magento 2 dashboard diagram Revenue,tax,shipping 0

texts:
there are 66 order completed in order list,but  Revenue,tax,shipping are zero
i clicked reload data and refresehd statics but still not wokring.
Pls help me


texts:
I have managed to successfully install Magento 2 with a downloaded theme after many hours of struggling... Now I'm facing the symlink issue.

I've installed everything, php intl extension, grunt, nodejs but when I use "grunt exec:claue" it will delete all the files in the theme folder and only creates a symlink to "custom.less" (the file I've added to load in the header via default_head_blocks.xml). Then I got this in the css folder:

After that I have to run "php bin/magento setup:static-content:deploy nl_NL" to get all the other files deployed, but what I got then is this:

You can see that only the "custom.less" is a symlink to the original file...

I'm in Developer mode so I really don't know anymore what I can do. I just need the "custom.css" to be a symlink also to make some customizations to the styling.

Version: Magento 2.1.7

Regards,


texts:
I have a question about the number of Rows for one Attribute Code.
I have 3 Store View, can I create an Attribute with 500 Rows with different option for each Store View? Or this will create problems (performance etc).
Thanks for your answers.


texts: cannot get session value in different events

texts:
I'm using two different events controller pre dispatch and controller post dispatch.I have set customvalue using  catalogsession in predispatch event and try to get the value in post dispatch event.but the session value  returns null.If I try to get value in  predispatch event.It returns correctly.
predispatch observer
protected $registry;

protected $request;

protected $catalogSession;

protected $filterValue;

protected $context;

public function __construct(
    \Magento\Catalog\Api\ProductRepositoryInterface $productRepository,
    \Magento\Catalog\Model\ProductFactory $productFactory,
    \Magento\Framework\View\Element\Template\Context $context,
    \Magento\Framework\App\Request\Http $request,
    \Magento\Catalog\Model\Session $catalogSession,
    Registry $registry
) {
    $this->productRepository = $productRepository;
    $this->registry = $registry;
    $this->productFactory = $productFactory;
    $this->context = $context;
    $this->request = $request;
    $this->catalogSession = $catalogSession;

}

public function execute(\Magento\Framework\Event\Observer $observer)
{
    $full_action_name = $this->request->getFullActionName();

    if ($full_action_name != 'catalog_category_view') {
        return;
    }
    $param = $this->request->getParams();
    unset($param['mAjax']);
    $ab =$this->catalogSession->setFilter($param);
   var_dump($ab);
   return $this;

post dispatch observer
protected $request;

private $registry;

protected $context;

protected $catalogSession;

protected $FilterCookie;

public function __construct(
    Registry $registry,
    \Magento\Framework\App\Request\Http $request,
    \Magento\Framework\View\Element\Template\Context $context,
    \Magento\Catalog\Model\Session $catalogSession,

)
{    $this->request = $request;
    $this->registry = $registry;
    $this->catalogSession = $catalogSession;
    $this->context = $context;

}

/**
 *
 * @param \Magento\Framework\Event\Observer $observer
 * @return void
 */
public function execute(\Magento\Framework\Event\Observer $observer)
{
    /** @var \Magento\Framework\App\Action\Action $controller */
    $full_action_name = $this->request->getFullActionName();

    //$layout = $observer->getEvent()->getLayout();
    if ($full_action_name != 'catalog_category_view') {
        return;
    }
   $a =  $this->catalogSession->getFilter();
 var_dump($a); exit();


texts: Without extension can I add configurable product to cart?

texts: I have Magento 1.7 and whenever I add a configurable product to cart it instead adds the simple parent product with the simple product price as well. I've read a bunch of posts with people doing the opposite if possible I would want to do this without an extension.  Anyone else have a similar problem?


texts:
I downloaded magento2.3 from Magento.com website and extracted to "/var/www/html/mg" but on 127.0.0.1/mg i just see blank page.(white page with no error on console)

My PHP version is 7.2.x and Apache version is 2.4.
All PHP extensions are installed too.

I can install it from composer command line but still i can't see anything on front. also tried to "index.php" before pages but still doesn't work.

I think that it is because of mod_version of Apache2, but i don't know how to install it (.so)


texts: product ids separate with # on success page

texts:
I'm facing problem, need to show product ids separated with # on Magento success page

like:

shop_product_ids =‘#234#w475xk#5402#’;

How to handle it on Magento 1.9 success page.
Can anybody let me know how to make this loop and properly format ids separated with #


texts:
After I upgraded my magento store from 2.2.5 to 2.3.0 the CSS of the website is not displayed and I get an error when I run this:

php bin/magento setup:static-content:deploy -f

The error is:

Compilation from source: /htdocs/vendor/magento/theme-frontend-blank/web/css/styles-m.less
Operation on an invalid type in _typography.less in _utilities.less in _module.less

My system.log file displays these errors:

main.ERROR: Operation on an invalid type in _typography.less in _utilities.less in _module.less
main.CRITICAL: Operation on an invalid type in _typography.less in _utilities.less in _module.less

Do you have any suggestions?

Thanks


texts:
Magento 2 has the concept of Plugins/Interception/Interceptors opposed to Magento 1.
These act like a before|after the event for every public method. Which is nice.
You can also use the around plugin in order to replace the functionality of a method.
But Magento 2 still offers the possibility of rewrite classes more or less the M1 way.
I would like to see some examples where rewriting classes are the way to go instead of using plugins.
I know this is useful when you want to change the behavior of a core protected method, but are there other cases where a rewrite is recommended or needed?


texts: PayPal gateway has rejected request Magento

texts:
I am using Magento 1.9 and I get this error when I click on PayPal method.

PayPal gateway has rejected the request. ReturnURL is invalid (#10471: Transaction refused because of an invalid argument. See additional error messages for details). CancelURL is invalid (#10472: Transaction refused because of an invalid argument. See additional error messages for details).
Here is my site link: http://dashmarine.com/Index.php/
Here I have a product 'bike' (please search in that search field so you will find)

Maybe this Index.php is a problem because I can not remove this from url.
I tried to remove from backend but giving an error because rewrite module is not configured very well on my server. so hope this will not be a problem.

But Same PayPal account I integrate on another website which is from godaddy https://www.santebarley-uae.com/ is working very well.

Thanks in advance.


texts: Magento 2 : Display custom field (customer attribute) in "checkout register" form

texts:
I want to add new field (customer custom attribute) to the checkout register form.

Items already created:

Customer attribute
Source model for customer attribute
Display field in adminhtml customer form
Display field in customer account create form
Display field in customer account edit form

Now I need to Display this field as selection (from source model) in "checkout register" form

Could anyone help me !!


texts: Error on cancelling order (PayPal gateway has rejected request. Authorization is voided (#10600: Authorization voided))

texts:
I needed to cancel an order on my site but. when I clicked cancel I get this error message

PayPal gateway has rejected request. Authorization is voided (#10600: Authorization voided)

The PayPal payment has been cancelled but the Order status will not update to cancelled.

Whats going here?


texts: Magento 2 - Get name of templates block from .phtml file

texts:
Is it possible to get the block name of the current template?
For example I added a block to catalog_product_view.xml:
<block class="Magento\Contact\Block\ContactForm" name="firstname"
       template="Company_Contact::forms/partials/fields/firstname.phtml">
    <arguments>
        <argument name="required" xsi:type="boolean">0</argument>
    </arguments>
</block>

How can I get the name of the block (firstname) inside the template .phtml file?
I tried:
<?php

$name = $block->getName();   // Output -> empty     Expected: firstname


texts: Magento 2 Export Button CSV and XML Catalog Product Problem

texts:
I added Export Button to the grid catalog but still the following problem appears :

Exception #0 (Magento\Framework\Exception\LocalizedException): A joined field with this alias is already declared.

Exception #0 (Magento\Framework\Exception\LocalizedException): A joined field with this alias is already declared.
#0 /var/www/magento/magento2/sandbox/var/generation/Magento/Catalog/Model/ResourceModel/Product/Collection/Interceptor.php(947): Magento\Eav\Model\Entity\Collection\AbstractCollection->joinField('qty', 'cataloginventor...', 'qty', 'product_id=enti...', '{{table}}.stock...', 'left')
#1 /var/www/magento/magento2/sandbox/vendor/magento/module-catalog-inventory/Ui/DataProvider/Product/AddQuantityFieldToCollection.php(27): Magento\Catalog\Model\ResourceModel\Product\Collection\Interceptor->joinField('qty', 'cataloginventor...', 'qty', 'product_id=enti...', '{{table}}.stock...', 'left')
#2 /var/www/magento/magento2/sandbox/vendor/magento/module-catalog/Ui/DataProvider/Product/ProductDataProvider.php(88): Magento\CatalogInventory\Ui\DataProvider\Product\AddQuantityFieldToCollection->addField(Object(Magento\Catalog\Model\ResourceModel\Product\Collection\Interceptor), 'qty', NULL)
#3 /var/www/magento/magento2/sandbox/vendor/magento/module-ui/Component/Listing/Columns/Column.php(116): Magento\Catalog\Ui\DataProvider\Product\ProductDataProvider->addField('qty')
#4 /var/www/magento/magento2/sandbox/vendor/magento/module-ui/Component/Listing/Columns/Column.php(69): Magento\Ui\Component\Listing\Columns\Column->addFieldToSelect()
#5 /var/www/magento/magento2/sandbox/vendor/magento/module-ui/Component/MassAction/Filter.php(168): Magento\Ui\Component\Listing\Columns\Column->prepare()
#6 /var/www/magento/magento2/sandbox/vendor/magento/module-ui/Component/MassAction/Filter.php(166): Magento\Ui\Component\MassAction\Filter->prepareComponent(Object(Magento\Ui\Component\Listing\Columns\Column))

......


texts: What is the usage of 'gallery' attribute and how it differs from 'media_gallery'

texts:
gallery is a default attribute which ships with Magento along with media_gallery, image, thumbnail and small_image. These attributes are grouped under Images.

But what is the real use of gallery attribute ? We can find specific usage of all other attributes in Magento, but which is not the case of gallery attribute.

So I would like to get answer of :

What is the usage of gallery attribute ?
How it differs from media_gallery attribute ?

Edit

This question is totally different from this, because it is about an import issue. But  here I am asking typically about the usage of a product attribute gallery.


texts: External script - Detect if user has an active admin session

texts:
I would like to detect if the user has an active admin session via an external script. I have the below code but the security issue with this is that someone could simply copy the cookie from one PC to another and it will still evaluate. Can anyone suggest another way of doing this

include('app/Mage.php');
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
error_reporting(E_ALL | E_STRICT);
Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
ob_implicit_flush (1);

$sesId = isset($_COOKIE['adminhtml']) ? $_COOKIE['adminhtml'] : false ;
$session = false;
if($sesId){
    $session = Mage::getSingleton('core/resource_session')->read($sesId);
}
$loggedIn = false;

if($session)
{
    if(stristr($session,'Mage_Admin_Model_User'))
    {
        $loggedIn = true;
    }
}
var_dump($loggedIn);


texts: Magento 2 : How to restrct field to be update in model?

texts:
I have a field in admin from which only be change at the time of new record.
On the form edit, I want to show that field as editable but don't want to save the changes.
For that, I have created the beforeSave method in resource model.
protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object)
{
    if ($object->getId()) {
        // how will I prevent specific field to update here
        // or reset a field to it's old value
    }
    return parent::_beforeSave($object);
}

Let suppose the field is email. Then code should be something like

protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object)
{
    if ($object->getId()) {
        $object->setData("email", "OLD_EMAIL");
        $object->("Reset Email Changes");
    }
    return parent::_beforeSave($object);
}

I know that I can use registry and get current model which was set from Edit controller and modify data in Save controller but I want know "is there any way to achive it in beforSave


texts: Displaying different currencies for a single product

texts:
I want different base price for different currency, by default Magento converts the price based on currency ratio what we provide.
I have such requirements that I want to enter different price for different currency for each product.

Example
Product A  10 Euro, 5 Dollar, 100 Rupees
Product B  15 Euro, 9 Dollar, 500 Rupees

How to achieve this.

Please help.

Thank You


texts: I want to ask if it is possible (with modules?) to get multiple shops running with just one frontend? So I can have say 5 companies selling all their products in one onlineshop - that is maybe more attractive for customers.


texts: Magento Crossell also include out of stock

texts:
I want to include out of stock products, to my cross sell list.
Currently only products in stock are displayed.

How can I change this, so that out of stock products are included?


texts: Getting order items + custom product attributes and sum up by totals per product?

texts:
Magento 1.9
I want to get the sku, the name the custom attribute xyz (id = 425) and the totals purchased for each of the products found. This is what I came up with, but it seems to be running forever, whats wrong?
    select
    sfoi.sku,
    sfoi.name,
    (
        SELECT
            value
        FROM
            catalog_product_entity_varchar
        where
            attribute_id = 425
            and entity_id = (select product_id from sales_flat_order_item where sku = sfoi.sku limit 1) limit 1
    )
    as "xyz",
    sum(sfoi.row_total_incl_tax) as "Total"
from
    sales_flat_order_item sfoi group by sfoi.sku


texts: Magento2: How to create and delete cookies

texts:
I've followed this question but set method mentioned there is outdated (Reference: Magento\Framework\App\PageCache\FormKey::set()).

So, a cookie is created like this:

public function set($value, PublicCookieMetadata $metadata)
{
    $this->cookieManager->setPublicCookie(
        self::COOKIE_NAME,
        $value,
        $metadata
    );
}

Where $metadata should be an instance of PublicCookieMetadata.

In one of the plugin I'm using $this->customerCountry->set('India', 10); I know I'm doing wrong here. Instead of passing 10 as the second parameter I need to pass instance of PublicCookieMetadata. How I can do that? I've tried $this->customerCountry->set('India', PublicCookieMetadata $metadat =null); which seems to be wrong. How I can creat and set duration of the cookie?


texts: How can i get different new products store wise?

texts:
I am getting same new products in my all store, i am using TATVA SOFT Catalog Extensions Configuration.

{{block type="catalogextensions/newproduct_home_list" name="newproduct_list" category_id="2276" template="catalogextensions/home_newproduct.phtml"}}

And this is my block code which i added in static block for assign different store, even i have added category_id="2276" for different store different id. But displaying same products in all store.

Please guide me how can i solve this ! Here is the site link.

<?php

/*

 * To change this template, choose Tools | Templates

 * and open the template in the editor.

 */

/**

 * Description of List

 *

 * @author om

 */

class Tatva_Catalogextensions_Block_Newproduct_Home_List extends Tatva_Catalogextensions_Block_Newproduct_List

{

    protected function _getProductCollection()

    {

        parent::__construct();

        $storeId    = Mage::app()->getStore()->getStoreId();

        $todayDate  = Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);

        $products = Mage::getModel('catalog/product')->getCollection()

            ->addAttributeToSelect('*')

            ->addStoreFilter($storeId, false)

            ->addAttributeToSort("entity_id","DESC")

            ->addAttributeToSelect(array('name', 'price', 'small_image'))

            ->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInSiteIds())

            ->setOrder($this->get_order(), $this->get_order_dir());

        if(Mage::getStoreConfig('catalogextensions/config4/max_product'))

        {

            $products->setPageSize(Mage::getStoreConfig('catalogextensions/config4/max_product'));

        }

        Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);

        Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);

        Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($products);

        $this->_productCollection = $products;

        return $this->_productCollection;

    }

    function get_prod_count()

    {

        //unset any saved limits

        Mage::getSingleton('catalog/session')->unsLimitPage();

        return (isset($_REQUEST['limit'])) ? intval($_REQUEST['limit']) : 9;

    }// get_prod_count

    function get_cur_page()

    {

        return (isset($_REQUEST['p'])) ? intval($_REQUEST['p']) : 1;

    }// get_cur_page

    function get_order()

    {

        return (isset($_REQUEST['order'])) ? ($_REQUEST['order']) : 'position';

    }// get_order

    function get_order_dir()

    {

        return (isset($_REQUEST['dir'])) ? ($_REQUEST['dir']) : 'desc';

    }// get_direction

        public function getToolbarHtml()

        {

        }

}


texts: Magento 2.2.1,In admin The store view functionality not display on header

texts:
I can not switch the store view from admin because there is missing store view functionality.
Please see the screenshot. And let me know how to resolve?


texts:
I am trying to get the registry but its always returning null and i dont know why

class Extension extends \Magento\Framework\View\Element\Template  {

        protected $_urlBuilder;
        protected $_storeManager;
        protected $productRepository;
        protected $_coreRegistry;
        public function __contruct(

            \Magento\Framework\UrlInterface $urlBuilder,
            \Magento\Framework\Registry $registry,
            \Magento\Store\Model\StoreManagerInterface $storeManager

        ){

            $this->_urlBuilder = $urlBuilder;
            $this->_storeManager=$storeManager;

            $this->_coreRegistry = $registry;

        }

    const ICON_EXTENSION = '.gif';
    const URL_ICON  =  'images/productextension/';

public function getProduct()
{
    return $this->_coreRegistry->registry('current_product');
}

Why is my registry null?


texts: CMS Block Cache issue with included dynamic template

texts:
I've seen lots of issues with CMS block caching in Magento 1.9.2.0 and have an issue where I've created a static block that loads the current category ID and then displays variables that have a matching name as the category (as well as a few other flags)

this means that the same static block can be displayed on multiple pages, without having to create multiple instances

The problem:

with block html cache enabled, the block displays correctly on the first page that is viewed. If however you navigate from the first category page to another that calls the same cms block (which should display new variables), the block you just viewed is displayed on that second category page

I've tried using the recommended Rkt cache fix, however I suspect that because I'm re-using the block dynamically that it will always have the same block id and therefore the fix will not work.

The CMS Static Block contains {{block type="core/template" template="template/category-block.phtml"}} which calls the custom phtml file. It uses category ID to find the variables.