Problems with custom fields for billing and shipping address not appearing on in

  • Posts: 38
  • Thank you received: 7
  • Hikaserial Subscription Hikashop Business
1 week 1 day ago #366054

-- url of the page with the problem -- : ilvasapolli.it
-- HikaShop version -- : 5.0.3
-- Joomla version -- : 4.4.2
-- PHP version -- : 8.1.27
-- Browser(s) name and version -- : Chrome

I created a series of custom fields that appear in the checkout to complete the billing information and the delivery address.
So far so good. The fields are filled in correctly and appear in the customer account. Screenshot1
However, when I print the invoice and the transport document (I use the pdf invoice plugin, but even without it the problem remains), these fields do not appear.
I tried to look in the templates, but I did not find the one for the invoice, nor the one for the transport document.
What should I do?
In addition, the pdf invoice plugin does not send the copy of the invoice in BCC to the email I entered. Screenshot2

Attachments:

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
1 week 1 day ago #366055

Hi,

You want to add the corresponding tags in the "address format" setting of the HikaShop configuration:
www.hikashop.com/support/documentation/5...ml#checkout_shipping

Do you get the invoice in the email to the customer ? Can you make sure that you don't have extra space before or after the email address in the input field ? Note that alternatively, you can add the email address in the "BCC" field of the "order status notification" email via the System>Emails menu.

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

  • Posts: 38
  • Thank you received: 7
  • Hikaserial Subscription Hikashop Business
1 week 18 hours ago #366061

Ok we solved the problem of the fields in the invoice. We would also like to add the customer email, but we did not find the tag. It should be something like {email_user} can you tell us what it is exactly?

Instead the generate PDF invoice plugin does not work at all. Not only does it not send the copy of the invoice to the address in BCC, but it does not even send it to the customer. This, for us, is a major problem.

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

  • Posts: 4816
  • Thank you received: 654
  • MODERATOR
1 week 10 hours ago #366068

Hello,

You have in each email edition your data tag, here in the "Html version" part :



For your question your required tag is "{VAR:customer.email}".
Hope this will help you.
Regards

Last edit: 1 week 13 hours ago by Philip.

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

  • Posts: 38
  • Thank you received: 7
  • Hikaserial Subscription Hikashop Business
4 days 18 hours ago #366088

Sorry, but that TAG doesn't work. (Screenshot1 and Screenshot2).
Also for some reason that I don't know in the shipping address it inserts the customer's name twice (Screenshot2)

Attachments:

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
4 days 15 hours ago #366089

Hi,

The tag Philippe proposed is to add the email address in the emails HTML when you edit them via the menu System>Emails.
You can't use that tag in the address format setting.

To display the email address directly inside the address area, you would need to actually use PHP code. Something like this should do the trick:

<?php
$userClass = hikashop_get('class.user');
$user = $userClass->get($this->address->address_user_id);
echo $user->user_email;
?>

Regarding your issue with the shipping address, I don't think the problem is in HikaShop but in the address itself. I'm suspecting a bad copy / paste when you made your tests. Could you please double check with another order with another user account ?

Regarding your issue with the email to the customer not being sent, the problem is not in the PDF invoice plugin. The PDF invoice plugin is only adding the PDF file to the email when it is being sent by HikaShop. If HikaShop doesn't send the email, or if your email server refuses to relay the email, then the plugin can't do anything.

Normally, after a payment is made by a customer for an order, the payment gateway sends a notification to the payment plugin you configured on your website. That plugin checks the notification, and changes the status of the order from "created" to "confirmed" automatically. At that point, HikaShop generates the "order status notification" email and sends it to the customer. And the PDF invoice plugin can add the PDF to the email when it is generated.
So, knowing all that, there are several things you can check:
- is the status of the orders changed from "created" to "confirmed" automatically after the payments on your website ? If not, then, there is a problem with the payment method settings, or the payment plugin.
- is the "order status notification" email enabled in the System>Emails menu ? If not, you should enable it.
- are you able to send a test email in the joomla configuration page ? www.tassos.gr/docs/convert-forms/trouble...#check_mail_settings
- do you see the generated "order status notification" emails for your orders in the Customers>Email history menu ? If yes, then HikaShop did send the email but it was blocked by the email server of your hosting, or the email server of the receiver. In that case, and supposing you're able to send a test email in Joomla, you'll likely want to contact your hosting provider support for help with the deliverability of these emails.

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

  • Posts: 38
  • Thank you received: 7
  • Hikaserial Subscription Hikashop Business
4 days 14 hours ago #366093

I'll answer you by points:

1. TAG address. I inserted the php script and now it's ok.

2. Double address. I don't know why, but it's actually only in that order. In the others it's ok.

3. I can't check if the email to the customer about the order status arrives with the pdf attached, but I'm not interested in that. I'm more interested in it arriving in BCC to the address I entered in the plugin. This, for the moment, is not happening, but I have to wait for the next order. Only then will I be able to tell you if it works.

4. All checks on sending the email are regular, including history.

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

  • Posts: 38
  • Thank you received: 7
  • Hikaserial Subscription Hikashop Business
4 days 11 hours ago #366104

They placed a new order.

The addresses are fine. The confirmation emails went out, but the pdf attachment is missing.

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
4 days 8 hours ago #366105

Hi,

Then, could you provide a backend access via our contact form in order to check things out on your website ?
www.hikashop.com/support/contact-us.html

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

  • Posts: 38
  • Thank you received: 7
  • Hikaserial Subscription Hikashop Business
