1

I have given small product free on purchase of big product.

Items get added in cart but while proceeding to checkout free item sometimes displays and sometimes it disappears.

Can anyone explain its shopping cart's functionality. How it get functioned.

Below is the page where item get disappears.

app\design\frontend\default\test\template\canderecheckout\onestep\review\item.phtml  

Can anyone explain $_item = $this->getItem()?

When I refresh the page that time free product is getting deleted from sales_flat_quote_item table.

Is there any code if product price is zero then it will get deleted from sales_flat_quote_item table?

0

In magento cart item data get stored in sales_flat_quote_item table. So $_item = $this->getItem() represent the object of single product in your current cart.

if you want to check the class of it you can print below.

<?php echo get_class($this); //print Mage_Sales_Model_Quote_Item ?>
8
  • thanks . I am getting class Mage_Checkout_Block_Cart_Item_Renderer – jassi Aug 29 '16 at 9:22
  • okay..sorry my mistake $_item will show Mage_Sales_Model_Quote_Item class – Hardik Shah Aug 29 '16 at 9:24
  • yes $_item => Mage_Sales_Model_Quote_Item class. In sales_flat_quote_item table, I can see Big and small product. But on ajax call small product sometimes get displayed and sometimes get disappeared. Any reason why it happens? – jassi Aug 29 '16 at 9:30
  • what is big product and what is small product? – Hardik Shah Aug 29 '16 at 9:33
  • Big product is purchased product and small product is free one . On purchase of Big product, small product is free. – jassi Aug 29 '16 at 9:36

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.