Hi Everyone, has any one tried to add the discount...
# suitecommerce
n
Hi Everyone, has any one tried to add the discount item using cart component? i want to add the discount item for certain products based some criteria. your response is greatly appreciated.
s
They're not supported
n
Thanks Steve. do you know any workaround for this?
s
Depends on what you're trying to do
n
we're trying to give 100% discount on the products if certain criteria met. we've used promocodes for this but when customers using the other promocodes other promocodes which are already applied are became the not applied. so we just want to check whether we can add a discount item after adding item to the cart.
s
Well, promo codes are generally the way to do this. If other items are no longer applying, it sounds like one or more of them are exclusive and you should check the settings of them so that they are combinable. If the item is a promotional item, then you can use the Free Gift promotion type. If the item is always free then you can use price levels to set the price to $0 - this includes customer specific pricing. So, for example, you can give only specific customers this discount. Finally, you can use scriptable cart.
c
You can add discount items through the cart component by using the beforeLineAdd or afterLineAdd events. First, check the line item type. If it meets your criteria, use addLine() to insert a discount item with negative pricing. Be sure to handle the quantity and rate calculations properly so the discount applies correctly to the qualifying products.
s
How is that possible? Discount items are never exposed to web stores.
The only times they appear are on estimates / sales orders that have been created/edited by a rep in the NS UI.