Hi,
On my Views archive targeting woocommerce archive pages, there will be a message when there are no products found. I trie to add information to it based on the 'if' method. See below:
[wpv-no-items-found]
[wpv-if evaluate="'[wpv-current-user info="role"]' = 'customer'"]EXTRA INFO[/wpv-if]
[wpv-if evaluate="'[wpv-current-user info="logged_in"]' = 'false'"]EXTRA INFO[/wpv-if]
[wpml-string context="wpv-views"]<p class="views-info">Deze combinatie is helaas niet mogelijk. Verwijder uw filter of klik op vorige in uw browser. Dan vind u alsnog de klepbank die u zoekt! Komt u er niet helemaal uit, neem dan <a href="<em><u>hidden link</u></em>">contact</a> met ons op.</p>[/wpml-string]
[/wpv-no-items-found]
However, the 'EXTRA INFO' is not outputted.
Hope to hear.
Kind regards,
Willem
Hi Willem,
I have tested the codes you mentioned above in my localhost, it works fine,
Are you using latest version of Views?
Please make sure you are using a customer or visitor account to test the result,
and if the problem still exists, please try this:
deactivate other plugins and switch to wordpress default theme, and test again.
Hi Luo,
Thanks for testing.
1) I have tested the codes you mentioned above in my localhost, it works fine,
Is it accesible for me so I can have a look as well?
2) Are you using latest version of Views?
Yes.
3) Please make sure you are using a customer or visitor account to test the result
I use 'logged_in' false, so I should see a result for that without logging in to the site, but I don't see anything.
I tested here:
hidden link
user/pass: xgren/111111
It does output the "EXTRA INFO ", when I tested with a visitor account.
view using:
hidden link
If the problem still exists, please try duplicate same problem in above site
Hi Luo, I did some tests and inside a 'VIEW' it all seems to work (couldn't test the role=customer though).
However, where I use it is inside a 'WORDPRESS ARCHIVE'. And there it is not working. I use a WordPress Archive for display product categories from WooCommerce in my own format.
Kind regards,
Willem
Thanks for the feedback, I have been able to duplicate same problem in my localhost, and put it into our todo list, our developers will take care of it,
Currently I suggest create a normal view and put it into a page to replace the wordpress archive page.
Here is the feedback from our developers:
This is fixed in the last released Views beta, please try and feedback if the problem is fixed.
you can download it here :
https://toolset.com/download/views-beta/