Issue with "Subscriptions" link in the HikaShop user control panel

  • Posts: 244
  • Thank you received: 30
  • Hikaserial Subscription Hikashop Business
5 days 6 hours ago #367889

-- HikaShop version -- : 6.0.0
-- HikaSerial version -- : 5.1.0
-- Joomla version -- : 5.3.0
-- PHP version -- : 8.1.32
-- Browser(s) name and version -- : Google chrome

Hello,
The problem is the same whether SEF is enabled in the global settings or not.
I've encountered an issue with the link to the Subscriptions section in the HikaShop user control panel.
As shown in the attached screenshot, all the links in the user dashboard follow a consistent structure that includes:

/contul-meu/detalii-cont/
For example, the Orders link is correctly generated as:
https://my-domain.ro/contul-meu/detalii-cont/order
Same for each menu option from control panel.

However, the link for the Subscriptions section is currently generated as:
https://my-domain.ro/component/hikashop/subscription/listing
This breaks the navigation and layout of the user control panel.
I tested manually, and if I change the link to:
https://my-domain.ro/contul-meu/detalii-cont/subscription/listing
... everything works as expected, and the user remains within the styled and structured account panel.

The same thing is happening with the renew link for a subscription.
https://my-domain.ro/component/hikashop/subscription/renew/subscription-1/product-2964

Best regards,

Attachments:
Last edit: 5 days 6 hours ago by oxido.

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

  • Posts: 26259
  • Thank you received: 4042
  • MODERATOR
2 days 18 hours ago #367916

Hello,

The SEF links can be modified by adding the ItemId to the generated URL.
In the view "subscription / listing", you can add " $this->url_itemid " at the end of URL that you want to fix.
I'll see in our end what are the missing URLs and why this behavior now exists.
HikaShop and HikaSerial generally add the current ItemId into the URL if its match to the right menu ; so adding such parameter should be useless.

Regarding the link in the user control panel, that link is added by the HikaShop Serial plugin ; unlike views, you can not override it like that.
But again, the ItemId for the menu is added during the completeLink ; that's why I can't reproduce you issue in our demo website :
demo.hikashop.com/index.php/en/other-fea...s/user-control-panel

Are you using a special SEF plugin?

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 244
  • Thank you received: 30
  • Hikaserial Subscription Hikashop Business
20 hours 58 minutes ago #367939

On line 46 there is already '$this->url_itemid' at the end of the link, and it exists in several places in the file, but if I var_dump this variable, it has no value: string(0) ""

foreach($this->subscriptions as $subscription) {
$url = hikaserial::completeLink($this->param_prefix.'subscription&task=show&cid='.(int)$subscription->subscription_id.'&name='.$subscription- >pack_name.$this->url_itemid);
?>

No, I don't use any specific plugin for the SEF, just the standard option in joomla and renaming the htaccess.txt file to .htaccess
I use the template Gantry, but that should not be the problem.

Are you suggesting to change that line of code like this? :
$url = hikaserial::completeLink($this->param_prefix.'subscription&task=show&cid='.(int)$subscription->subscription_id.'&name='.$subscription->pack_name.'1825');
Shouldn't it also contain &Itemid=1825?

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

  • Posts: 26259
  • Thank you received: 4042
  • MODERATOR
11 hours 31 minutes ago #367950

Hello,

The variable " $this->url_itemid " is fill during the display initialization of the view.
That variable contains "&Itemid=..." if the global Joomla variable "$Itemid" contains a value.
If you dump the variable and it was empty, it means that the current URL is not related to a Joomla menu ; otherwise the variable should contains the identifier of the menu.

In order to understand more precisely your issue, we would need more details on the pages which have the issue

Harcoding the menu in your URL is not a recommended solution.
If you change the menu somehow, you will have to re-edit all your views.

But, if you really want to configure the menus ; you can use the HikaShop/HikaSerial configuration system to add your custom entries.
So you can use the "url_itemid" if not empty, or build a " &Itemid=... " based on an HikaShop or HikaSerial config entry ; and you can add several entries for different menus (dependingyour needs).

It would be one possible solution ; even if the best would be to understand why the "Itemid" variable is not set with the current Joomla menu.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Moderators: Obsidev
Time to create page: 0.074 seconds
Powered by Kunena Forum