Yes, you can easily do that, and there's a couple of ways to solve it depending on your situation and your general programming skills.
The simple way: Use the Tea Commerce JavaScript API to add the products. You can do this by calling one of the add to cart methods, which all have their strong sides: TeaCommerce.addOrderLine Will add or update a product in the cart TeaCommerce.addUniqueOrderLine Will add or update a unique orderline. That means that you can add the same product to multiple orderlines. TeaCommerce.addOrderLineBulk Use this to add multiple orderlines in one servercall.
The .NET way: Use the Tea Commerce .NET API to add the products to the order. Here you would use the JavaScript API to add the main product and then hook into the Tea Commerce OrderLineAdded event. In the event you use the newly added product to find and add the rest of the products to the order.
In oth cases: Common for both scenarios will be that you use the order line properties to tie your packaged products together. Do that by giving them a shared package id or whatever you find best. The order line properties can be used for anything, and if you want to keep them secret for the client you can add them serverside and set the Serverside only parameter to true.
Combining multiple products into a single item package
Can someone tell me if it is possible in tea-commerce to sell multiple produts as a single package?
Regards,
Allard
Hi Allard,
Yes, you can easily do that, and there's a couple of ways to solve it depending on your situation and your general programming skills.
The simple way:
Use the Tea Commerce JavaScript API to add the products. You can do this by calling one of the add to cart methods, which all have their strong sides:
TeaCommerce.addOrderLine
Will add or update a product in the cart
TeaCommerce.addUniqueOrderLine
Will add or update a unique orderline. That means that you can add the same product to multiple orderlines.
TeaCommerce.addOrderLineBulk
Use this to add multiple orderlines in one servercall.
The .NET way:
Use the Tea Commerce .NET API to add the products to the order. Here you would use the JavaScript API to add the main product and then hook into the Tea Commerce OrderLineAdded event. In the event you use the newly added product to find and add the rest of the products to the order.
In oth cases:
Common for both scenarios will be that you use the order line properties to tie your packaged products together. Do that by giving them a shared package id or whatever you find best. The order line properties can be used for anything, and if you want to keep them secret for the client you can add them serverside and set the Serverside only parameter to true.
I hope this is to some help.
/Rune
is working on a reply...