Does the Extensibility API allow us to set Line It...
# suitecommerce
s
Does the Extensibility API allow us to set Line Item Options dynamically in the checkout process? How could I use it on and extension of the OrderWizard.Shipmethod.Module. How can I instansiate the Cart component in that context?
s
You can use Cart.updateLine to change an item's options. And yes, you can use Cart in the checkout application. But you should avoid extending any of our core modules. Consider adding a new module using the Checkout component.
Although now I think about it, if you're changing an item's options then you're talking about matrix options. You may need to write code that removes the item from the cart and then adds a new line with the new configuration of matrix options. This is because child items have unique SKUs. But you can try it the 'simpler' way first and see if it works
s
No this are not Matrix items this are Custom Transaction line fields I need to set values for them in the frontend and they need to migrate to the sales Order created in the backend after palcing the order.
s
Well we have the SC Custom Fields extension that automates that does custom line item fields. So you should look at that.
But just to be clear, are you trying to convert Transaction Item/Line Fields to Transaction Body Fields?
s
No, I am trying to set the Custom Transaction line fields for each line
I have tried to set the line options in the LiveOrder.Model but for some reason that doesn't work
s
Alright, well we have docs on this: http://system.netsuite.com/app/help/helpcenter.nl?fid=chapter_4837340253.html. And, as I said, we have an extension that does it too
You shouldn't need to touch the LiveOrder model to do this
s
The thing is I don't need to show those custom fields to the user which is what the docs talk about, I just need to set the value for those custom transaction line fields, which appear as item options. The Extension I cannot fetch to a local environment to work with sadly.
s
OK, well
updateLine
is the right way to go then