Jump to content

{order_name} returns different values on different email templates


Recommended Posts

Morning,

 

I'm tweaking my clients shop email templates, but have noticed an inconstancy in the {order_name} tag.

 

In the email template: order_conf.html - {order_name} returns "KCUIKIGZP" where as

In the admin email template: new_order.html - {order_name} returns the numberical order ID eg: "000004".

 

I'd like to include both of these values on all emails - is there a way I can control which one I get?

 

Many thanks

 

Tom

Link to comment
Share on other sites

  • 2 weeks later...

Hi guys,

those two mails are prepared in different way: order_conf by PaymentModule.php system class and new_order by separate mailalerts module. If you want to use order ID in order_conf template need to find {order_name} tag in paymentmodule.php class and replace

{order_name}' => $order->getUniqReference() with this

{order_name}' => sprintf('#%06d', (int)$order->id)

  • Like 1
Link to comment
Share on other sites

Thanks Sebkos - I'll certainly take a look at those files.

 

What is the best convention about changing 'core' files - will it make updating Prestashop versions more difficult? Is there a better way to override functions on specific modules?

Link to comment
Share on other sites

  • 5 months later...

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...