A user wants to add a standalone Buy button for a specific product on a Shopify page using the Dawn v12 theme, without displaying other product details.
Initial Problem:
Buy Button sales channel code doesn’t work when added to the Custom Liquid section
Found alternative code that displays a button, but it’s non-functional
Uncertainty about JavaScript support in Custom Liquid sections
Solution Provided:
JavaScript is allowed in Custom Liquid sections, though functionality depends on implementation
The code snippet shared was identified as problematic/nonsensical
A simpler approach was recommended using Shopify’s product form:
I have a page where I just want to add a Buy button for a particular product without any other product details.
I tried generating code using the Buy Button sales channel, but when I add it to the “Custom liquid” section on the page the code doesn’t work.
I found the following code from a different location, but when I add it in even though the button shows up, it doesn’t do anything. (Is javascript allowed in the custom liquid section?)
If you need this customization created 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.