Skip Navigation

[Resolved] Product stock displayed twice

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.

This topic contains 11 replies, has 2 voices.

Last updated by Jamal 2 months, 4 weeks ago.

Assigned support staff: Jamal.

Author
Posts
#1605135

Hi there

I made a custom template for our products, that contains this code:

<h1>[wpv-post-title]</h1>
<p>[wpv-woo-product-price]</p>
<p>[wpv-post-body]</p>
<div>[wpv-woo-buy-options add_to_cart_text="Zur Bestellung hinzufügen"][wpv-add-to-cart-message]</div>

As you can see here (hidden link), the stock information is displayed twice. So far I didn't find a CSS class that I could target to hide one of those elements.

Can you help me get rid of the excess element?

Thanks

#1605601

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for contacting the Toolset support.

I think you can target ".avada-variation.single_variation" for the first one and ".woocommerce-variation.single_variation" for the second one. Check this screenshot hidden link

I hope this helps. Let me know your feedback.

#1605727

Hi Jamal

Thanks, the second one did the trick (the first one made the price disappear as well). However, is there an option to solve the problem within the layout itself? Or is that caused because somehow the theme and woocommerce both load the same element? But why isn't that the case with the other elements then?

Thanks for your help!

#1605799

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

I think that when we choose the option of the product, a Javascript code adds the details(description, price, availability) inside a div with class "single_variation" that is inside a div with class "single_variation_wrap". I do not know why, but there are two divs that match this condition. It it is not happening with default themes(Twenty-twenty, Storefront). I would say that the theme has this compatibility conflict with Toolset, or maybe the use case presents an edge case, I'll need a closer look to learn more about it.

#1606621

Hi Jamal
Could you look into it? We plan to make more projects involving woocommerce, toolset and avada. If you need a copy of the website to test around, I can help with that.
Thanks a lot!

#1606985

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

A copy of the website will be great. Thank you! Please reproduce the issue on it so I can start from there.
Your next reply will be private to let you share credentials safely.

#1616793

Hi Jamal
I can't copy the whole site because of all the client data we have. Therefore I decided to export the modules and provide you with a copy of the theme. You can download everything from here: hidden link.
Let me know in case you need something else. Thanks!

#1617151

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and Thank you for your feedback.

I created a new installation using WooCommerce, Toolset plugins, and Avada. Then I imported your files(2 layouts, 2 content template, 1 view). But I don't see how to reproduce the issue. Maybe I am missing something. Check my screencast: hidden link

Should I assign a content template or a layout to products?

#1619457

Hi Jamal

Please add the following code to the layout you use for the woocommerce products

Left third (visual editor):

<p>[wpv-woo-product-image size="fusion-600" output="img_tag"]</p>

Right two thirds (visual editor):

<h1>[wpv-post-title]</h1>
<p>[wpv-woo-product-price]</p>
<p>[wpv-post-body]</p>
<div>[wpv-woo-buy-options add_to_cart_text="Zur Bestellung hinzufügen"][wpv-add-to-cart-message]</div>

The product should look like this: hidden link

#1621305

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you for your feedback and my apologies for the late reply, I do not work on Mondays.

I tried that too to no avail. Please check here hidden link

You can log in with admin / P@$$word

Would you please try to reproduce the issue? maybe I am missing something. The website is ready and registered if you need to install additional Toolset plugins.

#1622353

Thanks for looking into it. After replicating the product I was able to identify the cause of the issue. I did set separate stocks for the variations. Now when chosing the first option "blue" and any size, the "out of stock" will display twice. So this only happens when you set the stock individually per variation.

#1622625

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Awesome, that's good to know. I suppose now, we can have this thread resolved, right!