Guest User

Untitled

a guest
Jan 18th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. $customerId = Mage::getSingleton('customer/session')->getId();
  2. $quote = Mage::getModel('sales/quote_address')->loadByCustomer($customerId);
  3. ...
  4.  
  5. public function showAllSku(Mage_Sales_Model_Quote_Address $address)
  6. {
  7. $total = 0;
  8.  
  9. foreach ($address->getAllItems() as $item) {
  10.  
  11. $product = $item->getProduct();
  12. $options = $product->getTypeInstance(true)->getOrderOptions($product);
  13.  
  14. Mage::Log("SKU: ". $item->getSku(), 7, "model.log");
  15.  
  16. }
  17. return 'true';
  18. }
  19.  
  20. public function testAction()
  21. {
  22. $address = ???; //<-- I need help here
  23. echo Mage::helper('my_module')->showAllSku($address);
  24. }
Add Comment
Please, Sign In to add comment