Skip Navigation

[Gelöst] if shortcode not outputting anything

This support ticket is created vor 9 Jahre, 2 Monate. 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/Hong_Kong (GMT+08:00)

This topic contains 7 Antworten, has 2 Stimmen.

Last updated by willem-siebeS vor 9 Jahre, 1 Monat.

Assigned support staff: Luo Yang.

Author
Artikel
#232910

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

#233155

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.

#233161

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.

#233388

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

#233404

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

#233413

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.

#233473

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/

#236066

Thanks for fixing this!