- Posts: 15
- Thank you received: 6
Hikashop XMap Plugin with Joomla 4
- institutcalysta
-
Topic Author
- Offline
Less
More
4 years 11 months ago #337263
by institutcalysta
Hikashop XMap Plugin with Joomla 4 was created by institutcalysta
-- HikaShop version -- : 4.4.4
-- Joomla version -- : 4.0.3
I did not manage to get the latest XMap plugin working with Joomla 4 ( www.hikashop.com/support/documentation/8...ation-with-xmap.html ).
It showed an error message instead of generating the XML sitemap.
I tracked this down to some deprecated function calls. "JArrayHelper" should be replaced by "ArrayHelper".
Did I miss some update for this plugin somewhere else?
See below my modifications.
Add the use clause at the beginning of "com_hikashop.php" within the XMap Hikashop plugin:
Then modify the code in function getTreeFct(&$xmap, &$parent, &$params) as follows:
First call to XML may take some time, but products are correctly mapped again.
If a Hikashop developer could confirm this bug and update the plugin. It might help others trying to migrate to Joomla 4.
Best regards
-- Joomla version -- : 4.0.3
I did not manage to get the latest XMap plugin working with Joomla 4 ( www.hikashop.com/support/documentation/8...ation-with-xmap.html ).
It showed an error message instead of generating the XML sitemap.
I tracked this down to some deprecated function calls. "JArrayHelper" should be replaced by "ArrayHelper".
Did I miss some update for this plugin somewhere else?
See below my modifications.
Add the use clause at the beginning of "com_hikashop.php" within the XMap Hikashop plugin:
Code:
use Joomla\Utilities\ArrayHelper;
Then modify the code in function getTreeFct(&$xmap, &$parent, &$params) as follows:
Code:
$task = ArrayHelper::getValue($link_vars,'task','');
$ctrl = ArrayHelper::getValue($link_vars,'ctrl','');
$itemid = $parent->id;
if (empty($task))
$task = ArrayHelper::getValue($link_vars,'layout','');
if (empty($ctrl))
$ctrl = ArrayHelper::getValue($link_vars,'view','');
if (empty($itemid))
echo 'itemid vide';
First call to XML may take some time, but products are correctly mapped again.
If a Hikashop developer could confirm this bug and update the plugin. It might help others trying to migrate to Joomla 4.
Best regards
Please Log in or Create an account to join the conversation.
4 years 10 months ago #337297
by nicolas
Replied by nicolas on topic Hikashop XMap Plugin with Joomla 4
Hi,
Thank you for your feedback. We hadn't tested the plugin yet on Joomla 4.
So it's great that you did and you even provided the fix for it.
I checked the code and the fix and it looks good yes.
We'll integrate the changes on our end.
Thank you for your feedback. We hadn't tested the plugin yet on Joomla 4.
So it's great that you did and you even provided the fix for it.
I checked the code and the fix and it looks good yes.
We'll integrate the changes on our end.
Please Log in or Create an account to join the conversation.
Time to create page: 0.162 seconds