Shopify / buy-button-js

BuyButton.js is a highly customizable UI library for adding ecommerce functionality to any website.
http://shopify.github.io/buy-button-js/
MIT License
245 stars 115 forks source link

changing buttonDestination to 'onlineStore' results in 404 erros #403

Closed luciphear closed 5 years ago

luciphear commented 7 years ago

Problem: changing buttonDestination to 'onlineStore' so that the buy button directs the user to the full product details page results in a 404 error

Workaround: set up a redirect so that there is no 404 error

Details: The buy button passes the url in the following format:

yourShopifyDomain.myshopify.com/products/xxx?miscInfo

where xxx is the unique product ID in the shopify system

Problem is the store doesn't recognize the unique product ID

Instructions: on your redirects page, make sure /products/xxx redirects to /products/productHandle

j-greig commented 7 years ago

So you have to create a redirect rule for every product???

Justinclewis94 commented 5 years ago

Has anyone found a different workaround for this? Manually creating a new redirect every time we add a product is not an option.

melissaluu commented 5 years ago

A redirect should not be necessary - using the buttonDestination: 'onlineStore' config will redirect users to the online store product page (http://shopify.github.io/buy-button-js/customization/).