The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.
 
 
Thread Tools Display Modes
  #1  
Old 05-02-2011, 09:25 PM
Mike C's Avatar
Mike C is offline
Senior Member
 
Join Date: Oct 2010
Location: USA
Posts: 479
Send a message via AIM to Mike C Send a message via Yahoo to Mike C
Default

Question about Ecwid on multiple sites..


I'm getting ready to have my main commercial site re-designed. Once that re-design is complete, I will have a series of satellite informational websites designed and I would also like to put my Ecwid store on those sites.

From what I remember reading, the CSS that I use on the main site will be the CSS that is used on any other site as we cannot specify different CSS schemes for different sites, correct?
  #2  
Old 05-05-2011, 06:50 AM
Eugene Rimmer's Avatar
Eugene Rimmer Eugene Rimmer is offline
Senior Member
 
Join Date: Jan 2011
Location: Ecwid headquarters
Posts: 7,765
Default

That's right, Ecwid uses just 1 CSS theme for all the places where you embed it.

But you can use the following trick: wrap everything in the page where you embed Ecwid into some container element - usually you already have some div in between <body> and around your Ecwid widgets, but if you dont, just wrap everything into div element. Now give this element an id attribute with some value distinct from other shops. So that all your shopping pages on all sites schematically look like this:
Code:
<html …
    …
    <body …
        …
            <div id="shop1"
                {Ecwid goes here}
That id="shopX" should change between the shops that you want to look differently.

Now in your Ecwid CSS theme at the end append the rules just like you would normally customize Ecwid, but add #shopX (#shop1 in case of my example code above) into the beginning of each selector. This will apply the customizations only to the site that has that id in the HTML source.

This way your CSS rules will be specific for your separate sites. You can add any number of customizations to any number of specific sites into 1 theme this way.

Last edited by Eugene Rimmer; 05-05-2011 at 07:10 AM.
  #3  
Old 05-05-2011, 07:02 PM
Mike C's Avatar
Mike C Mike C is offline
Senior Member
 
Join Date: Oct 2010
Location: USA
Posts: 479
Send a message via AIM to Mike C Send a message via Yahoo to Mike C
Default

Hmm, I halfway understand (not the other half because I'm not good with CSS or code in general) But it sounds like there's a workable workaround
Could you show an example of two CSS rules that could be used for two diff sites using your workaround?
  #4  
Old 05-11-2011, 08:08 AM
Eugene Rimmer's Avatar
Eugene Rimmer Eugene Rimmer is offline
Senior Member
 
Join Date: Jan 2011
Location: Ecwid headquarters
Posts: 7,765
Default

Quote:
Originally Posted by Mike C View Post
Hmm, I halfway understand (not the other half because I'm not good with CSS or code in general) But it sounds like there's a workable workaround
Could you show an example of two CSS rules that could be used for two diff sites using your workaround?
Yes, for example:
Code:
#one_site div.ecwid-productBrowser-price {
	color: red;
}

#another_site div.ecwid-productBrowser-price {
	color: green;
}
will color the prices red on the site where Ecwid is inside <div id="one_site"> and green on those where Ecwid is inside <div id="another_site">.

So basically you put Ecwid inside DIV with some ID, then when customizing the CSS part for that site, put #{that id} before the selectors in your rules.
  #5  
Old 08-05-2011, 06:07 PM
Andreas May's Avatar
Andreas May Andreas May is offline
Junior Member
 
Join Date: Jul 2011
Posts: 25
Default

That's a great solution Eugene. Thanks for following up.
 
The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.

Tags
css, multiple, sites

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:49 AM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.