Hi,
I was wondering if anyone knew how to remove the Buy with Shop Pay button on sold out products? I have been advised that I need to update my code. I would like the button to remain on products that are still in stock. Thanks
Hi,
I was wondering if anyone knew how to remove the Buy with Shop Pay button on sold out products? I have been advised that I need to update my code. I would like the button to remain on products that are still in stock. Thanks
Hi @SuzQ85 ,
If you know a bit of coding you can use display:none or visibility: hidden on the unwanted buttons in your store. Or If you dont mind you can share your URL website and password, so we can provide better solution. Thanks!
Hey @SuzQ85
To remove the “Buy with Shop Pay” button on sold out products, you will need to modify the code of your website or e-commerce platform. The exact steps may vary depending on the platform you are using, but here’s a general approach:
Locate the code responsible for rendering the “Buy with Shop Pay” button on your product pages. This code is typically found within the template files or the product display section of your platform.
Find the logic or condition that determines whether the product is sold out or in stock. This information is usually stored in a variable or an attribute of the product object.
Add an if statement around the code that renders the “Buy with Shop Pay” button, checking if the product is sold out. If the product is sold out, don’t render the button.
{% if product.is_sold_out %}
{% else %}
{% endif %}
In the above example, product.is_sold_out represents the variable or attribute that holds the information about whether the product is sold out. Replace it with the correct variable or attribute name based on your platform.
Remember to make these changes within the appropriate files or sections of your platform. If you are unsure about the specific implementation details, you may need to consult your platform’s documentation or seek assistance from their support team or community forums.
If I managed to help you then, don’t forget to Like it and Mark it as Solution!
Best Regards,
Moeed