Skip Navigation

[Resolved] Showing woocommerce product as sold in product archive

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 1 year, 7 months ago.

Assisted by: Minesh.

Author
Posts
#2701927

I need to show a product as sold on the product archive page and remove the add to cart button

Is there any documentation that you are following? No

Is there a similar example that we can see? Not that I am aware

What is the link to your site? On this page hidden link the item "Worthing Town and People" has been sold and the stock quantity is showings as out of stock. Clicking on the "Buy Now" button confirms this. I need to be able show the item as sold and remove the buy now button.

#2701983

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

You can add conditional block and add the condition based on your product is sold out or not.

Please check the following Doc that will give you idea about how to configure it.
- https://toolset.com/2021/08/5-advanced-uses-of-toolsets-conditional-block-in-wordpress/

#2701985

I can see that conditional block would allow me to add a sold badge but that would entail logging in and maually activating the field when an item is sold which is not really practical. It also doesnt solve the issue of the add to cart button. If I dont use Toolset and use the conventional woocommerce archive then the add to cart button is hidden when the stock is zero and adding a sold badge is easily done in functions.php. It does not seem logical that the Toolset add to cart button is displayed when the stock level is zero so is ther something that I am overlooking?

#2701987

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

You can add another conditional block to display Add to Cart button based on the stock status or stock quantity field.

#2701992

I can see that conditional block would allow me to add a sold badge but that would entail logging in and maually activating the field when an item is sold which is not really practical. It also doesnt solve the issue of the add to cart button. If I dont use Toolset and use the conventional woocommerce archive then the add to cart button is hidden when the stock is zero and adding a sold badge is easily done in functions.php. It does not seem logical that the Toolset add to cart button is displayed when the stock level is zero so is ther something that I am overlooking?