How to find URL for locally testing my theme

369 Views Asked by At

I tried to fetch the current theme of my NetSuite website and edit it and check it locally, but didn't find the local link.

I didn't get this part, explained on NetSuite Help Center:

To view your customized theme in a browser, navigate to the local version of the application using one of the following URLs:

http://<DOMAIN_NAME>/c.<ACCOUNT_ID>/<SSP_APPLICATION>/shopping-local.ssp

I tried the below links but not working:

http://localhost:7777/c.1234567/scs/shopping-local.ssp

https://domain-name.com/c.1234567/scs/shopping-local.ssp (I try it with my organization id and company domain name)

At localhost:7777 nothing loaded up and at the second link site loaded but without my changes in header.tpl or footer.tpl module files.

1

There are 1 best solutions below

2
On

The development mode piggybacks off of the live site. Basically the live site has some special .ssp pages that, instead of loading resources from Netsuite, proxy to a service on your local host.

For example if you were running a site at http://www.mynsbasedsite.com

on site that has url root /kilimanjaro then to see your development changes you'd enter the url: http://www.mynsbasedsite.com/c.<ACCOUNT_ID>/kilimanjaro/shopping-local.ssp

Are you running the local dev service? e.g.

gulp local

If you start that up in the last few lines you should see one or both of these:

+- Local http server available at:  http://localhost:7777/
+- Local https server available at:  https://localhost:7778/

If you don't see the https reference it's because you haven't created a self signed cert for your local server. Most modern browsers need some coercion to load the either of those.

e.g. when I am testing with Chrome I do the following:

  • open the staging url and get a blank page
  • open dev tools and go to the network tab
  • find checkout.js in red with a failed status
  • right click and choose 'open in new tab'
  • see the page warning, click 'Advanced' and click 'Proceed to localhost (unsafe)'
  • go back to the original tab and refresh.

the versions of SuiteCommerce I'm familiar with use Express under the hood for the local server so any ssl tutorial on Express should include a section on using openssl to generate your key and cert. Once you've created them they go in the root folder of your project and you reference them in the taskConfig section that starts like:

"tasksConfig": {
        "local": {
            "http": {
                "port": 7777
            },
            "https": {
                "port": 7778,
                "key": "./key.pem",
                "cert": "./cert.pem"
            },
            "lessSourcemap": false,
            "jsRequire": true
        },
        "configuration": {

After all that navigate to your live site.