Edit Email from backend-Add Track en Trace *Solved

  • Posts: 154
  • Thank you received: 10
11 years 1 week ago #136359

Hi all!

I have a little problem, I'm updating my entire webshop to the newest version of Hika but now I find a big issue for me.

In the backend, when I change order status to 'shipped' in the old version I would get a popup if I want to inform customer and I can edit the html that will send to them. I add there the Track and Trace number (shipping number) for the customer so he gets that in the mail.

But now when I click status shipped I can only tap a box that says inform customer. No box to edit the mail :( :( :(

Is it possible for me to add a box (like the history box) and that whatever I put in the box will appear in the mail the customer recieves when the product is shipped? See attachement for details

Is that possible? And if so, How do I do it? It's very important for customers to get the shipping number so I have to add it somehow. A box like the attachment would be the best but adding it to the email like in the previous version would also be good.

Thanx!


Proud of my website www.hetcomputerwinkeltje.nl

Currently just running catalog mode, but hope to go live soon again :)
Attachments:
Last edit: 11 years 6 days ago by anypc. Reason: Marked as solved

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

  • Posts: 154
  • Thank you received: 10
11 years 1 week ago #136367

Okay, I´m a bit further in the process:

- I created a custom field called 'trackentrace' and added it to 'order'
Now that sits in the order page and I can edit it with the edit button in the top. (see attachement)

But how to get it in the email if the status changes..

I tried to add this to the System - emails - 4 Order status notification

<h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd;padding-top:10px;padding-bottom:10px;">
  VERZENDINFORMATIE
</h1>
  <?php echo $this->row->trackentrace; ?>

That does display the text 'VERZENDINFORMATIE' in the email but no trackentrace box.

How do I add it to the email?


Proud of my website www.hetcomputerwinkeltje.nl

Currently just running catalog mode, but hope to go live soon again :)
Attachments:

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
11 years 1 week ago #136481

Hi,

You can now use tags for your custom fields:
{VAR:order.my_field}

where my_field is the column name of your custom field.

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

  • Posts: 154
  • Thank you received: 10
11 years 1 week ago #136487

Hi nicolas,

Sorry to bother you again, this doesn't display anything I put in in the field :(

Any other settings I might have missed?

See attachments:

I use this code for the emailtemplate:

</table>
<!--{IF:PAYMENT}-->
<p>
  <span style="color:#1c8faf !important;font-size:12px;font-weight:bold;">{TXT:PAYMENT_METHOD} :</span> {VAR:PAYMENT}
</p>
<!--{ENDIF:PAYMENT}-->
<!--{IF:SHIPPING}-->
<p>
  <span style="color:#1c8faf !important;font-size:12px;font-weight:bold;">{TXT:HIKASHOP_SHIPPING_METHOD} :</span> {VAR:SHIPPING}
</p>
<h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd;padding-top:10px;padding-bottom:10px;">
  VERZENDINFORMATIE
</h1>
<p>
  <span style="color:#1c8faf !important;font-size:12px;font-weight:bold;">Uw Track en Trace nummer :</span> {VAR:order.track}
</p>
<p style="border-bottom:1px solid #ddd;padding-bottom:10px;">
Indien uw bestelling verzonden wordt met PostNL Pakketpost dan vind u hierboven de track en trace code om de zending te volgen. Log in op <a href="http://www.trackentrace.nl">www.trackentrace.nl</a> en vul uw gegevens in.<br>
  <br>
  Als uw bestelling is verzonden met briefpost dan treft u geen track en trace code aan en mag u er vanuit gaan dat uw bestelling de volgende dag geleverd is.
                </p>
<!--{ENDIF:SHIPPING}-->
<!--{IF:ORDER_SUMMARY}-->
<h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd;padding-top:10px;padding-bottom:10px;">
  {TXT:ADDITIONAL_INFORMATION}
</h1>
<p style="border-bottom:1px solid #ddd;padding-bottom:10px;">
  {VAR:ORDER_SUMMARY}
</p>
<!--{ENDIF:ORDER_SUMMARY}-->

The name of the newest box is 'TRACK'
I dont know if it's case-sensitive but I tried both track and TRACK.


Proud of my website www.hetcomputerwinkeltje.nl

Currently just running catalog mode, but hope to go live soon again :)
Attachments:
Last edit: 11 years 1 week ago by anypc. Reason: Forgot attachments

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
11 years 1 week ago #136510

It will only work if you have HikaShop 2.2.3. Is that the case ?

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

  • Posts: 154
  • Thank you received: 10
11 years 1 week ago #136512

