gatsbyjs / gatsby-starter-shopify

A Gatsby starter using the latest Shopify plugin showcasing a store with product overview, individual product pages, and a cart
https://shopify-demo.gatsbyjs.com/
BSD Zero Clause License
311 stars 137 forks source link

small fixes #60

Open mikejw opened 2 years ago

mikejw commented 2 years ago

This gets the search page running once built instead of throwing undefined errors.

There are still issues I'm noticing.

  1. The search page isn't populated with all products on first load.
  2. Product links from the search page results have an extra slash in the URI. e.g. "http://www.dev.org/products//cuboid".
  3. Clicking "View empty products" link from an empty cart page loads the search page but doesn't populate it with products. Perhaps the query string needs to be populated with a wildcard (*) somewhere? Perhaps this is related to point 1.
  4. Once deployed there isn't a compiled search page to land on when refreshing the browser at the "/search" URI. I'm using mod_rewrite to redirect to "index.html" however the default routing means the user is redirected to the home page anyway when trying to load "/search..." fresh in the browser.
mikejw commented 2 years ago

Closed as per comment this comment https://github.com/gatsbyjs/gatsby-starter-shopify/issues/57#issuecomment-1004145877, which states the code should be run with a node process (npm run serve) on a VPS.

mikejw commented 2 years ago

I'm reopening this ticket as I'm noticing these errors still appear when using gatsby serve behind a proxy. i.e. nginx. There are errors that prevent the search page from loading which is addressed in the PR. Please ignore points 2 (see separate pull request: https://github.com/gatsbyjs/gatsby-starter-shopify/pull/61) and point 4!