Order detail url SEF issue

  • Posts: 132
  • Thank you received: 2
9 years 7 months ago #198060

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.10

Hi!

I've run into a issue where when a registered user receives his order creation notification / order notification, the link to the order details page looks like this:

index.php?option=com_hikashop&ctrl=order&task=show&cid[]=109&Itemid=556

Instead of our SEF url, if a user however accesses the order details through our website the url is correct like this:
/shop/member-area/order/show/cid-109.html

A second thing that I noticed is that the product URL has also changed, instead of the regular SEF URL the product (in the order details page still) URL displays like this:
/component/hikashop/cid-2.html

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 7 months ago #198087

Hi,

Depending where the email is generating, the SEF might not be fully accessible ; like when you are in the backend and you want to generate a front-end link.
You can't use the Joomla router at this moment because it will try to generate a backend link, not a front-end one.
So in HikaShop we have a function named "hikashop_frontendLink" which is there to help to create a front-end link in a back-end context ; but it does not handle the SEF because of the router.

About the last link, it looks like the URL is generating without any Itemid, so it results a generic SEF url.

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: 132
  • Thank you received: 2
9 years 7 months ago #198337

Jerome wrote: Hi,
You can't use the Joomla router at this moment because it will try to generate a backend link, not a front-end one.
So in HikaShop we have a function named "hikashop_frontendLink" which is there to help to create a front-end link in a back-end context ; but it does not handle the SEF because of the router.


So, I would have to either remove / change the link in the e-mail or hardcode the change I want into the hikashop_frontendLink?

About the last link, it looks like the URL is generating without any Itemid, so it results a generic SEF url.


The URL's are generated from / by Hikashop itself, they are accessed through the Hikashop User control panel and then in "View orders", so I don't know why they are without a itemid, all though we also had a similar issue with our checkout links, so I don't know if there is a correlation

Last edit: 9 years 7 months ago by earmaster.

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
9 years 7 months ago #198465

Hi,

1. Why is that a problem to you ? The fact that the link is no SEFed in the email has no incidence on your SEO. I don't see any problem with that.
If you want to remove/change it, you can edit the email via the menu System>Emails, and yes, you'll be able to remove/change it. But no need to edit the hikashop_frontendLink function.
Add such line at the beginning of the preload area and that should do the trick:
<?php $data->order_url = '/shop/member-area/order/show/cid-'.$data->order_id.'.html'; ?>

2. The URLs are partly generated by HikaShop.
The component/hikashop part of the URLs is something added by the router of Joomla to the URL because there is no Itemid parameter in the URL and that happens because there is no menu set or because it is set with a menu item of a different extension than HikaShop and Joomla needs the add that piece to have the routing system work properly.
On the checkout, you can avoid that by having a menu item of the type hikashop selected in the "force a menu on checkout" option of the HikaShop configuration.
On the user control panel, if you access it from a menu item of the type "hikashop user control panel" that should not happen.
So basically, it's a matter of how you configure your menu items.

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

  • Posts: 132
  • Thank you received: 2
9 years 7 months ago #198500

Hi!

1. Why is that a problem to you ? The fact that the link is no SEFed in the email has no incidence on your SEO. I don't see any problem with that.
If you want to remove/change it, you can edit the email via the menu System>Emails, and yes, you'll be able to remove/change it. But no need to edit the hikashop_frontendLink function..


It's not a problem as such, it springs more from a need to know how much I can alter without having to go into the core files of hikashop, though I've realized that I should have used a different kind of wording in my posts.

On the user control panel, if you access it from a menu item of the type "hikashop user control panel" that should not happen.
So basically, it's a matter of how you configure your menu items.


The "shop/member-area" is of the type "hikashop user control panel".

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 7 months ago #198778

Hi,

It will be useful to have a link to your store in order to understand exactly from where the URL are coming from.
Even if you're in the HikaShop user control panel page ; if the link is coming from a product listing module where the "menu" is not set or set using a wrong menu ; it could generate this kind of issue.
But because we currently don't know where the link really are ; it's difficult to gave you a precise (and useful) answer.

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: 132
  • Thank you received: 2
9 years 7 months ago #198805

Hi!

www.earmaster.com/shop.html

We launched our shop yesterday, so you can also access it by clicking the "buy now" button

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

Time to create page: 0.050 seconds
Powered by Kunena Forum