I need to remove the cache from my Block class, even if it removes the cache from the entire page. How could I do it?
Magento1
I created a new template var using email_order_set_template_vars_before observer and it works when I send email new order through the Magento admin. But it does not trigger when new order is placed. Here is my code. events.xml < ?xml version="1.0"?> SaveEmailVariables.php namespace FoobarShipperHQDeliveryDateObserver; use MagentoFrameworkEventObserverInterface; class SaveEmailVariables implements ObserverInterface { […]
when I use this method to get custom attributes $objectManager = MagentoFrameworkAppObjectManager::getInstance(); $_product = $objectManager->get('MagentoCatalogModelProduct')->load($block->getItem()->getProductId()); echo '' . $_product->getData('custom_attribute'). ''; in this place design/fronend/theme/Magento_Checkou/templates/cart/item/default.phtml (page checkout/cart, list products), this method repeat custom attribute. When a product has no attribute, it takes from the previous product.
I migrated from Magento 1.8.1 to 2.2.3. Problem: in the shop I see simple products that are out of stock even when I filter on stockstatus = in stock. What I have found out, is that the index for product stock status is wrong. It has value in stock, where […]
How do I get the login form to pop up on the same page when I click on login? In the image is graphically what I need to do.
I have basic knowledge about GraphQL. Now, I would like to convert my knowledge into action. For that, I want to know about few things like how can I add my custom field to any GraphQL Query and mutations. I have also read some blog posts for this but they […]
In admin ui-component in a custom module, when I use page layout admin-2columns-left and left tabs in ui component form and commenting as I got no data in edit mode. But when do reverse with using a single-column page layout, everything is fine. Where I am doing wrong? Is it […]
I know the correct answer is “why should you, cross sell products are supposed to be shown there”. But i got a stubborn customer who wants to show the related products on the cart page. What is the correct way to do this? Simply changing the type on Magento_Catalog/templates/product/list/items.html isn’t […]