1

I have created a module which gives magento admin the ability to add shipping price for each order in magento. How it works is that, when a customer tries to check out, he is only allowed to place order, and the cart is abandoned and my custom module gets info about all abandoned carts in magento and allows admin to add shipping rate from backend after which the customer is notified via mail to check out himself.

The problem is that, i use magento abandoned cart report api to get the details and it only gives quote id, created date and customer email/name , which is too few for the admin to determine shipping price. I need to either get the sku and quantity of products added in cart in my module or a code to retrive all those details either in backend or in an external file. I tried joining the mysql query without the code, but it didnt succeed

0

I suppose you are getting items from your abandoned cart. So after that below code could be useful:

$items = Mage::helper('checkout/cart')->getCart()->getItems(); // Replace with your items.

foreach ($items as $item) {
    $_product = Mage::getModel('catalog/product')->load($item->getProduct()->getId());
    echo $_product->getSku();
}
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.