How to override address/book phtml in Magento 2

You can override the book.phtml file in Magento 2 using XML.Book template used to display the address book of the customer with default billing and shipping address at the top of the Address book page. Magento\Customer\Block\Address\Book Book Block class contains the native method for the template. You can override using theme or module level, 1. Theme Level, app/design/frontend/{Vendor}/{themename}/Magento_Customer/templates/address/book.phtml… Continue reading How to override address/book phtml in Magento 2

Published
Categorized as Magento

Adding Tawk Chatbot script to magento backend.

If you have a tawk configured site and its script it can be added to the magento backend . Careful about the script src number given from the tawk website. For reference: Paste this code in CONTENT>CONFIGRATION>EDIT THEME> FOOTER>  Miscellaneous HTML Same thing is used for all scripts to view chatbot in the page.

Disable Welcome Email after signup

When customer sign in need to disable the email notification send from the netsuite.For that create di.xml file Then create the plugin class EmailNotification { public function aroundNewAccount(\Magento\Customer\Model\EmailNotification $subject, \Closure $proceed) { return $subject; } } Through this we can disable the emails sent from magento when the customer is registered.

Published
Categorized as Magento

Change the submit payment button based on the payment in magento2

We don’t have any default method to change the payment button name based on the payment method. So we need to use a custom method for the same.For that, we could use the JS function to change the payment method name based on the payment method name selection.Magento_Checkout/web/js/view/payment/default.js On the selectPaymentMethod default function we have… Continue reading Change the submit payment button based on the payment in magento2

Published
Categorized as Magento

Sending file together with form data via ajax post

We need to acknowledge first is that we need to APPEND both Form Input Data and Form File(s) into a single FormData variable. Here is my solution in which I have enabled Multi File option so that this solution can fit for all examples. It is Important to include name attribute in the input controls to make it work properly on server side… Continue reading Sending file together with form data via ajax post

Published
Categorized as Magento

To check the product is saleable or not

In Magento, there is option to show the out of stock products. So that time we need to check whether the product is saleable or not for that, we need to check it for configurable and simple products if ($_product->getTypeId() != ‘configurable’) {$objectManager = \Magento\Framework\App\ObjectManager::getInstance();$StockState = $objectManager->get(‘\Magento\InventorySalesAdminUi\Model\GetSalableQuantityDataBySku’);$qty = $StockState->execute($_product->getSku());$isSaleable = $qty[0][‘qty’];} else {$isSaleable = $_product->isSaleable();}… Continue reading To check the product is saleable or not

Published
Categorized as Magento