Hikashop product still visible in under Joomla tag list

  • Posts: 265
  • Thank you received: 2
  • Hikashop Business
1 year 1 month ago #307212

-- HikaShop version -- : 4.1.0
-- Joomla version -- : 3.9.6
-- PHP version -- : 7.2

When a product has been tagged using the Joomla tagging system, when the product is unpublished in hikashop, the product still shows up in the list of products in the joomla tag view.

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

  • Posts: 69940
  • Thank you received: 10476
  • MODERATOR
1 year 1 month ago #307228

Hi,

I'm not able to reproduce the problem on my end.
When I unpublish a product, it is correctly removed from the list of results of a tag on the frontend.
Could you provide screenshots of the tags list, the product settings and the tag itself so that we could better understand the situation ?

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

  • Posts: 277
  • Thank you received: 4
  • Hikashop Business
6 days 22 hours ago #321379

Encountered this problem as well, and found the reason

-- HikaShop version -- : 4.3.0

File: com_hikashop/helpers/tags.php
Line 104

Function saveUCM(...) called OK when saving (un)publish state from product editor.
administrator/index.php?option=com_hikashop&ctrl=product&task=edit&cid[]=4277

When clicking publish / unpublish icon in product listing function saveUCM(...) does not get called.
administrator/index.php?option=com_hikashop&ctrl=product

Hence when using tags need to save the state change through the product editor.

I've not investigated further but I wonder how product availability dates and tags are synchronised - if at all...
Things start to get complicated!

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

  • Posts: 69940
  • Thank you received: 10476
  • MODERATOR
5 days 5 hours ago #321424

Hi,

Indeed, it works only when the product is published/unpublished from the product edition page. I didn't think to check on the listing. I've made a patch so that this can work on the listing too. The patch is now on the current build available on our website and will also be on the next release.
For the rest, they indeed aren't synchronized. That's not really possible as that would require some dynamic trigger from the UCM mechanism when displaying the results page on the frontend so that we could dynamically remove the entries from it after checking the sale start/end.

Instead of using the "tags" feature, you might want instead to use a custom product field with the corresponding filter and then create the links on the product page yourself to access the products listing with the filter preset for each value selected in the custom field.
That way, the result when you click on the link is a clean HikaShop products listing rather than the results of the tag system of Joomla which isn't really adapted to display products. And on top of that, it will support all the features like published, sale start / end dates, access levels, etc.

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

Time to create page: 0.064 seconds
Powered by Kunena Forum