Skip to content

magento man

How to convert below code in magento2 standard way

what is equivalent in m2.If we want to convert below code in magento2 which class we can use to send json response directly from helper class. Mage::app()->getResponse()->clearHeaders() ->setHeader(‘Content-Type’,’application/json’) ->setBody($jsonContent)->sendResponse(); exit;

Magento 2: How to disable swipe action in shopping cart page

I am trying to disable “swipe” by adding “swipe: false” in app/design/frontend/vendor/default/Magento_Checkout/templates/cart/item/default.phtml Here is my code, but it is not working, can anyone help? require([‘jquery’, ‘jquery/ui’, ‘Magento_PageBuilder/js/resource/slick/slick’], function($) { $(document).ready(function() { $(“.widget-product-carousel”).slick({ swipe: false }); }); }); </script>“`

Add a template content to detail tab

I want to add some content within the product detail tab. I created my template below <referenceContainer name=”product.info.details”> <block class=”MagentoCatalogBlockProductView” name=”additional_product_details” template=”Magento_Catalog::product/view/additional_product_details.phtml” /> </referenceContainer> I tried to use the <move /> syntax to achieve this but was unsuccessful. Please note:… Read More »Add a template content to detail tab