Falang and Easystore : getTags is no good. The request forgets to take any language - Forum | JoomShaper
Solved EasyStore

Falang and Easystore : getTags is no good. The request forgets to take any language

Asked by Chaka T. 1 year ago Last activity 1 year ago

Hello, I have created tags in easystore and assigned them to products. I have added and activated the tags addon in the SPPB page, but the tag filter is not displayed.

I contacted the Falang developer believing that the problem was with this component. After investigation, it turns out that there's a bug in: components/com_easystore/src/Helper/FilterHelper.php
The getTags is no good: The request forgets to take any language.

So when taqs are in Language, all mode, the easystore filter doesn't take the request into account.

The Falang developer requests that the following patch be applied.

**in the file components/com_easystore/src/Helper/FilterHelper.php

line 330****

change the query like this

$query->select('id, title AS name, alias AS value')
->from($db->quoteName('#__easystore_tags'))
->where($db->quoteName('published') . ' = 1');

if (Multilanguage::isEnabled()) {
//$query->where($db->quoteName('language') . ' = ' . $db->quote(Factory::getApplication()->getLanguage()->getTag()), 'OR');
$query->whereIn($db->quoteName('language'), [Factory::getApplication()->getLanguage()->getTag(), '*'], ParameterType::STRING);
}

$db->setQuery($query);

Thanks

Joomla 5.2 / SPPB : 5.4.4/ Easystore : 1.4.3/ Php : 8.3 / Allura template 1.0.2 Thank you

Accepted answer

Marked as the solution
Toufiq Senior Staff

I have shared your code to our developer team. I hope it will release on next update. Thanks

3 more replies

Chaka T. Asked this

The Falang team indicate that the content element for easystore is available here in 1.1 version
https://www.faboba.com/composants/falang/extensions/item/easystore.html

The content element allow the translation of Products, Categories, Tags (with the change above)

**in the file components/com_easystore/src/Helper/FilterHelper.php

line 330****

change the query like this

$query->select('id, title AS name, alias AS value') ->from($db->quoteName('#__easystore_tags')) ->where($db->quoteName('published') . ' = 1');

if (Multilanguage::isEnabled()) { //$query->where($db->quoteName('language') . ' = ' . $db->quote(Factory::getApplication()->getLanguage()->getTag()), 'OR'); $query->whereIn($db->quoteName('language'), [Factory::getApplication()->getLanguage()->getTag(), '*'], ParameterType::STRING); }

$db->setQuery($query);

Thanks

Toufiq Senior Staff

Hi there,

Thank you for reaching out, and I apologize for any inconvenience caused by this oversight. Should we include this code next update? Please make sure us.

Best regards,

Toufiqur Rahman (Team Lead, Support)

Chaka T. Asked this

Hello and thank you for following up.
Yes, this code should be included in the next update.
Thank you

Chaka T. Asked this
1 year ago · edited

The last update resolve the issue.

Toufiq Senior Staff

You are most welcome! We appreciate your feedback and are delighted to hear that you're satisfied with our service.

To officially close this forum post, mark it as accepted. If you have any more questions or need further assistance in the future, please don't hesitate to reach out to us.

As for writing a review about our product and support quality, we would greatly appreciate it! Your feedback helps us improve and serves as a valuable reference for others. Please take a moment to share your thoughts about your experience with our product and the support you received. Your input is valuable to us and the community. Thank you in advance for your time and support.

Joomla Extension Directory

JED.png

TrustPilot

Trust-Pilot.png

We're here to assist you with any further questions or requests you may have. Once again, thank you for choosing our product and for being a part of our community.

Best regards,

Toufiqur Rahman

Team Lead, Tech Support (JoomShaper)

Log in to reply.