Different URL to order in order notification and in order confirmation.

  • Posts: 48
  • Thank you received: 1
7 years 1 month ago #280849

-- HikaShop version -- : 3.2.0
-- Joomla version -- : 3.8.0
-- PHP version -- : 7.1
-- Browser(s) name and version -- : Chrome

Hi,

I have a problem with the confirmation emails.

In the email that a customer receives when the order is placed there is a link to the order. This link is correct and goes to the correct page of the order.
In the confirmed email the link however is not correct. It goes to the correct order but is has a non-sef url and goes to a complete different lay out.

Why is this? The used code is the same so I dont get it ....

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

  • Posts: 12953
  • Thank you received: 1778
7 years 1 month ago #280855

Hello,

If the order is confirmed through your back-end then we won't be able to generate a SEF URL as we are in the back-end, but if they are confirmed through your front-end then the link should be SEFed.

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

  • Posts: 48
  • Thank you received: 1
7 years 4 weeks ago #281158

Hi,

I dont get it.

This seems not so logic for me. The manager of the shop confirms it via the backend. He sets the order status from created to confirmed.

Then the email is send to the customer that the status has changed to confirmed with the url to see and print his invoice.

How can I confirm an order through the front-end?

Or how can I get a sef url ? after changing the status to confirmed in the backend.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
7 years 4 weeks ago #281164

Hi,

If you look at the URLs in your Joomla backend, you can see that none of the URLs are SEFed.
Trying to SEF URLs from the backend can often result in 404 errors as the SEF system of Joomla isn't meant to be used on the backend.
As we prefer to be sure that the emails sent by HikaShop only contain valid links (and not 404 error links), we prefer to stay on the safe side and not try to SEF them.
Note that the main purpose of SEFing URLs is to improve your SEO. The URLs in the emails are not parsed by search engine crawlers and thus are irrelevant for SEO.
Now, if that really bothers you, you can confirm your orders through the frontend with HikaMarket front edition, which is an extension made especially to be able to manage your store from the frontend:
www.hikashop.com/extensions/hikamarket-front-end.html
In that case, you'll see that the links in the notification emails will be SEFed as HikaShop can do it safely from the frontend.

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

  • Posts: 48
  • Thank you received: 1
6 years 9 months ago #286524

I see your point.

Then I would like to solve this issue in another way.

I don't want to show the hyperlink in the confirmation email and I just want them to login and see it in their history if they want.

However I can not change this code.

I found this code as: %s
But there is also a second %s in the same line.
When I delete the first one it is all messed up.

In the first email the link to the page is correct and I would like to keep that on the the first email ( created message)

How can I manage this? Any idea?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 9 months ago #286531

Hi,

I would recommend you to read this:
docs.joomla.org/Formatted_fields_in_lang..._translation_strings
As you'll see there, you'll have to change that second %s to %2$s and it will work like you want.

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

  • Posts: 48
  • Thank you received: 1
6 years 9 months ago #286620

Hi,
Thanks for your answer.
Thanks for your anwer. I read the text but still do not see how and where I can change this to my needs.

When change the %s to %2$s .. the text is mixed.. :silly: :silly:

I don't get it.

The status of your order with no. 3233 is changed to confirmed

The order no. is %s and the text confirmed is the second %s in the line.

Could you be a bit more specific what I have to do? I tried many things now. :-(

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 9 months ago #286627

Hi,

The translation is:
ORDER_STATUS_CHANGED_TO="The status of your order No. %s has been changed to %s."
You can replace it by:
ORDER_STATUS_CHANGED_TO="The status of your order No. %1$s has been changed to %2$s."
It will be the exact same for Joomla.
If you want to remove the order number from this sentence to not have the link to the order, you can change that translation to:
ORDER_STATUS_CHANGED_TO="The status of your order has been changed to %2$s."
There is no reason it wouldn't work.

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

  • Posts: 48
  • Thank you received: 1
6 years 9 months ago #286864

Thanks! This was what I needed :)

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

Time to create page: 0.051 seconds
Powered by Kunena Forum