Hot answers tagged

2

To enable AJAX add to cart on home page, You need to add small JS code create: app/design/frontend/{Package}/{theme}/Magento_Theme/layout/cms_index_index.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:...


1

You can add a phtml file inside your static cms-block: {{block class="<vendor_name>\<module_name>\Block\<module_name>" name="<your_block_name>" template="<vendor_name>_<module_name>::<template_directory>/filename.phtml"}} Inside of the phtml-file, you can add javascript and the logic to ...


1

The _hideItemButton(elem); function requires an argument of elem which you are not passing in within the _customerData function: /** * @param {HTMLElement} elem * @private */ _hideItemButton: function (elem) { var itemId = elem.data('cart-item'); $('#update-cart-item-' + itemId).hide('fade', 300); } ... ...


Only top voted, non community-wiki answers of a minimum length are eligible