简体   繁体   中英

Edit Files in NetSuite SCA

I was given a task to update CSS of a netsuite ecommerce site built with SuiteCommerce Advanced. The update is very easy but the changes I make do not reflect to the website.

I have located the correct CSS files in File Cabinet but they are located inside Web Site Hosting Files > Live Hosting Files > SSP Applications . I believe that they are created and compiled locally then uploaded/deployed to NetSuite but I do not have the source, and what I need to do is just to update a 1 or 2 very simple style properties.

So how do I update the CSS file?

Note: I've been told that the SCA version is old and it does not have an online source editing feature like the other SCA website we have. I don't know what that editing feature is called but it can be accessed when ESC key is pressed when in a page.

For older SCA sites, you will need to make the change to the CSS file using a IDE and re-upload the file back to NetSuite. Once the file is upload, NetSuite will kick off a background process to "re-compile" the files. You might have to update one of the HTML files on the bundle/SSP application to have NetSuite rebuild that application as well. An example would be if the CSS is in the global and you want to update the style on the ShopFlow bundle/ssp applications; you would update the CSS and upload it. Then I use a HTML comment on one of the ShopFlow files and upload it. This triggers an event in NetSuite to rebuild both the Global ssp and the ShopFlow ssp.

Hopefully that is clear enough. The problem is the differences in the SCA versions. The new ones are completely different than the older pre-Denali versions.

SCA has a gulp based build/deploy process. Normally you can get the initial project from the zip file in the _Sources folder in the SSP app's folders.

However the issue is getting the current deployment's source files. These can be hard to come by -- EVERY SCA project should have managed source code external to Netsuite. I normally use github; some customers have used bitbucket. Lots of options.

So basically : Set up node/npm ideally: clone the .git repo that has the current state of the SCA deployment or :make a .git repo :unzip the project starter in _Sources

npm install etc.

finally gulp clean && gulp deploy

NOTE You can also run gulp local that will provide a local version with your current development files.

Use this by adjusting the url of the place you are at to be *-local.ssp

eg http://myscasite/ssp-deployment-path/shopping.ssp uses your live files

http://myscasite/ssp-deployment-path/shopping-local.ssp uses your local files

If you have aliased your paths you may need to navigate to: http://myscasite/c.COMAPNYID/ssp-deployment-path/shopping-local.ssp

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM