Skip to content

magento man

How to change cart subtotal price in order summary block magento2

How can I do that? this is my code. $quote = $this->checkoutSession->getQuote(); $grand_total = $quote->getGrandTotal(); $new_grand_total = $grand_total + $fee; $quote->setGrandTotal($new_grand_total); $quote->setBaseGrandTotal($new_grand_total); $quote->collectTotals(); $quote->save(); $this->checkoutSession->getQuote()->collectTotals()->save();

Status and visibility can not be set after copying a product programmatically?

Magento 2.4.6 I copied a product like that: $childCopy = $objectManager->create(‘MagentoCatalogModelProductCopier’); $childCopy = $childCopy->copy($parent); This works, I can set the SKU, the URL key and so on on the $childCopy, but visibility and status do not work: $childCopy->setSku(‘whatsever’); // works… Read More »Status and visibility can not be set after copying a product programmatically?