Skip to content

magento man

How do I return a 404 page for pagination pages where there are no products?

My website product landing pages have the current pagination: https://www.example.com/bread/sourdough https://www.example.com/bread/sourdough?p=2 But if I put in a page number that isn’t in the series, like: https://www.example.com/bread/sourdough?p=123123 Then I still get a live page with 0 products – essentially an empty… Read More »How do I return a 404 page for pagination pages where there are no products?

How to keep track of this of the parent component when calling a parent function inside a foreach loop in the template in knockout?

I have a cart-items-mixin.js define([‘Magento_Catalog/js/price-utils’, ‘Magento_Checkout/js/model/quote’, ‘ko’,], function(priceUtils, quote, ko) { ‘use strict’; return function(CartItems) { return CartItems.extend({ (…) showDetails: ko.observable(false), handleShowDetails: function() { this.showDetails(true); }, initialize: function() { this._super(); (…); } }); }; }); and the template: <!– /**… Read More »How to keep track of this of the parent component when calling a parent function inside a foreach loop in the template in knockout?