Skip to Content
author's profile photo Former Member
Former Member

How to add every product to cart as a separate line item, without summarizing the quantities?

Hi Team,

I need to add every set of products to cs a new line items. I don't want products to be grouped as single line item based on the product id.

i.e If I add two Apple iPhones to my cart separately. My cart should have them as two separate line items.

Cart:

Apple iPhone - Qty 1

Apple iPhone - Qty 1

Should not be added as below

Cart:

Apple iPhone - Qty 2.

Any Ideas on how to achieve this? Thanks in advance!

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 22, 2015 at 10:54 AM

    It is possible to send to cart service a parameter createNewEntry that makes this happen. But facades by default set this value to false so you would need to override it and set value to true

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 03, 2015 at 04:05 AM

    I have tried this approach making createNewEntry(true), the problem in cart page is it shows only one single line item and the qty is 1, but subtotaland tax will be the price of 2 line items. Even if you remove any item in Cart page, the other item will still be there. I noticed it in demo stores.In further pages of checkout you can see two individual line items under items to be delivered heading. In fact the code used in both the pages is same, which is retrieval from cartdata.let me know if solved in cart page.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 07, 2015 at 03:57 PM
    -2
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.