Conditional Statements in JavaScript

“If condition A is true, let’s follow a set of instructions, otherwise, if it is false, let’s do something else.” Now, let’s consider a conditional statement that actually does something: var inNortherHemisphere = true; var latitude = 40.7; if (latitude > 30 && inNorthernHemisphere) { console.log(“It’s cold in December!”); } else { console.log(“It’s not cold… Continue reading Conditional Statements in JavaScript

Basic Process for Setting Up Scriptable Cart

Scriptable cart is functionality that is server-side JavaScript and SuiteScript that runs when a shopper is checking out. Used for: Connecting to a third-party tax calculator Changing price levels of items in a way native functionality cannot Creating buy one / get one type offers in a way the promotions engine cannot Paying using stored… Continue reading Basic Process for Setting Up Scriptable Cart

Update the condition for AddressLock

Create an entity field(checkbox) and add the condition if the checkbox enabled the customer not allowed to add/edit/delete the address.Also an error message should be displayed. solution: Create an entity field in netsuite. And using the id of entity field ,get values from backend. Extend the template file using the getcontext value.

How to change results per Page in SCA.

By default in SCA configuration records, it is set to 20. But sometimes we need to reduce the search results instead of a long number of lists we need to separate this by a number of pages. That’s why we have to reduce the search results. For that, you have to use a standard SCA… Continue reading How to change results per Page in SCA.

Showing Pop Up message for items having no preview image in PDP.

This code is for an alert pop up message when there is no preview image available for a personalised item(Boulevard website, PTC) in PDP . code snippet: Note: Here the value of set Timeout function is very important, the pop will appear only after the default image is loaded, so due to rendering of image… Continue reading Showing Pop Up message for items having no preview image in PDP.

Create Lead Record on registration from website.

Jira code:EN-864 Create a lead record in netsuite after registration from website. Created a new page “International” using extension. After submitting the form, the lead record will be created in Netsuite with entered data and category as Dealer. Entry ponit file: view file: Router.js model.js Suitescript: Model file: Service contoller template sass

To change the order of an item

The order property specifies the order of a flexible item relative to the rest of the flexible items inside the same container. We can change the order of the two buttons without changing the template

Error in saving the CMS after changing the values.

How to resolve the error in CMS (SMT) after changing the values? This error is occurring due to invalid values set to the skin variables. Solution: Navigation to the custom records:-customization >> Lists, Records & Fields >> Record Types >> SC ExtMech Custom Skin >> Click on ‘List’ >>customization >> Lists, Records & Fields >>… Continue reading Error in saving the CMS after changing the values.