Recently I created a website on Shopify but my Shopify buy now button isnot working on the site. I don’t why can u please help me to resolve the issues? I am non technical person. I know theme editor.
Website:- www.stylewish.in
A Shopify store owner reported that their \
Recently I created a website on Shopify but my Shopify buy now button isnot working on the site. I don’t why can u please help me to resolve the issues? I am non technical person. I know theme editor.
Website:- www.stylewish.in
Hello @sachinkhandelwa ,
It’s good practice to create a copy of your theme and work on that to preview the changes before applying, especially if you are editing the raw code. Alternatively, you can also use the Shopify theme editor’s versions to revert to previous versions, but it is not recommended if you are making multiple changes.
Now to your specific question on Shopify Buy Now button not working on the store. Upon investigation, it appears that the root cause lies within the theme’s CSS code. Currently, the CSS code responsible for styling the button checks whether the ‘disabled’ attribute is present but fails to verify whether it’s set to ‘true’ or ‘false’. As a result, even though the ‘disabled’ attribute is set to ‘false’, the CSS rules incorrectly disable the button’s click functionality. You can verify this by examining the screenshot provided below, illustrating how the ‘disabled’ attribute remains set to ‘false’ while the CSS inadvertently disables the button’s ability to be clicked.
Now to fix this, please follow the steps below:
Open the code editor, as shown in the screenshot below.
Create a snippet called ‘custom-buy-now-button-styles’ and add the below code:
{% render 'custom-buy-now-button-styles' %}
It should look something like below:
Additionally, I advise getting in touch with your theme developer about this issue. It’s essential to urge them to examine the CSS code and make adjustments to prevent buttons from being erroneously disabled, even when the ‘disabled’ attribute is set to ‘false’.
Hope this helps!
Regards,
Abhishek from Swym
Thank You
For your help and time.
The buy now button is working now.
Thanks & Regards
Sachin Khandelwal