Jump to content

How do I order name is replaced with order number in email notifications?


Recommended Posts

How can I ensure customers see the order number, in place of the variable generated by Prestashop, in email notifications and also in the customer's Order History?

 

For example, show 12345678 instead of a random 736482374.

 

I have searched but not found any fixes, or topics to which I can reply.

 

I cannot add screenshots once topic is posted so have added them here:

 

EMAIL CONFIRMATION:

http://examaids.com/files/psorder-01.png

 

ORDER HISTORY:

http://examaids.com/files/psorder-02.png

 

Thanks.

Edited by Walrus (see edit history)
  • Like 1
Link to comment
Share on other sites

I already applied a fix manually so order numbers are used instead of letters. I think that's what your module does. No?

 

I want to use order numbers in emails and in customer's account pages, instead of the default variable.

Link to comment
Share on other sites

Changed file classes/order/Order.php after finding fix in forum. Seems lots of people do not like the random letters, or the random order numbers.

 

I think we are veering away from the topic. Do you know how I can find solution for my problem?

Edited by Walrus (see edit history)
Link to comment
Share on other sites

To clarify, I don't want to show order reference, which is next to useless. I would hide it if I could but it doesn't do harm (possibly confuse some customers when asked for the order number), so may as well leave it. What I want to do is show the 'order number' instead of the order reference.

 

The order number (ID) Is shown in the subject line of each email notification, but NOT in the body where the variable 'order_name' is used. I want to show that order number (ID) in the body of the emails and in the customer's Order History page.

 

In the HTML email templates, I see the variable 'order_name' and not the order number (ID). When used, order_name actually grabs the order reference (random letters by default). What your module does, I think, is change the letters into numbers. I've already done that. 

 

It's all very confusing when what's needed is simple: add order number everywhere, let user specify start number and format (000-000-001, or 00001, or {REF}-0000-0000-0001, etc) , and increment it with each order but I digress.

Link to comment
Share on other sites

I know there is a variable lurking somewhere because Prestashop uses it to add order ID in the email subject line but NOT in the body. However, your module did the trick, so many thanks for persevering (I looked some more but then had given up).

 

What does the option "Add trailing zeros (to order ID)" do? I suspect add zeroes to end of order number but preview doesn't change when I select the option.

Edited by Walrus (see edit history)
Link to comment
Share on other sites

Nope...Nothing happens to the *Preview* when I select the option. Possibly because I may have limited order numbers to 4, and the most recent order is already using all 4 digits?

 

Do you mean leading zeros and not trailing zeros? I would expect trailing zeros, as in following some given thing (i.e., order number in this case) to look like 21000000. 

Link to comment
Share on other sites

I think you would need to change it in the mailalerts.php module, where we have:

sprintf(Mail::l('New order : #%d - %s', $mail_id_lang), $order->id, $order->reference),

to:

sprintf(Mail::l('New order : %s', $mail_id_lang), $order->reference),
Link to comment
Share on other sites

  • 3 weeks later...

Hey, I have a problem pretty sure it involves your module...it all worked fine, then order validation stopped after two,three orders.

 

I posted error I get after disabling module in another thread about validation failure.

 

I disabled module, and reverted mail alerts page, emptied cache.

 

Any ideas why validation still doesn't work?

 

What changes does installing module make to database if any?

Hey, I have a problem pretty sure it involves your module...it all worked fine, then order validation stopped after two,three orders.

 

I posted error I get after disabling module in another thread about validation failure.

 

I disabled module, and reverted mail alerts page, emptied cache.

 

Any ideas why validation still doesn't work?

 

What changes does installing module make to database if any?

Link to comment
Share on other sites

So it must be something else there, this module shoud not affect the order validation, it does only one simple thing - generates a different reference, and I don't think that reference is something that gets validated.

Link to comment
Share on other sites

  • 1 month later...

Hi 

Just wanted to ask if this works with PS ver 1.6.1.6. I installed it to change the order name to order ID - But it still seems to give me those pesky random Letters.

Hope you can help - as it will mean a huge deal for my client  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...