Working with the `afterAddLine` method in the Cart...
# suitecommerce
c
Working with the
afterAddLine
method in the Cart class. https://system.netsuite.com/help/helpcenter/en_US/APIs/SuiteCommerce/Extensibility/Frontend/Cart.html#event:afterAddLine It's firing once for every line in the cart. Is that the intended behavior?
n
Can you share the snap of code you have written and where are you placing it?
s
Yes.
If you need to do something specific to the item you just added then you care pair it with getLatestAddition()
🙏🏻 1
c
@Steve Goldberg
getLatestAddition()
is new in 2021.1.0, is there an equivalent in order SCA versions?
s
LiveOrder.Model.getInstance().getLatestAddition()
👍🏻 1
👍 1
c
@Steve Goldberg Thank you.