1

Where can i find the code for creating a quote while adding product to cart?

  • When you mean code you're talking about the quote id ? – Raphael at Digital Pianism Feb 24 '16 at 13:55
  • Thanks @DigitalPianism for quick reply. I want to know, how sales_flat_quote entry is entered? My need is to filter some products in sales_flat_quote_item, not to calculate in the sale_flat_quote For eg:I have 1shirt,1shoes and 1bag in my shopping cart.I want only shirt and bag to be paid by the customer but shoes must not be paid.(It must be excluded from the cart totals) – sreedarsh Feb 24 '16 at 14:01
1

When a product is added to the cart this is called Mage_Checkout_Model_Cart::addProduct(). this calls at one point $this->getQuote().
This one calls $this->getCheckoutSession()->getQuote().
This is where it all happens.
In Mage_Checkout_Model_Session::getQuote().
If the quote does not exist, it is created.

  • Thanks @Marius..But how can i restrict a product in the shopping cart, not to be calculated for the grand totals. – sreedarsh Feb 24 '16 at 14:09
  • that's a totally different question. you asked where is the quote created, I answered that. I have no idea how you can exclude a product from the grand total. – Marius Feb 24 '16 at 14:11

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.