Skip Navigation

[Resolved] Split: Displaying sold text for out of stock products

This support ticket is created 2 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by glennN 2 years, 4 months ago.

Assisted by: Waqar.

Author
Posts
#2238739

Hi Waqar,

I'm also trying to add a label "SOLD" instead of showing the pricing for products that are sold out. I've attached a screenshot for reference.

Thank you,
Travis

#2238759

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

To add the "Sold" text for the out of stock products, you can follow these steps:

1. In the content template used for the view, you can include the text, inside a special span tag with class "sold-text", just below the shortcode for the price ( [wpv-woo-product-price] ):


<span class="sold-text">Sold</span>

2. And in the view's CSS editor, you can include some custom CSS code, to show this text for the out of stock items only and add some styling to it:


span.sold-text {  
font-weight: bold;
text-transform: uppercase;
display: block;
border: 1px solid red;
text-align: center;
color: red;
margin-top: 5px;
}

.item.outofstock p.price span,
.item.instock span.sold-text {
display: none;
}

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#2239555

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.