hkshow bought tag not working

  • Posts: 218
  • Thank you received: 8
  • Hikaserial Subscription Hikashop Business
1 year 2 months ago #330424

-- url of the page with the problem -- : accademiainfinita.it/test-page
-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.24
-- Browser(s) name and version -- : Brave - 1.21.73 Chromium: 89.0.4389.72 (Build ufficiale) (a 64 bit)


Hello,
I was testing the new feature

You can now use tags like {hkshow bought="xx"}content{/hkshow} or {hkhide notbought}content{/hkhide} on your website to display content based on whether someone purchased the product xx or didn't purchase anything.

but it doesn't work for me, here is the code I used in a Joomla article

<p><strong>Hikashop test "hkshow bought" - text displaied below if user bought product ID 103</strong></p>
<p>{hkshow bought="103"}content bought{/hkshow}</p>
<hr />
<p><strong>Hikashop test "hkhide notbought" -&nbsp;<strong>text displaied below if user didn't buy anything</strong></strong></p>
<p>{hkhide notbought}not bought anything{/hkhide}</p>
<hr />

I am testing with a user who has bought product with ID 103 (order status "confirmed"), but even when testing as a guest the hkhide notbought content is not displayed

See here: accademiainfinita.it/test-page

Is there maybe a setting I have to activate?



Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 75517
  • Thank you received: 11750
  • MODERATOR
1 year 2 months ago #330454

Hi,

Thanks for your feedback. I indeed found an issue with the "bought" and "notbought" attributes when using a product id instead of the product code.
I've added a patch on our end to fix that.

Download the install package of the 4.4.1 on our website and install it on yours and it will add the patch for that issue;

Regarding the hkhide though it seems to be working as expected.
You used the tag "hkhide notbought" which means that you want to hide the content of the tag when the user hasn't bought any product, which does seem to work on your website since I don't see the content even though I didn't bought anything.

Note that you can more combinations possible than just the two mentioned in the changelog.
You could also have:
{hkhide bought}
{hkhide bought="XX"}
{hkhide notbought="XX"}
{hkshow bought}
{hkshow notbought}
{hkshow notbought="XX"}
That way, it can cope with many difference display scenarios based on what was and wasn't bought.

Please Log in or Create an account to join the conversation.

Time to create page: 0.057 seconds
Powered by Kunena Forum