Customise Cart in Sitebuilder
Hey Netsuite Pro’s.
I’m having some issues trying to locate and edit files that relate to the Cart page in a site using Site Builder.
I have experience with SCA but not so much with SiteBuilder. I can see how the templates are put together and how to display variables and trigger functions from the HTML.
I’ve looked in the file cabinet and the ‘Web Site Hosting Files’ are empty, and there are no scripts that relate to the cart.
So my question is, how do I create a new field in the cart that will display data from a custom record? Or can I add a row to the options in the ‘Set Up Website => Cart’ where the other fields are added?
Any help would be amazing, I’ve been searching through the internet and can’t find anything that references this issue.
So there are two tasks I am trying to achieve.
Display a value from a custom field that if populated will add the value defined in the custom field to the cart. So I will need to write a script that pulls in the item record, and checks for this custom field, then recalculates the cart. Also displaying this custom field in the cart using the getCurrentAttribute(‘item’, ‘custom_field) as an inline cart message isn’t working, so I’m guessing that the inline message doesn’t have access to the item record, so I would need to add a tag, or edit the html for the cart.. which it seems Site Builder does not let you have access to.
Add a text box to Review and Submit page that a user can upload a message that will be saved to the record. I’ve used a tag that will create a text box in this page, however I need to update the record with the values that are in this text box. I’m guessing that it’ll require an additional script, but I would need to access the current record and update on submit.
Frustratingly i’ve achieved both of these previously using SCA so I would have imagined it be simpler in Site Builder but the limited documentation and access to source files has thrown a lot or road blocks.
Any help would be much appreciated!
If it’s the standard cart, you’ll probably have to add a script in the page header, do a pattern match on the URL to see if you’re in the cart, then use jquery or similar to force additional code into the page as required. Sitebuilder really wasn’t built to accommodate this kind of customization.
If you’re familiar with SCA, it may be better to look at the official Netsuite Reference Cart bundle, which basically bolts the SCA checkout process onto Sitebuilder.
Hey, I’ve actually tried that first method but using tags that apply scripts, the problem is I need to edit sales orders and pull info from item records and as there is no API I couldn’t find a way of getting that method to work, this would be easy to add custom elements or styles but getting under the Netsuite ‘hood’ isn’t so simple.
Do you know where I can find any documentation for that bundle? I cant find anything online about it.
Documentation for the Reference Bundles used to be at the end of the PDF documentation for SCA.
It may also be worth looking at SSP and/or the Commerce API, as you may find it simpler to extract the info you’re after using those methods. I’ve been through similar issues in the past and ended up building my own custom checkout using them.