I’m looking to add a button to my product pages that would link to another site. We sell books, and this would go to a site that offers audio versions. The difficulty is that each product we have would link to a unique page over there(for each different book). The pages are based on the ISBN of the book, which we have listed in the SKU and barcode fields for each product. Is there any way to pull this number from the product page and make the link in the description unique to each product? I’ve added a couple to products by inserting an image, selecting the image and inserting a link, but we’d have to manually add each link to thousands of products. Any genius out there know if this can be automated?
The links are like website.org and we just need the ISBN part to change to match the data entered for that particular product, while the rest of the link remains static. Thanks for any help, even just a nod in the right direction
If the link needs to be dynamically put into the existing product description you’ll need an advanced customization use liquid to assign the above to a variable and use liquid to insert/replace the link in the description.
And that’s for a single-variant product, if products have multiple variants each need it’s own link to dynamically update you will also need javascript.
If you need this customization then contact me by my email for services. Contact info in forum signature.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Hi @JBICBV
You should be able to do this using your barcode section of your product. I am assuming you are providing the barcode.
To provide a barcode for your product
From you Admin page, go to Products, and scroll down to Inventory. If you have several variants, you have to click the variant to see the barcode. See image below
@WalkYourStyle - The site is frugalbookstore.net, but I don’t understand why giving the site is not considered personal info (which you’re told never to give online), or how it helps if you can’t see the back-end.
@PaulNewton This solution almost worked, but it didn’t seem to pull the barcode with the url, it sent me to a non-working page of the site, due to no barcode telling it exactly which item
@Made4uo-Ribe - This worked perfectly! Not only did it grab all the right info and send me to the correct page for the book, but the link was actually a button, not just text! Now if I can just figure out how to insert my own image as the link, I’ll be in hog heaven! I put some change in your coffee cup, sir, well done
{{ variant.sku }} needs to be in a variant loop, such as a custom-liquid block in the variant-pickers area, or a setting that accepts custom-liquid.
Which for some themes if in the product forms or product info block often gets automatically updated when the variant selection changes.
product.selected_or_first_available_variant… means the ?variant parameter has to be working or other products get the first variants data as a default; but we can’t be sure of that if we can’t inspect the store or you don’t know to supply that url behavior info upfront.
I’d go ahead edit your post to remove the url while there is time if privacy is a concern, and only give it when crossing certain thresholds.
When seeking technical solutions having something others can access, inspect, and test is critical 97% of the time.
Because often non-technical questions are omitting a ton of detail the asker is oblivious is even a requirement for successful troubleshooting.
Or unaware if it’s even some sticky forum policy somewhere.
But this was a case of just using liquid syntax for dynamic variants.
Really it’s a problem with the forums not giving everyone better communication tools it should be 1 click to ask for a store url&view-pass, and 1 click for a merchant to hide/remove the test info or let it expire.