Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Email Template Smarty (If = Shop, Then Footer = This Color) Rate Topic   - - - - -

 
  • customer42
  • Newbie
  • Members
  • Join Date: 07-Apr 18
  • 13 posts

Posted 17 April 2018 - 08:40 AM #1

Got a small issue which I can't solve, the email templates are shared over all shops. Therefore the hardcoded colors in my template are used everywhere and that's just no good.

 

This could be solved in 2 ways, either the shops don't share the same email templates anymore.

Or I put an IF statement in the code.

 

Can anyone assist?

 

    .message-footer > td {
      padding: 10px 15px;
      background-color: #2290db;
    }
 
Should be
 
    .message-footer > td {
      padding: 10px 15px;
      background-color: {% if shopid = 1 %} Color1 {% else %} Color2 {% endif %};
    }

 

I lack the knowledge about the to be used variable for shopID and the way I should construct the statement.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17137 posts

Posted 17 April 2018 - 01:10 PM #2

Please try

background-color: {% if company_data.company_id = 1 %} red {% else %} green {% endif %};

DISCOUNTS UNTIL APRIL, 27! GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 305     Multi-Vendor              USD 1150    CS-Cart RU                         21500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 505      CS-Cart RU + UniTheme    33000 руб.