Magento get selected simple product id of configurable product on Product cart page
In this post we will show you Magento get selected simple product id of configurable product on Product cart page, hear for Magento get selected simple product id of configurable product on Product cart page we will give you demo and example for implement.
Hear we will give you cod for Magento get selected simple product id of configurable product on Product cart page. get data in cart.phtml page you need to add following code.
Paste the following code in app/design/frontend/base/default/template/checkout/cart.phtml
in side the script
or
Paste the following code in app/design/frontend/[your theme]/default/template/checkout/cart.phtml
in side page.
foreach($this->getItems() as $_itemval) { $_Configproduct = $_item->getProduct(); $simpleProduct = Mage::getModel('catalog/product')->loadByAttribute('sku', $_itemval->getSku()); $simple_product_id = $simpleProduct->getId(); $product_val = Mage::getModel('catalog/product')->load($simple_product_id); echo $full_path_url = Mage::helper('catalog/image')->init($product_val, 'thumbnail'); echo $product_id = $_itemval->getId(); echo $product_sku = $_itemval->getSku(); }
Hope this code and post will helped you for implement Magento get selected simple product id of configurable product on Product cart page. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve onlincode. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs onlincode.org