1.0.8.19 PHP8.0
Is it possible, as in previous versions, to put the order number in the title of the notification (email to the customer, but also to the admin)? I have already tried different ways, after visiting the different forums, in n_ckeckout.php, but can't get it done.
Has anyone already succeeded? Would be great!
title notification -checkout and update - ordernumber
- martindavinci
- Member
- Posts: 38
- Joined: Mon Mar 08, 2021 8:33 am
- Phoenix Version: 1.1.0.5
- Has thanked: 2 times
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
Re: title notification -checkout and update - ordernumber
Precisely what do you want to change - what do you mean by "title".martindavinci wrote: ↑Thu Jan 30, 2025 2:30 pm Is it possible to put the order number in the title of the notification (email to the customer, but also to the admin)? I have already tried different ways, after visiting the different forums, in n_ckeckout.php, but can't get it done.
The code that would output the order number can be seen here:
https://github.com/CE-PhoenixCart/Phoen ... ut.php#L16
Code: Select all
$order->get_id()- burt
- Core Team
- Posts: 4551
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: title notification -checkout and update - ordernumber
I think you're asking to change the title of the outgoing email ? I am not sure if that part of the email can be *easily* changed, so here is a way that involves some code manipulation. Extra bits of code in RED
https://github.com/CE-PhoenixCart/Phoen ... ut.php#L16
to;
const MODULE_NOTIFICATIONS_CHECKOUT_TEXT_SUBJECT = 'Order Process %s';
AND
https://github.com/CE-PhoenixCart/Phoen ... ut.php#L58
to
$accepted = Notifications::mail($order->customer['name'], $order->customer['email_address'], sprintf(MODULE_NOTIFICATIONS_CHECKOUT_TEXT_SUBJECT, $order->get_id()), $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
Similar change on L62 of same file.
Not tested. Try it?
https://github.com/CE-PhoenixCart/Phoen ... ut.php#L16
to;
const MODULE_NOTIFICATIONS_CHECKOUT_TEXT_SUBJECT = 'Order Process %s';
AND
https://github.com/CE-PhoenixCart/Phoen ... ut.php#L58
to
$accepted = Notifications::mail($order->customer['name'], $order->customer['email_address'], sprintf(MODULE_NOTIFICATIONS_CHECKOUT_TEXT_SUBJECT, $order->get_id()), $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
Similar change on L62 of same file.
Not tested. Try it?
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
-
heatherbell
- Senior Contributor
- Posts: 2540
- Joined: Mon Oct 07, 2019 4:39 am
- Phoenix Version:
- Has thanked: 35 times
- Been thanked: 243 times
Re: title notification -checkout and update - ordernumber
So, if it is the email "subject" that is desired to be changed to include the order number, this works:
In /includes/modules/notifications/n_checkout.php
change both instances of:
to
In /includes/modules/notifications/n_update_order.php
change:
to
Of course, this changes core files so really, you need to create a new module so it is not overwritten in updates.
In /includes/modules/notifications/n_checkout.php
change both instances of:
Code: Select all
MODULE_NOTIFICATIONS_CHECKOUT_TEXT_SUBJECTCode: Select all
MODULE_NOTIFICATIONS_PSI_CHECKOUT_TEXT_SUBJECT . " #" . $order->get_id()change:
Code: Select all
MODULE_NOTIFICATIONS_UPDATE_ORDER_TEXT_SUBJECTCode: Select all
MODULE_NOTIFICATIONS_UPDATE_ORDER_TEXT_SUBJECT . " #" . $order->get_id()- martindavinci
- Member
- Posts: 38
- Joined: Mon Mar 08, 2021 8:33 am
- Phoenix Version: 1.1.0.5
- Has thanked: 2 times
Re: title notification -checkout and update - ordernumber
Burt,
Exactly what the intention is! Fantastic, it saves a fair amount of work in practice (the notification can now be used as a work order because it corresponds to the list in my mail program).
My heartfelt thanks!
Exactly what the intention is! Fantastic, it saves a fair amount of work in practice (the notification can now be used as a work order because it corresponds to the list in my mail program).
My heartfelt thanks!