How to hide/remove the Add to Cart button on magento 2

Sometimes it is useful to remove or hide the Add to Cart button throughout a magento 2 website. An easy way to do this without changing the actual template is by creating a plugin (also called interceptor) to change the isSaleable function that is used on those templates. Here I created the function that will be called after the isSaleable[…]

Read more

How to show the totals section in the checkout shipping step

If you want to show the totals section when you first go to the default checkout in your magento 2 website you need to extend the abstract-total object defined in the Magento_Checkout/js/view/summary/abstract-total.js file. The function isFullMode needs to be replaced by a custom function that avoids not showing the total section in the shipping step. Basically the last statement on[…]

Read more

Randomize the product list in all categories

Recently I had a request from a customer asking to randomize the product listing in all the categories. The goal was to give the illusion of “freshness” or frequent changes in the categories. To achieve this the product collection created when a category is called needed to be sorted in a random order. I created an extension to override the[…]

Read more