$items = Mage::getSingleton('checkout/session')->getQuote()->getAllItems();
foreach($items as $item) {
echo 'Product ID: '.$item->getProductId();
echo 'Product Name: '.$item->getName();
echo 'Product Sku: '.$item->getSku();
echo 'Product Quantity: '.$item->getQty();
echo 'Product Price: '.$item->getPrice();
Get All Items & Totals In Magento Shopping Cart
Posted by
rajthegr8
at
4:55 PM
Wednesday, October 31, 2012
This blog will show you how to get all items in a shopping cart and totals in a magento store :
Price Currency Conversion in Magento
Posted by
rajthegr8
at
4:39 PM
This article is to show you how to convert price amount from one currency of the shop to another currency.
// Currency conversion rates have to be available in the target currency $fromCur = ‘USD’; // currency code to convert from – usually your base currency $toCur = ‘EUR’; // currency to convert to $price = Mage::helper(‘directory’)-> currencyConvert(1000, $fromCur, $toCur); // if you want it rounded: $converted_final_price = Mage::app()->getStore()->roundPrice($price);
How to show Category List in Magento
Posted by
rajthegr8
at
4:11 PM
You can show all categories present in magento.
There are different methods to get the category list. Below are some possible methods:-
Get all categories
The following code will fetch all categories (both active and inactive) that are present in your Magento Shop.
Get all active categories:
There are different methods to get the category list. Below are some possible methods:-
Get all categories
The following code will fetch all categories (both active and inactive) that are present in your Magento Shop.
$categories = Mage::getModel('catalog/category')
->getCollection()
->addAttributeToSelect('*');Get all active categories:
Subscribe to:
Posts (Atom)