How to add the shipping address to admin email

  • Posts: 14
  • Thank you received: 0
12 years 11 months ago #33403

Hi
I am struggling with adding the shipping address to the admin email (sent when an order confirms).

I know I will have to add some code to the email in System > Emails, but what and where?

Please help as I am new to coding.

Cheers

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 11 months ago #33463

Hi,

There is no admin email sent when orders are confirmed.
It's the payment plugins which send a payment notification which is not editable.

What you could do instead is to send a copy of the order status notification which is sent to the user to the administrator too. That is explained there:
www.hikashop.com/en/support/forum/4-how-...multiple-people.html

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

  • Posts: 14
  • Thank you received: 0
12 years 11 months ago #33536

Thanks Nicholas,

I have added the code to the order creation notification email and it has worked,

Thank you for your help

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

  • Posts: 14
  • Thank you received: 0
12 years 10 months ago #34285

Hi Nicolas,
The email duplication has worked but since doing this I cannot get the site to go through to our payment plug in (HSBC)from the checkout. Once I remove the coding the payment plug in works. We really need the email duplication as it provides us with both the billing and shipping address, and gift messages, can you suggest anything so that we can get both working.

The HSBC error code is 'HSBC payment notification refused: The transaction failed because of invalid input data.' If that helps

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #34316

Hi,

Both things are not related.
That HSBC error usually happens with the HSBC account is not in production mode and in that case you should contact HSBC so that they activate it for your account:
www.zen-cart.com/forum/showpost.php?p=270679&postcount=4

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

  • Posts: 14
  • Thank you received: 0
12 years 10 months ago #34406

Hi Nicolas,
We are in production mode according to HSBC, we have been receiving orders (until I added the coding), but obviously have not had all of the information from the emails to process them efficiently. As the plug in works when I remove the coding (and this is the only change) it has to be something to do with this.

Is there a different way to duplicate the customer's email (order creation email with the shipping address)? Or possibly add the coding for displaying the shipping address in the order staus email?

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #34467

Hi,

Then yes, it must come from the modification you did to the email.

The code I was talking about was for the order status notification, not for the order admin notification:

What you could do instead is to send a copy of the order status notification which is sent to the user to the administrator too.


Could you make sure that you edited the correct email ?
Also, could you do a screenshot of the page with the code modification you did displayed so that we can see what you did ?

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

  • Posts: 14
  • Thank you received: 0
12 years 10 months ago #34524

Hi

I edited the order creation email as this includes the info I need, I did insert the coding into the order status email but it still did not duplicate the information that I needed i.e. the shipping address. The coding has worked as we now receive 2 emails, but obviously cannot receive any payment for the orders.

I have attached a screenshot of the coding in the order creation email, but basically I added it at the end of the HTML version, as I metioned earlier I am a coding novice.

You have mentioned the order status notification email, would there be a way to add the shipping address to the email? as we already receive this email.

Thank you for your help

Attachments:

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #34567

Hi,

The order status and creation notification emails are sent the same way. So the same code modification will work.

If you don't receive payment notification emails, then it's another problem:
www.hikashop.com/en/support/documentatio...or.html#notification

The shipping address is already included in the order status notification email.

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

  • Posts: 14
  • Thank you received: 0
12 years 10 months ago #34626

Hi Nicolas,

Sorry I don't think I explained myself very clearly.
We now receive both emails (order creation and status, thanks to your coding) as the status email does not include both the shipping address and billing address when sent to our admin email address.

But the problem is since adding the coding, after the checkout stage, it should then go through to the HSBC plug in for the payment, but it keeps bouncing back with the error message, 'HSBC payment notification refused: The transaction failed because of invalid input data.' meaning we cannot receive payment for our orders.

I have checked again with HSBC to make sure we are in production mode and that the plugin is not in debug mode.

When I remove to the coding from the email we are able to process payments again via hsbc plug in.

So my questions are
1.Does the addition of the code, send differing data to HSBC(and other payment plug-ins)?

2.If the shipping and billing address is already included in the order status email, why does it not display when sent to the admin email address? There are currently no modifications on the status email, i have included 2 screenshots to show you what we receive.

Obviously it is very inefficient to have to log into the back end of the website everytime we receive an order, when the information is there to be included in an automatic email and without the option to pay we will lose money.

status email

Attachments:

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

  • Posts: 14
  • Thank you received: 0
12 years 10 months ago #34627

This is the order creation email that thanks to your coding we now recieve and has all of the information we need on

Attachments:

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #34666

Hi,

