D
D
Dmitry Klimantovich2021-06-23 13:49:03
1C-Bitrix
Dmitry Klimantovich, 2021-06-23 13:49:03

How to add the same product to the cart as a new item, and not add to the quantity?

Good afternoon everyone. The bottom line is this:

I implemented on the site that if the product is from a certain category, then there are additional checkboxes in the product card.
In the case of checked checkboxes, the nomenclature of works is sent to the basket in accordance with the checked checkbox, for example: "tailoring", "cutting".
If the user in the online store marked the checkboxes on the product card and sent them to the cart, then, in principle, everything is fine - the following will turn out:

  • item 1 - qty.1
    • work 1 - col.1
    • work 2 - col.1



But if the user went further to the site and added an item to the cart from the same category of goods with the same checkboxes, the result would be:
  • item 1 - qty.1
    • work 1 - col.2
    • work 2 - col.2


  • item 2 - qty.1

How can I sort in the basket so that it is:
  • item 1 - qty.1
    • work 1 - col.1
    • work 2 - col.1


  • item 2 - qty.1
    • work 1 - col.1
    • work 2 - col.1




Kits are not satisfactory. Other thoughts where to dig are welcome.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2021-06-24
@Firsov36

Well, apparently your implemented logic works in such a way that the quantity is added to "work 1, work 2" ...
In fact, if I understand correctly, then you have these "work1, work2" they are also "tailoring, cutting" ... did you try not with Sets, but with Trade Offers ? For example, product1 can be red, blue, white... at the same time it is made of wood, metal, plastic and in this way beat your "tailoring, cut" and, for example, "cut, pattern, no services".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question