3 days 18 hours ago #366113

Ok. I entered the data for the access. In the meantime we noticed that the insertion of the customer email as you sent us the php script, works in the invoices, but in the confirmation emails it creates the button that you can see in Screenshot1.

Attachments:

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
3 days 16 hours ago #366114

Hi,

1. Thanks for the backend access. I checked what I needed. Everything is ok as far as I can see.
However, I can see that you're using HikaShop 5.0.0, and not the 5.0.3 as you stated in your first message. We actually made several fixes for email attachments with HikaShop 5.0.1. So updating HikaShop might actually be all that you need to fix the problem.

Otherwise, it could be another problem but I would need to do tests on the website. Creating an order assigned to myself, and changing its status to trigger the email sending processing. Would you allow me to do that or is it a problem with your management of the website if I do this ?

2. That's not what I see on my end:
i.imgur.com/eCvbdvI.png
As far as I can see, the email address, as well as the URL to access the order are just fine.
Could it be that your email client or your browser or one of its extensions is doing this ?

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

  • Posts: 38
  • Thank you received: 7
  • Hikaserial Subscription Hikashop Business
3 days 15 hours ago #366119

Let's do this. First I'll try to update. If the problem occurs again, we'll do the test you mentioned.
For the order email with the buttons instead of emails I need to talk to my technicians. I'll let you know.

The following user(s) said Thank You: nicolas

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

  • Posts: 38
  • Thank you received: 7
  • Hikaserial Subscription Hikashop Business
2 days 19 hours ago #366138

I updated Hikashop and Hikaserial, but the PDF invoice is still not attached to the order confirmation (ORDER_STATUS_NOTIFICATION) nor is it sent in BCC to the email indicated in the generate PDF invoice plugin. At this point the question is: without the plugin is it possible to send the PDF of the "normal" invoice as an attachment and in BCC? Because it is evident that that plugin does not work. Everything else works so there is a problem in creating the attachment.

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
2 days 15 hours ago #366141

Hi,

The PDF of the "normal" invoice is generated by this same plugin.
If this plugin didn't work at all, then this "normal" PDF invoice wouldn't be generated either.
If you disable the plugin, you'll see that you won't get the PDF invoice when you click on the invoice button of an order.
Also, this plugin properly attach PDF invoices to the emails for everyone else. It has done so on thousands of websites.
And we didn't change anything to it recently which would create that problem.
So either there is something else interfering, or your email server is refusing the attachments, or something.
Please provide a FTP access via our contact form. I'll look further into it.

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

  • Posts: 38
  • Thank you received: 7
  • Hikaserial Subscription Hikashop Business
2 days 14 hours ago #366144

I have activated my technicians to see where the email attachment is stuck. I can't give you ftp access, but if you tell me exactly what they need to check I'll pass them the instructions and they'll take care of it.

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
2 days 11 hours ago #366148

Hi,

Well, the first thing will be to look in the plugins/hikashop/attachinvoice/attachinvoice.php file. There, I would start by adding debug code at the end of the onBeforeMailSend function to verify that the plugin adds the PDF invoice to the email on his end.
If not, then I would add debug at the beginning of the function, to check that the plugin is being called by Joomla, and move the debug between the beginning and the end of the function in order to narrow down where the problem is, if the problem is in there.
If yes, then the plugin does its job. So it has to be a mail server issue. I'm not sure what's your setup. If you have your own email server, then your technicians could look in the logs of the email server for clues on what is happening there with these emails. If you're using the email server of your hosting, then you would have to contact their support to check with them, with the email information so that they can look into the logs of the email server on their end, and they should be able to tell you what the problem is.

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

  • Posts: 38
  • Thank you received: 7
  • Hikaserial Subscription Hikashop Business
1 day 20 hours ago #366166

Ok, but what is the debug code? Just to be safe send it to me so I can be sure I'm not doing any damage.

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
1 day 16 hours ago #366179

Well, the debug code has to vary based on where you add the debug and what information you want to get based on the variables available, and what your previous tests provided as information. If your technicians are developers like me, then they don't need me to tell them what to add exactly. Just the information I gave in my previous message will be enough. If they don't understand what to add themselves, I doubt it they'll be able to debug the issue by themselves. In that case, it would be better to provide a FTP access to us so that we can do it.

In any case, you can't damage anything with debug. Adding debug is about adding output to the page. For example:
var_dump('this line of code was used');
That way, you know whether PHP is going there or not, based on whether you see the debug on the output when you run an action.
Note however that in the cas of the PDF invoice plugin, since it acts when the order status is being changed, a var_dump might not be output to the browser. It be better to log the text in a file and read that file. If I was doing it, I would do for example:
hikashop_writeToLog('this line of code was used');
Then, change the status of an order to generate the email, and then, check the "payment log file" of the HikaShop configuration to see if the text 'this line of code was used' is at the end. If yes, then PHP went through my code, and thus whatever is before the hikashop_writeToLog call did its job. If no, then something must have blocked the process before.

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

  • Posts: 38
  • Thank you received: 7
  • Hikaserial Subscription Hikashop Business
1 day 16 hours ago #366183

I understand. Yes my technicians know what you are talking about. It's me who doesn't know :)
Next week we will do these checks and I will let you know.

The following user(s) said Thank You: nicolas

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

Time to create page: 0.109 seconds
Powered by Kunena Forum