1
votes

I'm learning the ropes of BigCommerce & Stencil. I'm following rather outdated tutorial on YouTube in conjunction with the Dev docs here https://developer.bigcommerce.com/stencil-docs/storefront-customization/custom-templates

I'm struggling to map custom page to URL. I've got this in the .stencil file:

{
  "normalStoreUrl": "https://abc.mybigcommerce.com",
  "accessToken": "xyz",
  "port": 3000,
  "customLayouts": {
    "brand": {},
    "category": {},
    "page": {},
    "product": {
      "product-chart": "/new_one/"
    }
  }
}

and I've got product-chart.html located in templates/pages/custom/product/

I've tried to include .html as the docs says and without as the YouTube tutorial says but none works and results in 404 error. I've restarted the development server for all changes to the .stencil file to take effect and loaded up locahost:3000/new_one but no change.

What am I doing wrong ?

1

1 Answers

0
votes

A common reason this will occur is due to the template file set on the product page, which needs to be updated after you apply the custom theme to your sandbox store. You do need to include html as the file extension so be sure to follow that going forward.