Skip to content

Instantly share code, notes, and snippets.

@nhp
Forked from Schrank/Observer.php
Created March 20, 2019 06:45
Show Gist options
  • Save nhp/bc6da423a6dbf8677b2863cd96bbaa29 to your computer and use it in GitHub Desktop.
Save nhp/bc6da423a6dbf8677b2863cd96bbaa29 to your computer and use it in GitHub Desktop.
/**
* Set prices and image configuration
*
* @param Varien_Event_Observer $observer
*/
public function salesQuoteCollectTotalsBefore(Varien_Event_Observer $observer)
{
/* @var $quote Mage_Sales_Model_Quote */
$quote = $observer->getQuote();
foreach ($quote->getAllItems() as $quoteItem) {
/* @var $quoteItem Mage_Sales_Model_Quote_Item */
$product = $quoteItem->getProduct();
$price = $helper->getPriceWithoutTax($quoteItem);
$product->setPrice($price);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment