Ask your Question

Write to us

Ask Question

Indexing through Command line Magento1.x

Reindexing in Magento1.X through Command line:

Sometimes we need to re-index Magento through command line to avoid the broken process from Magento Interface.

On our Magento root folder we have shell directory that contains indexing script.

Go to your magento root folder then shell folder and run below commands:

1. php indexer.php --status 

 If you are indexing on xamp local throwing  error like &quo... Read More

Show error message when adding a product of price 0.

To restrict products having price zero from shopping we need to create a observer on
checkout_cart_product_add_after event such that on every add to cart it will check the
product price and then add to cart.

Create a module and in etc/config.xml define the observer under event node.

Here Our module name is zeroprice under Letsknowit namespace.

File path : app/code/local/Letsknowit/zeroprice/etc/config.xml

Read More

Admin and Frontend icon fonts missing after installing Magento2.O

Admin and Frontend icon fonts missing after installing Magento2.O

 

1. Open file app/etc/di.xml in and editor

2. find the line MagentoFrameworkAppViewAssetMaterializationStrategySymlink 
 and replace it with  MagentoFrameworkAppViewAssetMaterializationStrategyCopy line.
 
3. Go to folder pub/static and remove all files and folders except .htacess file.
&am... Read More

How to delete a product in Magento2 Programatically

How to delete a product in Magento2 Programatically

 To delete a product from frontend 

1. On delete icon/link we need to pass the product ID which we need to delete.
2. We need to create a  controller class to execute the delete process and
  need to write the delete code under execute method of class.
 
 class Deleteproduct Read More

Magento Events and Observers

 To separate your custom code from the core code we use event driven programming where an event is fired and an observer is listening for specific events and executing certain logics on specific event. These events have certain class objects attached as function parameter .Observers (Class functions) runs when the event is fired and receive the cla... Read More