<?php use MagentoFrameworkApiSearchCriteriaBuilder; use MagentoSalesRuleApiRuleRepositoryInterface; use MagentoCatalogApiProductRepositoryInterface; use MagentoFrameworkRegistry; class CustomRule { protected $ruleRepository; protected $searchCriteriaBuilder; protected $productRepository; protected $product; public function __construct( RuleRepositoryInterface $ruleRepository, SearchCriteriaBuilder $searchCriteriaBuilder, ProductRepositoryInterface $productRepository, Registry $registry ) { $this->ruleRepository = $ruleRepository; $this->searchCriteriaBuilder = $searchCriteriaBuilder; $this->productRepository = $productRepository; $this->product = $registry->registry('current_product'); } /** * Ottieni l'oggetto […]
Magento2
Installed several time for 246 and 245 also. The M2 installation and DB was cleared before every time. Just 46 products in Gear and all. I’m no newbee in this and googled also. Generally it’s too simple situation and I wondered, everything was cleared, reindexed, composer version swapped, I tried […]
Im currently switching servers and have installed a fresh Magento installation under version 2.4.3-p3. Our current store runds on magento 2.3.x. I want to migrate all customer data aswell as order data to the new server on the new version. It it safe to just copy the data from the […]
I have created an attribute for the Product like some extra fees. I got the attribute on the mini cart, saved it in the quote also updated their price according to the product quantity. I want to include that price also in the subtotal in the mini cart. When subtotal […]
I have made a mixin for the minicart. I want to execute an async call before the parent function should be called. However it doesn’t seem possible to call this._super() from an anonymous function. I tried to assign this to self but that doesn’t help. Uncaught (in promise) TypeError: self._super […]
I’m currently working on a Magento 2 project that utilizes MSI and I’m trying to programmatically update the Out-of-Stock Threshold for each of my products. While I am able to adjust the quantity available using the setQuantity method on SourceItemInterface, I haven’t found a way to modify the Out-of-Stock Threshold […]
Is it possible to create a compare list with products using a URL with product ID’s? Something like: www.domain.com/catalog/product_compare/index/items/1,2,3,4
I’m having trouble with Magento 1.9 where out-of-stock products aren’t showing up in searches or the product list. Here’s what I’ve tried: The products are correctly assigned to the appropriate website and categories. I’ve attempted to display out-of-stock configurable products by disassociating all associated simple products, but they still don’t […]
I am trying to add the custom category filter in the PLP page in the site in Magento 2.4. Currently, the category filter is coming in the layered navigation, but the same thing we want in the top of the page in PLP page, with AJAX functionality. Can anyone has […]