Order number link sent on status update email results in 404 page not found

  • Posts: 20
  • Thank you received: 1
  • Hikashop Business
4 years 6 months ago #318404

-- url of the page with the problem -- : therailwayconductor.co.uk/
-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.18.
-- PHP version -- : 3.9.18.
-- Browser(s) name and version -- : Firefox 75.0 (64-bit)
-- Error-message(debug-mod must be tuned on) -- : 404

Hi Guys,
The notification emails sent to the customer contain a link to the order number.
On order creation: "We are pleased to confirm the creation of your order No.xxxx (hyperlink)"
eg: /user-control-panel/order/show/cid-0-123/order_token-XYZ
This link works and is stored in the SH404sef table.
Subsequent changes to the order status sends further notification emails to the customer:
On confirmation of order the email states:
"The status of your order No. xxxx (hyperlink) has been changed to confirmed."
the url provided for the order number link is now:
/component/hikashop/order/show/cid-123/order_token-XYZ
This results in a 404 page not found error as the URL is not in the SH404sef SEF url's table
On change of status to 'shipped' another notification email is sent to the customer:
"The status of your order No. xxxx has been changed to shipped."
the url provided for the order number link is now:
/index.php?option=com_hikashop&ctrl=order&task=show&cid[]=123&order_token=XYZ&Itemid=109
This URL also results in a 404 page not found error.

Any ideas / help in providing usuable links on the customer notification emails would be most appreciated.
Very best regards
Graham Wales

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
4 years 6 months ago #318419

Hi,

I think that's because sh404SEF is not loaded in the backend. And thus when HikaShop generates the URLs in the backend, sh404SEF doesn't know about them and thus it cannot add them to its cache. And them, when you use the link on the frontend, it doesn't work because sh404SEF doesn't know about them.
This looks like something difficult to fix as it would change the paradigm of the way sh404SEF works.
I would recommend to modify the emails via the menu System>Emails, and change the URL to direct instead the customer to your control panel menu item URL.
So for example, you could change the line:
$url = '<a href="'.$order_url.'">'. $url.'</a>';
to:
$url = '<a href=" therailwayconductor.co.uk/user-control-panel ">'. $url.'</a>';
in the preload of the email.
Now if you have guest checkout activated, that won't work for guest users as they can't access the control panel since they don't have a user account.
In that case, I would recommend to change the text (with a translation override for example) to remove the link.

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

Time to create page: 0.056 seconds
Powered by Kunena Forum