Is it possible to show or hide products based on site's language?

  • Posts: 13
  • Thank you received: 0
2 months 2 weeks ago #304436

-- Joomla version -- : 3.9.3

Greetings, I'm currently testing a module called Universal AJAX Live Search so my users can find information from multiple components like articles, products, videos, etc.

The site is multilingual and has enabled all of Joomla's language settings, but the products are classified on parent categories based on the site language, so there are two versions of the same product, one for spanish and one for english.

The module itself works fine, it returns only the articles or menu pages related to the lenguage you are currently using but it doesn't do the same with Hikashop, the module displays both versions of the same product at the same time.

So, is it possible to hide the product based on the site's language? Like some setting similar to the language field that appears in articles or modules. Can it be done with some PHP?

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

  • Posts: 65692
  • Thank you received: 9588
  • MODERATOR
2 months 2 weeks ago #304442

Hi,

There is no option for that.
If you know PHP yes. You would have to create a custom field of the table "product" to select/store the language of the products.
Then, you could make a copy of the hikashop_products search plugin and add a condition to the MySQL to only select the products of the current language.

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

Time to create page: 0.053 seconds
Powered by Kunena Forum