Hi.
I want to display something, if [wpv-woo-productcategory-images] is empty.
[wpv-woo-productcategory-images] doesn't exist in conditional output selector.
So i tried to manually insert the field in the condition like below, but it is not working either.
[wpv-conditional if="( '[wpv-woo-productcategory-images]' eq '' )"]
<img src="<em><u>hidden link</u></em>">
[/wpv-conditional]
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Thomas,
Thank you for contacting our support forum.
Could you add the debug='true' attribute to your shortcode and let me know what the output on the frontend is.
Thanks,
Shane
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Thomas,
The debug information is printed on the frontend.
SO you will need to check the frontend where this conditional is being loaded to get information on this.
Thanks,
Shane
I did check the frontend. No debug info available.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Thomas,
Thank you for the information.
Would it be possible for you to provide me with access to the site as well as a link to the page.
It is quite strange that the debug information is not showing because this would clue me to the reason for the conditional not working.
The private fields have been enabled for your next response.
Thanks,
Shane
I don't need to verify if the field is empty anymore, because i agreed with the client that they must fill out the field, because i couldn't get it to work and it took too much time.
I suggest you make a WP installation with WooCommerce, Views and WooCommerce Views, and try to verify it. You cannot verify if the [wpv-woo-productcategory-images] field is empty or not empty. "eq" or "ne" both returns nothing.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Thomas,
You are absolutely correct.
Given that the shortcode is generated by woocommerce views it is an expected outcome. It is because the [wpv-woo-productcategory-images] shortcode isn't a part of the views core plugin.
To get this to work all that is needed is to add it to our views Third-party shortcode arguments. This option can be found in Toolset -> Settings -> Frontend.
From here you can add the shortcode name "wpv-woo-productcategory-images" This should resolve your issue of the shortcode not working in the conditionals.
Thanks,
Shane
Thank you Shane. I'm kind of surprised that since it is a WooCommerce Views shotcode, that it didn't work with Views.
Didn't think about adding it from the settings page.