1. That modification does not change anything for payment plugins. The order status email is only sent when the order is confirmed, so AFTER HSBC validate the payment. So it's really not possible that the modification to that email would change the information sent to HSBC at the end of the checkout.

So I still think that this comes from something else.

2.
Regarding that, I would say that it's because you didn't had a shipping method selected during the checkout. Am I right ?
In the order admin email there is a check on that to display the shipping address:
if(!empty($data->cart->order_shipping_id) && !empty($data->cart->shipping_address)){
You could change it to:
if(!empty($data->cart->shipping_address)){
to always see the shipping address.

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

  • Posts: 14
  • Thank you received: 0
12 years 10 months ago #34924

Hi Nicolas,
Your last response makes a lot of sense!
I have still not had any joy, I still get the HSBC error message, here is what I have tried:
A, I changed the coding in the 'order admin' email (as suggested in your last post) and this was successful, but again got the error message.
B, After undoing the modification I then changed the coding in the 'order status' email but the same result
C, After undoing the modification I created a manual shipping plugin, to try and bypass the emails (I got the idea from your answer to question, '1.'). This again enabled the correct information in the email received by the admin@ address, but would not go through to HSBC for payment.

So once again I have removed all modifications so we are able to process payment for orders, but obviously as I explained this is very inefficient.

What is our next move? What could be changing the input data sent to HSBC at checkout? Is there any additional support as we are using the paid for business edition of Hikashop?

As you can guess it is more than a little frustrating for us, and I'm sure for you!

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #34950

Could you give a back end and FTP access to your website via our contact form so that we can check on the problem (please aos give the steps to reproduce the problem) because I don't have any ideas on that problem.

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

  • Posts: 14
  • Thank you received: 0
12 years 10 months ago #35029

Hi Nicolas,

I will send the back end access via the contact form.

When you log in, here are the steps i followed (not sure if I mentioned we are running on Joomla 1.6)
Go to components - Hika shop - System - emails.

Then change the coding in the order admin/ status email and save and close.

log out.

Go to the front end of the website (supplied in the contact form)

click on W C shop

Printed material - magazines - subscriptions - choose a subscription - add to cart - proceed to checkout -
Login (use your username and password from contact form) - select different shipping address (i have already created these for you) - select HSBC payment option (only option), next - add a gift message, next -

IF YOUR CHANGES ARE SUCCESSFUL
You will then directed to the HSBC payment site with the the option to continue and pay OR cancel,

This means that we can then process the payment and the problem is solved (if we get the email with both addresses)
CANCEL the order and you will be directed back to our site with a message saying transaction cancelled.

IF YOUR CHANGES ARE UNSUCCESSFUL
The order will try to get through to HSBC but will bounce back to our site with the error message 'HSBC payment notification refused: The transaction failed because of invalid input data'

click 'log in' to log out of the front end of the website

I hope this make sense!

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #35080

Hi,

I put the modification placed an order and got the error. I removed the modification and I still got the error. I even unpublished the email and I still got the error.

It still seems to me that this doesn't come from that email modification. I didn't try before doing the modification. Does it work for you ?

I checked the data sent to HSBC and it's correct.
However, I can see that the county is empty when normally it should contain one of the counties of the UK. I saw that you removed all of them from the UK country in your zones. That might be why it doesn't work, because the county is empty. You should try to add a county to the addresses and try again.

That error means that there is an inconsistency in the data submitted to HSBC. It can be anything from your HSBC credential not entered correctly to the county field...

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

  • Posts: 14
  • Thank you received: 0
12 years 10 months ago #35176

Hi Nicolas,

Thanks for having a look,
we now cannot process any payments via HSBC at all, so something is going on. I made the modifications by adding the counties (our developer must have removed these), this did not resolve the problem, so I undid the modifications and then I got the error message 'No payment methods detected'. We then took the decision to try something else as we have now lost several orders and could not afford anymore losses of income and time.

We now use paypal and are pleased that we can now receive payment for our products.

We are obviously disappointed you were not able to resolve our issues, please keep this in mind when you update the plugin for HSBC. Our developer chose Hikashop specifically as you had a plugin to work with HSBC payments, and we will obviously feedback to him our experiences with Hikashop and the HSBC plugin.

I know it should have been simple (as your responses imply) but obviously something strange is going on somewhere in our checkout process, and am just glad we have been able to sort something.

Cheers

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
12 years 10 months ago #35242

Hi,

We didn't change anything in the HSBC plugin and it is working great for others. I don't see why it shouldn't on your website. It must come from one of the settings you changed but I couldn't find what and it's definitely not coming from the email changes.

If PayPal suits you, then it's great.

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

Time to create page: 0.086 seconds
Powered by Kunena Forum