I don't seem to understand how multiple storefronts work. I have two storefronts, both running the responsive theme but with two different styles.
I have added a bit of code to index.tpl using the my changes addon, and it works on both storefronts. The problem is I would need the code to run on one storefront only. So, how do I do this?
Another problem I have is that both storefronts use the same addons. For example, I would like to enable the reward points addon on one storefront but not the other. I can't figure out how to do this. If I choose a store in the admin panel, I can't disable the addon.
Thanks for all help,
-mats
You would have to make it conditional upon company_id. I.e. {$runtime.company_id}
0 == all stores
1 == first store
2 == second store
etc,
But stores may not be sequentially numbered and may not start at 1 for the fist store. All depends on what you've done in the back end for creating/deleting storefronts.
[quote name='pine' timestamp='1422195284' post='203382']
Another problem I have is that both storefronts use the same addons. For example, I would like to enable the reward points addon on one storefront but not the other. I can't figure out how to do this. If I choose a store in the admin panel, I can't disable the addon.
[/quote]
As a solution, you can use a copy of the main theme for the second store and delete add-on templates from this theme
Thanks for your help. Conditional was what I was looking for, but couldn't find the right variable to use.
I have many times needed info on how to do these kinds of checks in templates, is there any place where I can find a list on usable objects/attributes/variables?
Nope, you just have to dig through other templates/code to fine similar things and then apply logic. A Registry schema would be very useful with a description related to each entry. But then they'd be kind of bound to it if it were published. That's why a lot of cs-cart internals are not published so they can be changed at any time.
[quote name='tbirnseth' timestamp='1422436421' post='203626']
Nope, you just have to dig through other templates/code to fine similar things and then apply logic. A Registry schema would be very useful with a description related to each entry. But then they'd be kind of bound to it if it were published. That's why a lot of cs-cart internals are not published so they can be changed at any time.
[/quote]
Alrighty then… thanks for the info!