How to fix Magento custom patch throws an error while patch applied?

Magento applies a custom patch with a command line, composer -v install throws an error,

[TypeError]                                                                                                                 
  Composer\Util\RemoteFilesystem::copy(): Argument #1 ($originUrl) must be of type string, null given, called in /var/www/ht  
  ml/vendor/cweagans/composer-patches/src/Patches.php on line 388    
  
          "Patch Call to a member function getCustomer() on null fix": "patches/vendor/rbj/module-customer-feature/Model/Rule/Condition/Customer.patch" IN the class name typo issue.

Here you can’t able to apply the patch and throw an error as mentioned above. Continue reading “How to fix Magento custom patch throws an error while patch applied?”

How product website relation are stored in catalog_product_website table Magento 2?

Magento catalog_product_website is used to store relations between a product and its associated websites.

If your Magento runs with multiple websites and the product is assigned to multiple websites, its relation with the website is stored in the catalog_product_website table.

Table catalog_product_website has two columns. Continue reading “How product website relation are stored in catalog_product_website table Magento 2?”

How to get store code by store cookie Magento 2?

You can get the store code value from the cookie name store in Magento 2.

This article will be useful while you have multiple stores set up in your store.

While you switch any store from the site, Magento adds a logic to add a new cookie called store with a value containing the current selected store. Continue reading “How to get store code by store cookie Magento 2?”