Custom Field in Emails displayed without CSS

  • Posts: 88
  • Thank you received: 0
8 years 6 months ago #257222

-- url of the page with the problem -- : synrgi.latelier-des-spheres.fr/
-- HikaShop version -- : 2.6.4

Hello,

I am in modifying how the Email are displayed and their CSS
I've setup all the CSS inside the Order Admin Notification but the custom fields are not affected by my modifications.





I've never found how to customize those fields... is it because they do not have a HTML code here :


Should I add the HTML ?
How can I also adjust the width of that custom field column ?

Thanks in advance for your help and advise,
Best regards
Stéphane

Attachments:
Last edit: 8 years 6 months ago by steph3838.

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

  • Posts: 88
  • Thank you received: 0
8 years 6 months ago #257269

I found that this column is generated in the "preload" part of the Email... But the title does not appear in bold even if set with !important...

Other point : how could I remove the "sous-total" and add "Dont " in front of TVA



Thanks in advance for your help and advise,
Best regards
Stéphane

Attachments:
Last edit: 8 years 6 months ago by steph3838.

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

  • Posts: 83993
  • Thank you received: 13605
  • MODERATOR
8 years 6 months ago #257326

Hi,

1. I don't see why the bold would work differently in the custom field td. I can only think that there is an error in the CSS you put which makes it invalid. So I would recommend to double check it.

2. To remove the sub total row, you can remove that code in the preload:

$cartFooters[] = array(
			'NAME' => JText::_('SUBTOTAL'),
			'VALUE' => $currencyHelper->format($subtotal,$data->cart->order_currency_id)
		);
3. The TVA part either comes from the name of your tax rate that you configured via the "Manage tax rates" of the menu System>Taxes, or from a translation key (based on whether the "display detailed taxes" setting is turned on or off in your HikaShop configuration.
So if it's a translation, you can override it: www.hikashop.com/download/languages.html#modify
And if it's the tax rate name, you can create a new tax rate with the name you want, select it in your tax rules instead of the one you have now and you'll be done.

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

  • Posts: 88
  • Thank you received: 0
8 years 6 months ago #257329

Thanks you so much for your help Nicolas !

For point 1, the screenshot comes from the preview popup in the order edition front end panel. The emails sent have it in bold... I had already double-checked before posting, strange... but not blocking.

Point 2 : i will do so Thanks for the code.

Point 3 : I will investigate, but anyway, you gave me manageable possibilities, should be donne easelly.

Again thanks for help,
Best regards
Stéphane

Last edit: 8 years 6 months ago by steph3838.

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

  • Posts: 88
  • Thank you received: 0
8 years 6 months ago #257340

nicolas wrote: 3. The TVA part either comes from the name of your tax rate that you configured via the "Manage tax rates" of the menu System>Taxes, or from a translation key (based on whether the "display detailed taxes" setting is turned on or off in your HikaShop configuration.
So if it's a translation, you can override it: www.hikashop.com/download/languages.html#modify
And if it's the tax rate name, you can create a new tax rate with the name you want, select it in your tax rules instead of the one you have now and you'll be done.


Hi Nocolas,

The tax name does not come from the translation as I have already changed it, so I am thinking about another solution.
Could I in the preload change the code from :
				$cartFooters[] = array(
					'NAME' => $tax->tax_namekey,
					'VALUE' => $currencyHelper->format($tax->tax_amount,$data->cart->order_currency_id)
				);
to
				$cartFooters[] = array(
					'NAME' => $tax->"Dont : ".tax_namekey,
					'VALUE' => $currencyHelper->format($tax->tax_amount,$data->cart->order_currency_id)
				);

ie. concatenate
Dont : 
with the variable value
That would be a really simple solution for me that would only affect the E-mails.

Thanks in advance for your help and advise,
Best regards
Stéphane

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

  • Posts: 83993
  • Thank you received: 13605
  • MODERATOR
8 years 6 months ago #257341

Hi,

Yes, you can do it like that too. And if you want it to only affect the emails and not the invoices/cart, then it's better than my solution.

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

  • Posts: 88
  • Thank you received: 0
8 years 6 months ago #257468

nicolas wrote: Hi,

Yes, you can do it like that too. And if you want it to only affect the emails and not the invoices/cart, then it's better than my solution.


Hi Nicolas,

EDIT
Forget my question ! I've found my error !
should be this way :
'NAME' =>'Dont '.$tax->tax_namekey,
END EDIT

When I write as proposed :
'NAME' => $tax->"Dont ".tax_namekey,
I get a syntax error...

I could not find out why, could you please be so kind and help me sorting that out ?
Thanks in advance for your help and advise,
Best regards
Stéphane

Last edit: 8 years 6 months ago by steph3838.

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

  • Posts: 83993
  • Thank you received: 13605
  • MODERATOR
8 years 6 months ago #257480

Hi,

$tax->tax_namekey is a variable and you shouldn't put extra text in it. When you concatenate two elements together in PHP you do it like that: 'x'.'x' or $x.$x or 'x'.$x or $x.'x'
Doing $tax->"Dont ".tax_namekey is not valid as you break the variable.
So thus, what you want is indeed "Dont ".$tax->tax_namekey

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

Time to create page: 0.066 seconds
Powered by Kunena Forum