How to add html in language file of opencart 2.0.1.1?


Tags: php,html,css,opencart2.x

Problem :

Actually i need to do this When a customer gets rewards points he gets notified by email. The default email contains only these lines :

You have received 200 Reward Points!

Your total number of reward points is now 200.

I know this text is in language file at

/admin/language/english/mail/customer.php
$_['text_reward_received']      = 'You have received %s Reward Points!';
 $_['text_reward_total']         = 'Your total number of reward points is now %s.';

I need to apply some css styling on this email notification relative to my opencart store. I tried adding html and css in this customer.php language file but it won't work. I don't have any idea how can I apply styling i want. I need to know that Can i add html in a model file or not ?? If yes then how ?



Solution :

I was unable to add html in language file because in model the method used to send mail was using

$mail ->setText(html_entity_decode($message, ENT_QUOTES, 'UTF-8'));

I have changed this to :

$mail ->setHtml(html_entity_decode($message, ENT_QUOTES, 'UTF-8'));

It then allowed me to add html in language file.


    CSS Howto..

    How to draw a circle css

    how to drag and drop a
    across the page

    How do I load a nested web page in a
    tag using only javascript and html?

    How to force CSS @media style from JS regardless of screen size?

    How to convert a CSS3 2D animatuon to a 3D Transform

    how to show JS alert on open of each tab of the slider?

    How do I get a value from the style element?

    How to display random parts of a page on refresh?

    Dropdown menu. make it show onclick and not onmouseover

    How can I display 2 big buttons next to each other html & css

    How to create a border that does't add a margin?

    How can I align a logo AND a heading to the centre of a page?

    How can I force CQ5.5 to ignore CSS data-uri-schemes?

    how to give multiple colors in the same cell in a full calendar?

    How can I use the key name instead of value in map-get?

    How to have choices that change the background of a site

    How to get image info from css into MasterPage'gridview?

    How can I remove a bootstrap buttons hover effect?

    How do I have the div displayed without having text content?

    How to change padding using php in options framework

    Pagination: How to display a long text as book pages?

    How to calculate effective CSS for a DOM node using PHP

    How do I properly inspect jquery and javascript using web developer tools?

    How to set css cursor value to variable within jQuery?

    How to arrange div structure with radius using CSS

    How to make the css asset follow a certain order in symfony2 projetcs

    How to fix angular-strap css

    how to make Sections in one line?

    How to make div disappear when clicking outside?

    How to center div and ul using CSS?