Order notification mails: several issues

  • Posts: 43
  • Thank you received: 3
9 years 3 months ago #210853

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- Browser(s) name and version -- : IE10, FF39.0, Safari

Hi all,

I have several (style) issues with the notification mails. - I attach 2 screenshots.

1. The order number is styled as a usual link (blue + underlined). I need the number to be white.
I tried:
- Add CSS code to the related <td>
- Add inline CSS to the language file ORDER_CREATION_SUCCESS_ON_WEBSITE_AT_DATE resp. ORDER_STATUS_CHANGED_TO <style="....">%s ...
- Add CSS to the head definition of the mail templates
None of that works. The link still stays the same.

2. The salutation is not going to be displayed. I´m using a custom field for that.
So I´ve replaced $customer_name with @$data->user_data->user_firstname
Is that wrong?

3. The value of the field "address_street2" (used for the house number) is not displayed, neither in the mail nor in the checkout. Although the field is published and checked for the front end.
The field itself is displayed in the registration process, but its' values are displayed nowhere.

4. The title of the telephone field is displayed in mails and in the checkout although the field is set unpublished and unchecked for the front end.

5. The pictures are cropped although they are defined as
.pict img {max-width: 500px !important; height: auto;}
.pict img {max-width: 278px; height: auto;}
.pict img {max-width: 408px; height: auto;}
Adding !important does not fix it either.

6. I´m working with tax on invoices, but I would like to delete the tax line from the mails (in the screenshot the line "EUR 30,96"). How can I do this?

Much text. I hope this has not been answered somewhere. At least I didn´t find someting similar.

Any ideas?
Thanks.

Attachments:

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
9 years 3 months ago #210883

Hi,

1. I'm not a specialist of emails but it's highly possible that the email client you're using to display the email forces the links to be blue underlined to prevent some spam techniques. For example:
www.campaignmonitor.com/blog/post/3648/g...-from-black-to-blue/
www.paperstreet.com/blog/how-to-rid-outl...our-email-campaigns/

2. There is normally no @$data->user_data variable, but if that works for you, then fine. Normally, I would recommend:
@$data->customer->FIELD where FIELD is the column name of your custom user field.
If you're using a custom address field, then it should be instead @$data->cart->billing_address->FIELD

3. You need to add the corresponding tag to the address_template view file for both your backend and forntend template via the menu Display>Views.

4. You'll be able to change that like for point 3.

5. That's not about CSS. They are cropped because the code of the email makes them cropped :

$img = $imageHelper->getThumbnail($item->images[0]->file_path, array(50, 50), array('forcesize' => true, 'scale' => 'outside'));
Change the "scale" parameter to "inside" and that should avoid the cropping.

6. You can remove the code:
foreach($data->cart->order_tax_info as $tax) {
				$cartFooters[] = array(
					'NAME' => $tax->tax_namekey,
					'VALUE' => $currencyHelper->format($tax->tax_amount,$data->cart->order_currency_id)
				);
			}
if you want to remove that line of tax in the email.

The following user(s) said Thank You: disc

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

  • Posts: 43
  • Thank you received: 3
9 years 3 months ago #211036

Thanks Nicolas. Nearly perfect.
No. 3-6 work.

Regarding no. 1:
The issue is not about the mail client, neither gmail or another provider nor office solutions as outlook.
The order number link appears also in the preview of the backend in blue and underlined.
I also added the !important parameter to the related CSS tags but that also doesn´t work.
Can I add the CSS somewhere in the related php where the order no. is defined?
If so, where is it?

Regarding no. 2:
Seems the route to the table data is somehow wrong.
What would be the right path to use when I want the firstname of the address table to use for the salutation?
@$data->address->address_firstname seems to be wrong.

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
9 years 3 months ago #211065

Hi,

1. Then it's the way you put your CSS which is wrong.
Normally, you should simply add inline CSS to the link but changing the line:

$url = '<a href="'.$order_url.'">'. $url.'</a>';
to something like:
$url = '<a href="'.$order_url.'" style="color:green !important;">'. $url.'</a>';

2. Yes, that's wrong. I've told you in my previous message that it should be:
@$data->cart->billing_address->address_firstname
Why not try with that ?

The following user(s) said Thank You: disc

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

  • Posts: 43
  • Thank you received: 3
9 years 3 months ago #211604

Both works!
Thanks!

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

Time to create page: 0.069 seconds
Powered by Kunena Forum