By extending the View File from an entry point file of an extension, you can transfer a new variable to the associated template file. Sample code shown below
Tag: sca extension
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
How to Add a New div Between Two Elements in an HTML Template Using JQurey
Adding a new element between two already existing elements in a template file using Javascript and JQuery. This method can be used for editing templates without directly editing theme in SCA websites. This method can be used in extensions. HTML code: Javascript + jQuery: Output: Elem 1 New Elem Elem 2
Hide specific tab from website
To hide any tab from all devices and menu, my account, header menu, mobile devices. Example below shows the code to hide “Return” tab To hide from my-account To hide from header menu
How to resolve Error in extension: Module ‘GlobalViews.CountriesDropdown.View’ not found.
In order to add country field in form, I have used ‘GlobalViews.CountriesDropdown.View’ in the view file. But it is creating issue . Solution: These files ‘GlobalViews.CountriesDropdown.View’ are not available in shopping domain and myaccount domain. So remove it from those domains and deploy it to only checkout. This can be done by editing manifest file.
To Run Default NetSuite Extension Locally on your System
If you want to run the Netsuite Extension local like FeaturedCategory. First on Go to Netsuite and file cabinet SuiteScripts > extensions > NetSuite > FeaturedCategory@1.2.0 choose the extension from the path like here we have chosen FeaturedCategory@1.2.0. Download the file and add it to the workspace you have fetched and run locally so we can get the default Netsuite Extension… Continue reading To Run Default NetSuite Extension Locally on your System
POST action error in form submission using extension
Created an extension to create a Lead record in netsuite on form submission. But while submitting the form it is throwing POST action error. Solution: Check the vendor in manifest and folder name created for the service file in Netsuite. Both should be same. The vendor name is case sensitive so while using the model,… Continue reading POST action error in form submission using extension
Extension activation issue
While activating extension in NetSuite account keep getting error. Tried with possible ways but not getting the results. Tried with deleting activated record, tried activation without extension, with only one default extension, custom existing custom extensions but keep getting errors. If anyone faced the same please share the solution how I can resolve it.
How to rename existing fields in SCA webstore MyAccount in 2021.1 Version.
Need to rename the fields in every page like if user in PLP page, PDP page or it’s checkout page. From my account need to change the fields. Fetch and create the new extension in the existing fetched theme. need to use JavaScript, Template, Sass file and need to change in header menu in all… Continue reading How to rename existing fields in SCA webstore MyAccount in 2021.1 Version.
Creating new custom tab in Webstore in Elbrus Version.
Need to create a extension with the JavaScript, Templates, files and need to do some configuration in Model files. Tab name ResaleCertificate and JavaScript file, View file, Model file, Router file, tpl file. //ResaleCertificate.js define(‘ResaleCertificate’, [ ‘ResaleCertificate.Router’, ‘ResaleCertificate.Model’, ‘SC.Configuration’, ‘Utils’, ‘Profile.Model’, ‘jQuery’, ‘underscore’ ], function(Router, ResaleCertificate, Configuration, Utils, ProfileModel, jQuery, _) { ‘use strict’; console.log(‘ResaleCertificate’)… Continue reading Creating new custom tab in Webstore in Elbrus Version.