Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Email template for order Confirmation variable.


Ken_Shea

Recommended Posts

This is among the first lines

Hello  ##CUSTOMER_FIRSTNAME##,

How can a new variable  ##CUSTOMER_LASTNAME## be created, is that possible?

I find customers_lastname but that does not work in the template.

Thank you

Ken

Link to comment
Share on other sites

Added ##CUSTOMER_LASTNAME## to EmailController.php , it does now list  ##CUSTOMER_LASTNAME## in the "Key List" it still does not add last name to order confirmations.

The "and ideally to the translations in the database too" is not something I could do is it?

image.thumb.png.4b16fc993ce272ce2099ba5c5e262142.png

Link to comment
Share on other sites

Hi Andy,

Tried the add to keys and it still fails in "order confirmation", didn't try others, but did learn some new things in the process so not a loss.

Maybe the fix in gethub will take care of the problem.

 

Ken

Link to comment
Share on other sites

On 4/21/2023 at 6:48 PM, Ken_Shea said:

How can a new variable  ##CUSTOMER_LASTNAME## be created, is that possible?

Andy is right - the template key is working fine in the latest 4.11 version.

20 hours ago, Ken_Shea said:

Added ##CUSTOMER_LASTNAME## to EmailController.php , it does now list  ##CUSTOMER_LASTNAME## in the "Key List" it still does not add last name to order confirmations.

It is right fix, we will include it in the next update.

18 hours ago, CHD-UK said:

I've submitted a potential fix to the Github repository so just awaiting feedback on that.

As we concluded, it does indeed appear that the fields for CUSTOMER_FIRSTNAME and CUSTOMER_LASTNAME are not initialised in the $email_params array before calling the function to parse the email template for the Send Voucher email template.

Thanks Andy, you are right again. Your fix will be included in the next update.

3 hours ago, Ken_Shea said:

Tried the add to keys and it still fails in "order confirmation", didn't try others, but did learn some new things in the process so not a loss.

It will be fixed in the update, which we are going to release this week.

Link to comment
Share on other sites

That would be a big help.

Order confirmations need to be sent in a very specific format (Last name is just one piece of the puzzle) so a program I wrote years ago can read it, pull all the necessary data to keep sales, orders, inventory, tax etc  current and accurate.

I see V4 does some of this but not had the time to look into it.

Edited by Ken_Shea
Link to comment
Share on other sites

2 hours ago, CHD-UK said:

Hi Ken,

Just a thought, could you check to see if ##CUSTOMER_NAME## works on your order confirmation template?
You'll need to type it in manually as I don't think it is in the "Add Key" popup

Ill report on this in a couple

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...