Page 1 of 1

Coding visible in the Store Credit mails

Posted: Sat Jun 17, 2017 4:25 am
by ash_sp99
Hello,
I am using a following vqmod for showing a Indian rupee symbol, which is working fine...

Code: Select all

<file path="system/library/currency.php">
      <operation>
         <search position="replace"><![CDATA[$symbol_left   = $this->currencies[$currency]['symbol_left'];]]></search>
         <add><![CDATA[$symbol_left   = (($currency == 'INR') ? '<span class="fa fa-rupee" style="padding-right: 2px;"></span>' : $this->currencies[$currency]['symbol_left']);]]></add>
      </operation>

      <operation>
         <search position="replace"><![CDATA[$symbol_left   = $this->currencies[$this->code]['symbol_left'];]]></search>
         <add><![CDATA[$symbol_left   = (($this->code == 'INR') ? '<span class="fa fa-rupee" style="padding-right: 2px;"></span>' : $this->currencies[$this->code]['symbol_left']);]]></add>
      </operation>
   </file>

   <file path="catalog/view/theme/xxx/template/common/currency.tpl">
      <operation>
         <search position="after" offset="0"><![CDATA[<?php foreach ($currencies as $currency) { ?>]]></search>
         <add><![CDATA[<?php if ($currency['code'] == 'INR') {
         $currency['symbol_left'] = '<span class="fa fa-rupee" style="padding-right: 2px;"></span>';} ?>]]></add>
      </operation>
   </file>
</modification>
But when we send a Store credit mail then that mail shows

Code: Select all

<span class="fa fa-rupee" style="padding-right: 2px;"></span>
544 credit

Pls. suggest what change u suggest in the above vqmod which stops this coding showing in emails . I am using opencart 2.1.0.2

Re: Coding visible in the Store Credit mails

Posted: Sat Jun 17, 2017 5:13 am
by thekrotek
You can't use Font Awesome in mails the same way you do it in your store ("fa-rupee" class). You need to insert it directly.

Re: Coding visible in the Store Credit mails

Posted: Sat Jun 17, 2017 5:37 pm
by ash_sp99
In emails, I don't want to use any special font, so pls. tell me what i need to do in above mod to fix in emails but untouched on website.

Re: Coding visible in the Store Credit mails

Posted: Sat Jun 24, 2017 1:41 am
by ash_sp99
Any suggestion guys, what can be done to solve this issue.

Re: Coding visible in the Store Credit mails

Posted: Sat Jun 24, 2017 2:00 am
by artcore
Try this
https://www.w3schools.com/charsets/tryit.asp?deci=8360
You can also try adding it via admin>localization>currency unless the & has to be escaped somewhere.

Re: Coding visible in the Store Credit mails

Posted: Sat Jun 24, 2017 2:03 am
by ash_sp99
this is not the solution. We are talking about the editing in the php code, to avoid html in mails.

Re: Coding visible in the Store Credit mails

Posted: Sat Jun 24, 2017 2:05 am
by thekrotek
Like I said in my previous reply, INSERT IT DIRECTLY. Go to your currency settings and simply copy Rupee symbol from somewhere to Left Symbol field. And disable this stupid mod, because you absolutely don't need it.

Re: Coding visible in the Store Credit mails

Posted: Sat Jun 24, 2017 2:54 am
by ash_sp99
You are absolutely right, no need of them stupid mod, but font used on the site changed the symbol design because not available in each font.

That's why we have to use this.

Re: Coding visible in the Store Credit mails

Posted: Sat Jun 24, 2017 4:26 am
by thekrotek
Have you tried to use another font or search for your current font updates? I'm pretty sure, it can be fixed without any mod.