-- 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:
use Joomla\Utilities\ArrayHelper;
Then modify the code in function getTreeFct(&$xmap, &$parent, &$params) as follows:
$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