This is based on the event happening before adding a product to the cart. Using this event we may modify the qty and price of the product if the requirements are pointed out. This can be achieved with a help of a module Create a module with etc/frontend/di.xml After that create an observer to modify… Continue reading Add Custom developments to add to cart
Author: Bibin Johnson
Magento Uninstall Database using terminal
To reinitialize the Magento 2 database with defaults, you can use the setup:install command with the –use-sample-data option. This command will remove all existing data from the database and install the Magento 2 sample data along with the default configuration. Remove all existing data from the database by running the following command: Run the following… Continue reading Magento Uninstall Database using terminal
Bigpost Integration with Magento 2
BigPost is a shipping carrier that provides a REST API for developers to integrate their shipping services into e-commerce platforms. To integrate BigPost API with Magento, you can follow these general steps: -Obtain API credentials: You need to register with BigPost and obtain API credentials such as API Key, API Secret, and Merchant ID. -Install… Continue reading Bigpost Integration with Magento 2
Append options to a select tag from an API response
Here is an example to append options to a select tag from an API response in jquery foreach This can be also done by foreach on php but sometimes we may need js or jquery to append data upon some conditions.
Magento 2 api – How to get layer navigation filters available in rest api?
get layer navigation data available in product collection ( current category , search product ) . To get layer navigation from the API Sample Output will be :
Custom Attribute’s Value Null at Frontend
Admin backend that attribute has value but in Frontend its NULL
Creating a FlipHTML5 product catalog on the website
If we have a PDF file as a product catalog we can easily create flip HTML. To create a flip catalog, you will need to add interactivity to your pages. There are many tools available online that can help you create flip catalogs, such as FlipHTML5, Yumpu, and Issuu. Upload your catalog: Once you have… Continue reading Creating a FlipHTML5 product catalog on the website
Passing a value from JS to PHP as a parameter
In some cases, we may need to pass data from an input field or template file to the PHP controller. There are different methods like form submission and calling the field by $_GET or $_POST functionshere we used the real-time scheme to pass value directly through PHPThis can be achieved using the following code, here… Continue reading Passing a value from JS to PHP as a parameter
Update total using ‘sales_quote_save_after’ event in magento 2?
Update total amount if selecting a shipping method on the checkout app/code/Vendor/Module/etc/sales.xml app/code/Vendor/Module/Model/Quote/Discount.php app/code/Vendor/Module/Block/Checkout/Fee.php
Extension for Speed optimization Magento 2
‘Magepow’ is having a free extension to optimize the website and increase the performance MagePow Speed Optimizer The speed of your website is slow, which has a negative effect on Google rating and ranking and especially on the customer experience. Magento 2 Speed Optimizer or Magento 2 Speed Optimize (also known as Google page speed… Continue reading Extension for Speed optimization Magento 2