Hello together,
I have seen several examples showing how to adjust prices in carts. I do not understand the difference between setCustomPrice and setOriginalCustomPrice. Where is CustomPrice and OriginalCustomPrice used later on?
class CustomPrice implements ObserverInterface
{
public function execute(\Magento\Framework\Event\Observer $observer) {
$item=$observer->getEvent()->getData('quote_item');
$product=$observer->getEvent()->getData('product');
$price = $item->getProduct()->getFinalPrice()+60;
$item->setCustomPrice($price);
$item->setOriginalCustomPrice($price);
$item->getProduct()->setIsSuperMode(true);
return $this;
}
}