Eg to Add a My Account Menu & MyAccountMenu component

Add a My Account Menu named “Preorders” which redirects to a landing page “test”  using extension.  var myaccountmenu = container.getComponent(“MyAccountMenu”);  if(myaccountmenu)  {   var preordersmenugroup = {       id: “preorders”,       name: “Preorders”,       index: 2,       url: “test”,       permissionoperator: “OR”,       permissions: [           {               group: “transactions”,               id: “TRAN_CUSTINVC”,               level: “1” … Continue reading Eg to Add a My Account Menu & MyAccountMenu component

Eg for cart component and event cancelableOn

                    cart.cancelableOn(‘afterUpdateLine’, function() {                         showModal();                     });                     cart.cancelableOn(‘afterRemoveLine’, function() {                         showModal();                     });                     cart.cancelableOn(‘afterAddLine’,function(){                        showModal();                     })

Eg for addToViewContextDefinition & the components PLP, PDP, Cart,

mountToApp: function mountToApp(container) {                 var layout = container.getComponent(‘Layout’);                 var plp = container.getComponent(‘PLP’); //EXTESNION TO FETCH THE ITEM NAME FROM ‘storedescription’ AND DISPLAY IN PLP PAGE.                 if (plp) {                     plp.addToViewContextDefinition(‘Facets.ItemCell.View’, ‘name’, ‘string’, function name(context) {                         var model = _.find(plp.getItemsInfo(), function(item) {                             return item.internalid == context.itemId                         });                         return model.storedescriptio… Continue reading Eg for addToViewContextDefinition & the components PLP, PDP, Cart,

Eg for addChildView & layout component

mountToApp: function mountToApp (container)                               {                                              var layout = container.getComponent(‘Layout’);                                              if(layout)                                              {                                                             layout.addChildView(‘home-carousel’, function() {                                                                            return new HomeSliderView({ container: container });                                                             });                                              }}

Extension components and methods

The SuiteCommerce Extensibility API lets you extend the core SuiteCommerce application to suit your business needs. Use any of the available component classes to customize the application and add new features or functions. Link to Frontend Extensibility API https://system.netsuite.com/help/helpcenter/en_US/APIs/SuiteCommerce/Extensibility/Frontend/index.html Link to Extensibility API Version Table https://system.netsuite.com/help/helpcenter/en_US/APIs/SuiteCommerce/Extensibility/versions.html#suitecommerce-feature-matrix Main Components Cart Checkout CMS Environment Layout LoginRegister MyAccountMenu… Continue reading Extension components and methods

SCA Module structure

In SCA, a module has the following folder structure. Configuration : Contains a JSON file. Modifications to the configuration record of the domain can be achieved using this. JavaScript: Contains the entry point file, Router, Front end Model, Collection and View files SuiteScript:  Contains the Backend model file and the service controller. Templates: Contains the… Continue reading SCA Module structure

SCA SourceCode structure

In the SCA versions prior to Aconcagua, the complete code of the webstore resides in the SSP application folder. The template files, javascript files and the suitescript files resides inside the SSP application folder. There is a backup folder in the SSP application which contains the zip files of the webstore code. When the code… Continue reading SCA SourceCode structure

Generate a PDF file for a transaction record in a suitelet.

Create an xml file of the printing template.Store it in file cabinet /** * @description function for rendering pdf file * @param {filePath} specify the file path for the xml file for pdf template(/suitescript/template/…/name.xml) * @param {recType} specify the record type (salesorder/estimate/invoice….) * @param {Id} internal Id of the record to be printed. */ function… Continue reading Generate a PDF file for a transaction record in a suitelet.