commerce icon indicating copy to clipboard operation
commerce copied to clipboard

Shopify Navigation and menus

Open tanjunior opened this issue 1 year ago • 9 comments

I am following the Integration Guide it didn't exactly show an example for what value to enter for menu items. I tried a few ways and couldn't get it to work.

First I tried selecting Pages>About from the drop down menu. image

When clicked on About in the footer it goes to domain/pages/about instead of domain/about

And if I set it as image It does not work when navigating from any search route. domain/search/shirts will go to domain/search/about

same as for header image Clicking on Stickers from Shirts domain/search/shirts will go to domain/search/search/stickers

tanjunior avatar Jan 07 '24 16:01 tanjunior

I have the same problem, did you fix it?

danieldanielecki avatar Jan 10 '24 18:01 danieldanielecki

I'm also experiencing the same issue. :(

simpslandyy avatar Jan 15 '24 05:01 simpslandyy

Oh, no sorry. I simply can't see navigation at all. Have you faced such an issue?

danieldanielecki avatar Jan 17 '24 08:01 danieldanielecki

Similar, I'm noticing all the pages go to :domain/pages/:subpage> instead of :domain/:subpage and idky. :(

simpslandyy avatar Jan 19 '24 02:01 simpslandyy

One possible solution for the issue of :domain/pages/:subpage is to follow the suggestion of OP and change the page links to /about instead of using the page "About". Screenshot 2024-01-18 at 7 14 38 PM If the site is hosted on vercel, it might be necessary to clear the cache on vercel to see the changes reflected on the navigation bar. I found that i had to do that before I could see the new navigation to :domain/:subpage instead of :domain/pages/:subpage.

I'm still have the last issue that OP mentioned.

same as for header image Clicking on Stickers from Shirts domain/search/shirts will go to domain/search/search/stickers

issackj1 avatar Jan 19 '24 03:01 issackj1

And if I set it as image It does not work when navigating from any search route. domain/search/shirts will go to domain/search/about

same as for header image Clicking on Stickers from Shirts domain/search/shirts will go to domain/search/search/stickers

This change: https://github.com/issackj1/commerce/commit/9a2ececa65ef24c49d0730670bafd15bc0db3815 seems to fix it for me

issackj1 avatar Jan 19 '24 03:01 issackj1

Oh, no sorry. I simply can't see navigation at all. Have you faced such an issue?

Same!

enterpriseSoftware avatar Feb 26 '24 01:02 enterpriseSoftware

Oh, no sorry. I simply can't see navigation at all. Have you faced such an issue?

Same!

Check https://github.com/vercel/commerce/issues/1281#issuecomment-1919599823, it magically fixed by itself... super unstable repo tbh, didn't expect it from Vercel.

danieldanielecki avatar Feb 26 '24 07:02 danieldanielecki

There is also a caching issue. The current code force-cache's the results, so you won't get updates. I tried adding a new tag for updates under the Online Store section without luck. Shopify support also wasn't able to help (I tried Theme update and Shop update without luck). I resorted to adding a no-store cache for getMenu(). Happy to make a PR here.

backbone-link avatar Aug 09 '24 23:08 backbone-link