I am trying to:
To display my product price only if stock status is equal to 1 (meaning product is not out of stock), or a word (VENDUTO) which means SOLD OUT. Word is being displayed correctly.
I visited this URL:
aikgiordano.com
single product page
I expected to see:
I expect to see product price whenever stock status is higher the 1.
Instead, I got:
Products with zero stock status display the word VENDUTO and this is correct.
However I see the product price shortcode outputted, insted of the price, which is being outputted correctly without the condition shortcode.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Raphael,
Thank you for contacting our support forum.
That is strange as it should work normally. Do you have our Woocommerce Views plugin enabled? As this is the plugin that allows you to use these shortcodes.
Please let me know.
Thanks,
Shane
Yes Woocommerce Views Plugin is enabled.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Raphael,
Would you mind providing me with admin access to the website so that I can have a look ?
The private fields will e enabled for your next response.
Thanks,
Shane
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Raphael,
Would you mind if I took a duplicator package off your website to perform some further testing ?
This will allow me to create a backup on my localhost.
Please let me know.
Thanks,
Shane
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Raphael,
It does not seem that the duplicator package will work out, however is this a test site where I can make changes without worry?
Please let me know.
Thanks,
Shane
Hi Shane,
yes, don't worry, its just a test site, do anything you want and need to do.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Raphael,
We have released our New beta plugins could you try them and let me know if the issue still persists?
I believe the problem is limited to your site as it seems that something is causing the code not to render.
https://toolset.com/account/downloads/
Use the dropdown and select BETA.
If that still does not work then I could draft up a custom shortcode that does the exact same thing for you .
Thanks,
Shane
Hi Shane,
unfortunately, the beta updates are not solving the problem.
Basically the space in between the if statment it returns a plain text instead of a code.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Raphael,
It seems that I have gotten the tickets a bit mixed up.
Could you also try this method here as it was initially meant for this thread,
https://toolset.com/forums/topic/using-any-related-products-shordcodes-output-only-text/#post-550539
Thanks,
Shane
this code in one of the visual edior of the layout is the cause of the problem, I've removed it and now prices shortcode works
[wpv-woo-display-tabs disable_reviews_tab='no']
Basically calling into the layout the woocommerce description box will brake the price shortcode