Customize email "order shipped"

  • Posts: 113
  • Thank you received: 2
7 years 5 months ago #253408

-- url of the page with the problem -- : www.laputea.com
-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.3

Hi,

I would like to customize the email "order shipped" by entering the tracking number, the name of the courier (I have 3 couriers and for every order I have to select the one matching) and additional information (a similar message for all). What I want to do is provide this information only in the email confirming the order is shipped.
I tried to create custom fields in displays> predefined fields, but in this way appear in all states of notification of the order (created, confirmed, canceled, sent). I want only to appear in the "sent." it's possible? How can I do?

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
7 years 5 months ago #253447

Hi,

The custom fields will only appear in the email when you fill in the custom field.
And I guess that you don't fill it before you change the status to "shipped".
So It should not be a problem in a real case scenario since the custom field will be left empty when the order is created or confirmed or cancelled.

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

  • Posts: 113
  • Thank you received: 2
7 years 5 months ago #253454

that's why I opened the tread. Because I want to write a message for all the same, but that appears only when the status is "shipped", every time without having to copy and paste it. How do I enter text in the mail "sent"?

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

  • Posts: 12953
  • Thank you received: 1778
7 years 5 months ago #253458

Hello,

What do your exactly mean by ;

Because I want to write a message for all the same, but that appears only when the status is "shipped", every time without having to copy and paste it. How do I enter text in the mail "sent"?

Can you also show us through some screenshots for example which emails you want to modify and how you want to change it ?
Do you want your modification to be only shown when your order status is set to "Shipped" ?

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

  • Posts: 113
  • Thank you received: 2
7 years 5 months ago #253714

Hi,
see where is the arrow? I would like to add a custom message after the order status notification, but only for the status "sent". If I create a custom field, the message comes in bottom position, but I want message in top position

.

Attachments:

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
7 years 5 months ago #253716

Hi,

Then you can edit the email via the menu System>Emails and add such code in the HTML version:
<?php if($data->order_status == 'shipped') echo 'my custom text'; ?>

The following user(s) said Thank You: gioxd

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

  • Posts: 113
  • Thank you received: 2
7 years 5 months ago #253772

Hi Nicolas,

Thank You! In what position do I enter the code?

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

  • Posts: 113
  • Thank you received: 2
7 years 5 months ago #253775

Ok, I found it!
I take advantage of your kindness to ask one more thing. How can I place a link to the product detail page bought? What I want is that you click on the product name, in the email, to enter the page and entice him to visit the island again. I attach screenshots.


Thanks as always!

Attachments:

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
7 years 5 months ago #253796

Hi,

You can add replace the tag:

{LINEVAR:PRODUCT_NAME}
by:
<a href="http://mywebsite.com/{LINEVAR:product.product_canonical}">{LINEVAR:PRODUCT_NAME}</a>
in the email HTML version. This requires the canonical URL to be filled in your products, but that should be the case anyway for good SEO so it shouldn't be a problem.

The following user(s) said Thank You: gioxd

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

  • Posts: 113
  • Thank you received: 2
7 years 5 months ago #253919

No problem, all product have canonical url :) With SEO we do know, too bad I'm not familiar with php, otherwise it would come out a beautiful site! :)

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

  • Posts: 113
  • Thank you received: 2
7 years 5 months ago #253921

Sorry, but in Email > html version I can not find the tag {LINEVAR: PRODUCT_NAME}.
Here's the code of ORDER_STATUS_NOTIFICATION_SUBJECT:

<!--{START:PRODUCT_LINE}-->
	<tr>
		<td style="border-bottom:1px solid #ddd;padding-bottom:3px;">
			{LINEVAR:PRODUCT_IMG}
			{LINEVAR:PRODUCT_NAME}<!--{IF:ORDER_PRODUCT_CODE}--> {LINEVAR:PRODUCT_CODE}<!--{ENDIF:ORDER_PRODUCT_CODE}-->
			{LINEVAR:PRODUCT_DOWNLOAD}
			{LINEVAR:PRODUCT_DETAILS}
		</td>
		{LINEVAR:CUSTOMFIELD_VALUE}
		<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_PRICE}</td>
		<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_QUANTITY}</td>
		<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_TOTAL}</td>
	</tr>
<!--{END:PRODUCT_LINE}-->

Last edit: 7 years 5 months ago by Jerome. Reason: Message edited by a moderator : Please do not paste entire file content in the forum

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
7 years 5 months ago #253923

Hi,

Please do not paste entire file content in the forum specially if it is official and unedited content ; that content is provided in the packages there is no need to duplicate all the HikaShop source code in that forum.
You can be sure that we have the source code of the email ; like everyone who download HikaShop.

I hope that with less content you will be able to see what you're looking for.
Please use appropriate software to search content in text ; if the support team told you to find some text in a file, it means that the text is in the file ; pasting the all file content in order to ask us to tell you where it is do not seem appropriate.

Thank you for your understanding.


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 113
  • Thank you received: 2
7 years 5 months ago #253926

Ok, I did not. But the fact remains that I do not find the code that I have to change!

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
7 years 5 months ago #253927

Hi,

Nicolas wrote

You can add replace the tag:

{LINEVAR:PRODUCT_NAME}
by:
<a href="http://mywebsite.com/{LINEVAR:product.product_canonical}">{LINEVAR:PRODUCT_NAME}</a>


And if you take a very careful look at the code in your message you will find the tag in the fifth line.
So replace the tag by the content ; just like Nicolas told you to.


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 113
  • Thank you received: 2
7 years 5 months ago #253975

Excuse me, I had not seen the line of code, I just used the search function of the browser. :)
I modified the code and it works. If I insert it without <a> tag, the link is properly inserted in the mail, but with the tag <a> the product name is not linked. I something wrong?

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
7 years 5 months ago #253980

Hi,

What do you mean ? What link do you get ? Could you use the browser inspector to look at the link of the email ? Could you provide a screenshot of the resulting HTML ?

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

  • Posts: 113
  • Thank you received: 2
7 years 5 months ago #254041

Hello Nicolas,

Thanks for your reply.
I attach screenshots of the modified html code in System> Email.


I attach screenshot of the analysis of the page, where you see that the link does not exist.

Thank You in advance!

Attachments:

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
7 years 5 months ago #254044

Hi,

I don't see how that's possible.
You must not be editing the correct email/file for the email you're looking at.

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

  • Posts: 113
  • Thank you received: 2
7 years 5 months ago #254153

if you care to know, I did a test. I inserted the image link, the name and the code. Well, everything is properly linked, except the name! :huh:

<a href="http://mywebsite.com/{LINEVAR:product.product_canonical}">{LINEVAR:PRODUCT_IMG}{LINEVAR:PRODUCT_NAME}
			<!--{IF:ORDER_PRODUCT_CODE}--> {LINEVAR:PRODUCT_CODE}<!--{ENDIF:ORDER_PRODUCT_CODE}--></a>

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

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
7 years 5 months ago #254197

Hi,

Can you provide again a screenshot of the result with the HTML code like you did before ?

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

Time to create page: 0.126 seconds
Powered by Kunena Forum