- Posts: 317
- Thank you received: 20
Edit e-mail bodies and customer invoices
-- HikaShop version -- : 4.7.2
-- Joomla version -- : 4
I remember there are some pretty sophisticated capabalities. But, I couldn't find anything on that here: www.hikashop.com/support/documentation/5...fig.html#main_emails
So, I thought I would just ask where to find it.
Please walk me through how to set up and configure a customer invoice.
In System/emails, I don't see one that is labeled Invoice. Is it there or somewhere else?
-Jim Gribble
Please Log in or Create an account to join the conversation.
Thank you,
-Jim Gribble
Please Log in or Create an account to join the conversation.
Thank you,
-Jim Gribble
Please Log in or Create an account to join the conversation.
An email is not an invoice. An email can contain the order summary, but for an invoice, it has to be a file, like a PDF.
So if you want invoices to be sent to customers, they normally need to be sent as PDF attachments to the emails sent to the customers.
We actually have the PDF invoice plugin which does precisely this:
www.hikashop.com/marketplace/product/18-plugin-pdf.html
Note that the allowed HTML and CSS is not the same in emails and browsers. You're more restricted in emails. So you can't just copy / paste the HTML / CSS of the website to the email to make it look the same as the website.I would wrap it in the same table we use across the site in all our forms. So we have visual continuity between email forms and the look and feel of the website, Please comment.
That's correct.Also I want to confirm that if I want to customize an e-mail, I create a new custom_mytemplate, copy the default code to it and customize that. This file will not be overwritten by component updates?
Please Log in or Create an account to join the conversation.
What is the name of the system e-mail I should be working on? Which is the one which goes out to customer? Guessing on my part won't do.
And, is it possible to test-send e-mails so we can debug them before the system is turned on?
Please consider adding a tutorial on e-mail management to your documentation. Then you will get fewer questions and they will be more informed.
A simple thing I want to do is add the company logo at the bottom with hyperlink to homepage. How?
Thank you again,
-Jim Gribble
Please Log in or Create an account to join the conversation.
Please identify the emal to admin after confirmed purchase. Just taking a guess that it's "Order administrator notification."
I doubt we will be allowing user registration/account creation so as to not attract identity thieves. There's a PHP backlink to user account on website. Does that need to be hidden in the email? How?
I do want to add company logo with backlink to homepage. How?
So I have my custom email template created and ready to go.
Thank you,
-Jim Gribble
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
The email form has a little Hikashop item which is published here at PHP line 36.
<img src="{VAR:LIVE_SITE}media/com_hikashop/images/icons/icon-48-order.png" border="0" alt="" style="float:left;margin-right:4px;"/>
I realize I could delete it but it would be overwritten by updates. I could also redirect it to a White Water Marine icon, But that too would not be permanent.
Can it be addressed via the custom email template?
Thank you,
-Jim Gribble
Please Log in or Create an account to join the conversation.
No. "Payment Notification" is the email sent to the shop owner when a payment is received.1. The critical email is called Payment Notification?
2. Different versions get sent to both admin and customer?
3. That is all governed in the PHP?
The email sent to the user when the order is created is the "order creation notification".
The email sent to the user when the order status changes from "created" to "confirmed" after a payment plugin receives a payment notification from its payment gateway is the "order status notification".
Yes. The style, frame, header and footer of the emails are defined in the template. That way, if you want to change the color of the emails, or add a logo to them, you don't have to edit each email and do the changes one by one. You do the change in the template they all use and you're ready to go. If you want to add a logo in the template, just write the HTML of the logo (an img tag basically) where you want it in the template.4. I can change the appearance via customize email template?
That's indeed what is the best. However, it is possible to change the wording in the "preload" section at the bottom, with the PHP code. This second option can be useful when you want the text to be dynamic. For example, if you want to display a different text based on the shipping method selected, you'll need to write PHP code to add the condition on the shipping method of the order.5. I can ONLY change the wording via a language override?
6.
What do you mean by that ? Under the Checkout tab of the HikaShop configuration, there is a setting called "Allow registration after guest checkout" which you can activate so that the customer checking out as a guest can then create a user account on your website with a link added to the order status notification email. If you don't want that, deactivate the setting.There's a PHP backlink to user account on website. Does that need to be hidden in the email? How?
7. Regarding the error in the preview, please activate the "debug" setting of the Joomla configuration and try again. It will display a full error message with more information on what's going on.
8.
Sure. You can add CSS in the template to hide it. Like this:Can it be addressed via the custom email template?
Please Log in or Create an account to join the conversation.
Regarding the error, I did as you suggest and I see a long list but it tells me nothing. Since I did not edit anything in Hikashop, other than create my first order, I don't know why it occurred.
Before creating that order, I was able to preview.
Then after first order was created, everything went south.
Also, when I manually create an order and then add a product, the same error message appears and I can't add any products. I don't know as yet how far-reading this issue is. But it is obviously something serious.
Are you willing to take a quick look?
At least I find I can create new products.
Thank you,
-Jim Gribble
error has occurred.
0 Attempt to assign property "order_user_id" on null
Call stack
# Function Location
1 () JROOT/administrator/components/com_hikashop/classes/order.php:2041
2 hikashopOrderClass->loadOrderNotification() JROOT/administrator/components/com_hikashop/classes/order.php:2034
3 hikashopOrderClass->loadNotification() JROOT/media/com_hikashop/mail/order_creation_notification.preview.php:20
4 order_creation_notificationPreviewMaker->prepareMail() JROOT/administrator/components/com_hikashop/views/email/view.html.php:304
5 EmailViewEmail->preview() JROOT/administrator/components/com_hikashop/views/email/view.html.php:24
6 EmailViewEmail->display() JROOT/libraries/src/MVC/Controller/BaseController.php:645
7 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_hikashop/helpers/helper.php:2459
8 hikashopController->display() JROOT/administrator/components/com_hikashop/controllers/email.php:103
9 emailController->preview() JROOT/libraries/src/MVC/Controller/BaseController.php:678
10 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_hikashop/helpers/helper.php:2437
11 hikashopController->execute() JROOT/administrator/components/com_hikashop/hikashop.php:73
12 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
13 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
14 Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
15 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
16 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
17 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:293
18 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:61
19 require_once() JROOT/administrator/index.php:32
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please log in or register to see it.
-Jim Gribble
Please Log in or Create an account to join the conversation.
1. It might tell you nothing, but it tells us a lot about what is the problem.
This error means that the order which you selected before in the preview popup is not found. You must have deleted the order in the middle of your tests.
Logout from your backend and login again. It will reset the Joomla user session, including the selection you made previously in the preview popup and you won't get the error.
On our end, we'll add a fix so that even if the selected order is not found, it doesn't generate an error.
2. You sure can use an another email template builder and just replace the text by the tags.
Previously, AcyMailing had an integration which allowed you to customize the HikaShop templates in AcyMailing. So you could have a better customization experience. But I believe they've discontinued it in the last few years.
Please Log in or Create an account to join the conversation.
Regarding the e-mails, your system is designed for the lowest common denominator and is ingenious in that regard. Seeing how it is engineered, I was amazed. If we were to have a big store with big volume and a fulltime manager, I would use it. But this is going to be more of a boutique store with a sporadic volume and needing only two e-mails: one to admin and a confirmation to customer when a sale happens.
It's just not feasible for you to be all thiings to everyone.But what I appreciate about Hikashop is the room it leaves for people like us to do it our way. Other systems don't offer that.
-Jim Gribble
Please Log in or Create an account to join the conversation.
To the left, in the VAR column, I see plenty of useful things like {VAR:customer.name} and {VAR:customer.email} and {VAR:shipping_address.address_street} So that should work fine without any modifications..
I am thinking that for the LINEVAR tags to work they have to be converted intop VAR format. As in {VAR:item.order_product_name}. Is that what I need to do? And then I can drop my tags into my custom layout anywhere that works best?
Thank you,
-Jim Gribble
Please Log in or Create an account to join the conversation.
For LINEVAR tags, you need to make sure they are between
I invite you to check the default HTML of an order email. You'll see that the start and end tags are around the |code]<tr></tr>[/code] which encompass each row of the products listing table.
Please Log in or Create an account to join the conversation.
In the example I am showing, how do I fix that so that it will work?
Other form systems I work with typically offer something like this. {all_fields} Which publishes data from all tags. Very simple. Is that possible in Hikashop?
-Jim Gribble
Please Log in or Create an account to join the conversation.
Yes and No.
Having the result like your screenshot on www.hikashop.com/forum/install-update/90...invoices.html#351158 is possible.
But I don't understand why you're trying to add the product tags in www.hikashop.com/forum/install-update/90...invoices.html#351182 ? The product tags are there to display the details of each product in the order.
If you want the same result as www.hikashop.com/forum/install-update/90...invoices.html#351158 then you need to use order tags. The list of tags is available with a button you can click on at the top of the "HTML" area when you're editing an email.
For example, for the order number you can use the tag {VAR:order.order_number}
For the total amount : {VAR:order.order_full_price}
For the customer email: {VAR:customer.user_email}
Now, some things like the order currency, are not available directly as a tag. Then, you can use PHP code. For example, for the invoice date, you can use:
Please Log in or Create an account to join the conversation.
If I understand correctly, you question why I would use the product details tag?
On that point, I may be misunderstanding the purpose of that tag.
I want to be sure that customer sees ALL the options he selected in buying the stanchion.
That's what I thought "details" was for.
But no, maybe it shows the product description etc? Please clarify.
Bottom line is that you are saying it will work as configured, but you recommend deleting "details?"
And it will work to use the line_var tags and simple var tags? For trhe purpose of really simplifying things? Please confirm.
Thank you,
-Jim Gribble
Please Log in or Create an account to join the conversation.
If you want to add the products / options the customer ordered, just do like in the default HTML. Here is a copy / paste from the default HTML where I just removed the style attributes so that it reads easier. As you can see, it's just an HTML table with the tags :
Please Log in or Create an account to join the conversation.