Answer the question
In order to leave comments, you need to log in
How to add the cost of packaging in the Bitrix cart to the finished dish?
There is a conditional product pizza and it is necessary that when the buyer adds it to the cart, then the product cardboard packaging with a fixed price is automatically added there and it can neither be added nor taken away. Maybe this is solved by some ready-made plugin?
Answer the question
In order to leave comments, you need to log in
There are no ready-made plugins in the public domain.
Your problem can be solved in two ways:
1. If the client needs to see the package, then we start a new section with packages. We check which product is in the basket and add the appropriate packaging to the basket using the api method. In the cart template, you need to check if there is a package. If there is, then hide the increase and delete buttons for it., the packaging section will be a sign for hiding. You also need to add an event to remove the product, which, when the product is removed, will remove the packaging.
2. You can modify the order (not the cart) by adding packaging (in fact, this is also a product) via api. In the public part (in the shopping cart), use markup rules. Rather suitable if you need it for internal accounting.
If packaging is considered not as a product, but as an option for delivery, then a markup can be applied to delivery. And in the checkout template, it will not be difficult to set up the desired visual output.
In some cases, you can use Sets and Bundles if you have relatively new Bitrix updates.
https://dev.1c-bitrix.ru/community/blogs/product_f...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question