I want to add some item options along with standar...
# suitecommerce
g
I want to add some item options along with standard options when we click the add to cart button??
s
I would probably add a listener to the backend live order model. Eg:
Copy code
Application.on('before:LiveOrder:addLine', function (model, currentLine) {
    if (currentLine && currentLine.options && !currentLine.options.custcol_my_cust_field) {
        currentLine.options.custcol_my_cust_field = "My value";
    }
});
g
Can we use in pdp page??
s
Well, the front-end version of the live order model has events too.
g
Okay thank you steve..I will try and let you know
How can we call the event before:addLine onclick of Addtocart Button in Elbrus Version?
@Steve Goldberg any idea on this