Skip to content

Instantly share code, notes, and snippets.

@Schrank
Created March 19, 2019 20:37
Show Gist options
  • Save Schrank/709d05eac8ec1905306aea3fb5211e03 to your computer and use it in GitHub Desktop.
Save Schrank/709d05eac8ec1905306aea3fb5211e03 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