Different Email Template For 2 Stores

Hi,

We have 2 different store and I would like to have different email template for each store.

For the moment, when I select Design/Email Templates, I can made change only when I am on All Stores. If I am on Store#1, I can made change but save Button doesn't appear.

Hi,

We have 2 different store and I would like to have different email template for each store.

For the moment, when I select Design/Email Templates, I can made change only when I am on All Stores. If I am on Store#1, I can made change but save Button doesn't appear.

Hello!

Yes, e-mail templates are general for all storefronts. You can change language variables and add storefront conditions if you want to make them different.

I'm disapoined. My 2 storefronts are for different kind of customers. For example, the email for user profile creation must be different for each store front customers. I will try to find another solution :-(

I try your option by add new language option (by clone the first one) and now, my storefront are all in mirror effect. It is possible to remove the mirror effect?

Hello!

Yes, e-mail templates are general for all storefronts. You can change language variables and add storefront conditions if you want to make them different.

I am trying to create some storefront conditions for my email templates but i'm not sure of the variables to use. Is it possible to get a full list of the variables that can be used?

Also the code i am trying to use for the storefront condition is:

{% if store_id == 1 %}
    {{ snippet("Store1") }}
{% elseif store_id == 2 %}    
    {{ snippet("Store2") }}
{% elseif store_id == 3 %}    
    {{ snippet("Store3") }}
{% endif %}

How does this code look and what should i use in place of "store_id"?

Seems to me this would be done automatically like other shared objects using the ult_object_sharing table for the template data.

If you use the original email templates, you can use a different theme (even if they're cloned) to have separate email templates for each storefront.

I am trying to create some storefront conditions for my email templates but i'm not sure of the variables to use. Is it possible to get a full list of the variables that can be used?

Also the code i am trying to use for the storefront condition is:

{% if store_id == 1 %}
    {{ snippet("Store1") }}
{% elseif store_id == 2 %}    
    {{ snippet("Store2") }}
{% elseif store_id == 3 %}    
    {{ snippet("Store3") }}
{% endif %}

How does this code look and what should i use in place of "store_id"?

Please try to use some variable of company variable or runtime.company_id http://joxi.net/ZrJelbvi974WbA

I am trying to create some storefront conditions for my email templates but i'm not sure of the variables to use. Is it possible to get a full list of the variables that can be used?

Also the code i am trying to use for the storefront condition is:

How does this code look and what should i use in place of "store_id"?


It is not clear what template do you want to change. But try the following condition

{% if (company_data.company_id == 1) or (o.company_id == 1) %}
    {{ snippet("Store1") }}
{% elseif (company_data.company_id == 2) or (o.company_id == 2) %}    
    {{ snippet("Store2") }}
{% elseif (company_data.company_id == 3) or (o.company_id == 3) %}    
    {{ snippet("Store3") }}
{% endif %}

Thanks for your help however I've had a play around with this but i'm still unable to get it to work.

The template i am trying to get to edit is the the footer snippet for the email templates. I have tried adding the code {{ snippet("Store1") }} directly into the footer snippet and this pulls ok but i cant see what variables i am able to use. I don't have a list of available variables on the left.

If i can't do this from within a snippet i can try to do it from within the email template. That kinda defeats the point of having the snippets though.

So if i try to edit the email template for Reward Points. This doesn't have the company_id varaible available. Could i just use Company_name instead like company_name == "Paradox Body Jewellery"

I've had a bit more of a play about now and managed to get this to work.

So in my Email Template Footer Snippet i have the code:

{% if (company_data.company_name == "CompanyName1") %}
{{ snippet("store1") }}
{% elseif (company_data.company_name == "CompanyName2") %}
{{ snippet("store2") }}
{% elseif (company_data.company_name == "CompanyName3") %}
{{ snippet("store3") }}
{% endif %}

Where CompanyName1/2/3 is the Company Name in Settings: Company and store1/2/3 is the Snippet you would like to display.

"company_name" will work, but it is recommended to use 'company_id' and then compare it with the company_id of the storefront. Reason is that a name can change where the company_id would not. It also dovetails better with things like runtime.company_id which identifies which storefront is currently in use (customer view or admin view).

I agree with company_id. As you can see we used it in our code example. As for runtime, I do not see it in the list of available variables.

I agree too. This works when an order is placed on the website however when i add or subtract reward points from within admin the email that is sent to the customer the company_id value is 0.

{{order_info.company_id}} for orders.

Just had a go adding the variable order_info.company_id into my footer. This works ok when i change an order status but for the reward points email when i manually add them this doesn't seem to bring any value back.

Can you please let me know where i can find a list of the varaibles? Thanks

Open reward points template and check list of available variables at the left.

Thank you for your help with this.

I've just looked where you mention about the variables. The ones shown are:

  • company_name
  • company_data
  • logos
  • styles
  • settings
  • product
  • url

As order_info isn't displayed i guess this is why no data is returned. I am also assuming that you can put any variable into a snippet but it depends which template is pulling the snippet as to what will work.

So i can see that company_id is part of the company_data variable. How can i find the other variable attributes eg company_data.???

So i can see that company_id is part of the company_data variable. How can i find the other variable attributes eg company_data.???

For some reason it is not extended. Looks like there is a bug and this variable does not contain "subvariables"

Thanks eComLabs,

I'll speak with CS-Cart directly and see what they say

Not a bug. By design, cs-cart has chosen to provide variable access to only those properties that are specified in the class (I disagree with this choice). That's why you can no longer simply add a column to a table and have it appear in the variables for that object.