Skip to content

price

Auto Added by WPeMatico

Magento 2 setStoreId VS setCurrentStore

What is the exact(!) difference between: setStoreId() setCurrentStore() Example where the two give different results. // setStoreId solution $product = $objectManager->create(‘MagentoCatalogModelProduct’)->setStoreId(2)->load(1); echo $product->getPriceInfo()->getPrice(‘final_price’)->getAmount()->getValue(); VS // setCurrentStore solution $storeManager->setCurrentStore(2); $product = $objectManager->create(‘MagentoCatalogModelProduct’)->load(1); echo $product->getPriceInfo()->getPrice(‘final_price’)->getAmount()->getValue(); EDIT: I am getting different results when… Read More »Magento 2 setStoreId VS setCurrentStore

Custom Module Not Working in 2.4.4 but working in 2.4.3

I have implemented a custom module based on this thread -https://magento.stackexchange.com/questions/339930/change-product-price-precision-to-3 It’s working perfectly fine on Magento 2.4.3, but no changes are reflecting when I upgrade to 2.4.4. But the module is installed successfully. My module structure- /app/code/Sanket/PricePrecision ->registration.php ->/etc… Read More »Custom Module Not Working in 2.4.4 but working in 2.4.3