Yes i have 2.2.3 the newest version.


Proud of my website www.hetcomputerwinkeltje.nl

Currently just running catalog mode, but hope to go live soon again :)

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
11 years 1 week ago #136518

Can you provide a screenshot of the options screen of your custom order field please ?

The following user(s) said Thank You: anypc

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

  • Posts: 154
  • Thank you received: 10
11 years 1 week ago #136531

I made a screenshot on my phone hope its enough


Proud of my website www.hetcomputerwinkeltje.nl

Currently just running catalog mode, but hope to go live soon again :)

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

  • Posts: 154
  • Thank you received: 10
11 years 1 week ago #136562

Whoops, guess mobile uploads isnt supported.

Made a screenshot on PC now:


Proud of my website www.hetcomputerwinkeltje.nl

Currently just running catalog mode, but hope to go live soon again :)
Attachments:

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
11 years 1 week ago #136608

Can you edit the preload of the order status notification via the menu System>Emails and change the line:
'order' => $data->order,
to:
'order' => $data->cart,

It looks like a wrong copy/paste on our end :)
It should work better after that.

The following user(s) said Thank You: anypc

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

  • Posts: 154
  • Thank you received: 10
11 years 1 week ago #136640

Hi NIcolas,

Sorry, still no change in the email. The 'track' field still doesn't show up :(

Here the PRELOAD_VERSION after I changed what you said:

$vars = array(
  'LIVE_SITE' => HIKASHOP_LIVE,
  'URL' => $order_url,
  'ORDER_PRODUCT_CODE' => (bool)$config->get('show_product_code', false),
  'order' => $data->cart,
  'billing_address' => @$data->cart->billing_address,
  'shipping_address' => @$data->cart->shipping_address,
);

And here the HTML version that goes with it:
<h1 style="color:#1c8faf !important;font-size:16px;font-weight:bold;border-bottom:1px solid #ddd;padding-top:10px;padding-bottom:10px;">
  VERZENDINFORMATIE
</h1>
<p>
  <span style="color:#1c8faf !important;font-size:12px;font-weight:bold;">Uw Track en Trace nummer :</span> {VAR:ORDER.TRACK}
</p>
<p style="border-bottom:1px solid #ddd;padding-bottom:10px;">
I tried both order.track ORDER.TRACK order.TRACK but no difference.


Proud of my website www.hetcomputerwinkeltje.nl

Currently just running catalog mode, but hope to go live soon again :)
Last edit: 11 years 1 week ago by anypc.

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
11 years 1 week ago #136883

It should be {VAR:order.track}

I checked the code and actually something else is missing.
Please change the code:

else
$content = str_replace('{VAR:'.$k.'}', '', $content);
to:
elseif(is_object($v) || is_array($v)) {
				foreach($v as $objK => $objV) {
					if(is_string($objV) || is_int($objV) || is_float($objV))
						$content = str_replace('{VAR:'.$k.'.'.$objK.'}', $objV, $content);
				}
			}
in the file administrator/components/com_hikashop/classes/mail.php and it will work.

The following user(s) said Thank You: anypc

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

  • Posts: 154
  • Thank you received: 10
11 years 1 week ago #136895

Hi nicolas,

When I change the code like you say it doesn't send anything.
I click the green V icon to confirm sending the email but all that happens is a refresh of the page and the main information box empties.

Look at the attachment.


Proud of my website www.hetcomputerwinkeltje.nl

Currently just running catalog mode, but hope to go live soon again :)
Attachments:

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

  • Posts: 83024
  • Thank you received: 13403
  • MODERATOR
11 years 1 week ago #136925

This means that you didn't change the code properly.
Can you do a screenshot of your change ?

The following user(s) said Thank You: anypc

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

  • Posts: 154
  • Thank you received: 10
11 years 1 week ago #136942

Hi Nicolas,

I re-tried to do the changes you suggested and found out I forgot to copy the last }

So it works like a charm!!

Thanx a million for solving this!!!!!


Proud of my website www.hetcomputerwinkeltje.nl

Currently just running catalog mode, but hope to go live soon again :)

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

  • Posts: 154
  • Thank you received: 10
11 years 6 days ago #137118

For any other people struggling with this a quick tip:

If you edit the status of your order in the list of orders (Click Orders - Orders and you see an overview of the last 20 orders)
You still get the popup where you can edit the html if you like.


Proud of my website www.hetcomputerwinkeltje.nl

Currently just running catalog mode, but hope to go live soon again :)

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

Time to create page: 0.077 seconds
Powered by Kunena Forum