If you're new to the CafePress Community Forums, be sure to read our Forum Guidelines before you post anything.

    Community Forums: Home    CafePress Community Forums  Hop To Forum Categories  General Help & Sharing  Hop To Forums  Shop Customization & HTML    Merging two shops' sidebars
Page 1 2 3 
Go
New
Find
Notify
Tools
Reply
  
Merging two shops' sidebars
 Login/Join 
Moderateur
Picture of Teesed
Posted
In light of the issue of consolidating shops and making them seamless, I have created a little tool to help merge the side navigation bars between shops.

Feedback is welcome.

Demo
(Update - I've removed the demo from my shop since I didn't really have a similar couple of shops to make seamless. If anyone would like to share their site as an example, just post and I'll put it here. thanks.)


How?

Fairly easy. Let's call these Shop A and Shop B.

In this case, we want Shop A's menu above Shop B in both shops.

In Shop A, go to your Custom HTML and find the
<cpstore:sidebar>
code. Change it to
<!-- cp menu start --><cpstore:sidebar><!-- cp menu end -->

Make sure that's EXACT! All on one line, no spaces between.

Save the page at the bottom.

Next, go to Shop B and find the
<cpstore:sidebar>
code. Just before it, put this code:
<script src="http://www.cafewish.com/mergemenu.asp?shopid=id_for_shopa"></script>

Save the page at the bottom.

Go to your Shop B and you should see the Shop A menu above Shop B.

Now, go back to the Custom HTML for Shop B go to your Custom HTML and find the
<cpstore:sidebar>
code. Change it to
<!-- cp menu start --><cpstore:sidebar><!-- cp menu end -->

Save this page at the bottom.

Now go to the Custom HTML for Shop A and just below the new
<!-- cp menu start --><cpstore:sidebar><!-- cp menu end -->
code, put
<script src="http://www.cafewish.com/mergemenu.asp?shopid=id_for_shopb"></script>

Save and viola!


How does this work?
It's a small script that scrapes the page of the second shop and finds the code between the two comment tags. That's why they are important.


Questions, comments, concerns... You can link multiple shops together like this. Nice thing is, when you add a new section to Shop A, it will show up in both shops.

This message has been edited. Last edited by: Teesed,
 
Reply With QuoteReport This Post
Posted Hide Post
Teesed, you're an awesome individual.
 
Reply With QuoteReport This Post
Picture of Mrs Evil Genius
Posted Hide Post
quote:
Originally posted by Wontar:
Teesed, you're an awesome individual.


Ditto this!

I will try to get this up in my shops this week.

Luv Luv Luv


-Blue

"He took all my money and it may sound funny, but I've come to get my money back ..."
 
Reply With QuoteReport This Post
Picture of BGryphon
Posted Hide Post
Ya- LuvLuvLuv says it all.


Brian Gryphon, division of The Digital Gryphon LLC
Google me for blogs and web-sites
 
Reply With QuoteReport This Post
Picture of CYI
Posted Hide Post
Thank you! Luv
 
Reply With QuoteReport This Post
Moderateur
Picture of Teesed
Posted Hide Post
You're welcome. Necessity being the mother of invention and all. Smiler

I think the same idea could be used to even combine the storefronts if you like. I'll work on that later today.
 
Reply With QuoteReport This Post
Posted Hide Post
You're a sweetie, Teesed with a big heart. Looks great!
 
Reply With QuoteReport This Post
Picture of BurnTees
Posted Hide Post
 
Reply With QuoteReport This Post
Moderateur
Picture of Teesed
Posted Hide Post
And I guess it should even work for shops that hand-code their sidebars if you want. That way you only have to change the code on the one shop and the others will show the change automatically. Just make sure you put the two comment tags immediately before and after your own code to pull from - no linebreaks and no spaces.
 
Reply With QuoteReport This Post
Picture of ninaPa
Posted Hide Post
Teesed - A big old Pennsylvania hug for you.... I got my two music shops intertwined thanks to your code! Still have a lot of work to do in splitting up sections and moving things around when the move-tool becomes available, but the groundwork is now laid.
For those who want yet another example to look at:
Milestones Music
Milestones Music 2
 
Reply With QuoteReport This Post
Picture of Fierydragon36
Posted Hide Post
That's a great thing Teesed. Even though I am fairly new and haven't reached that 500 section limit by a ways, it would be great to be able to merge two or maybe more? together to look like 1 big store. And if you are able to get the storefronts to do same thing, WOW!! Keep up the good work!


Come check out Collage Mania and Word Mania!!
 
Reply With QuoteReport This Post
Moderateur
Picture of Teesed
Posted Hide Post
Hey, Nina, that's awesome! Thanks for sharing the example.

Fierydragon36, yes, you can do it with multiple shops. You don't even have to really do it to merge two or more. You could do it just for additional linkage. You could put something like "Check out these designs from our sister store..." above the script code that does the include and do it that way.
 
Reply With QuoteReport This Post
Picture of Mrs Evil Genius
Posted Hide Post
*runs into thread clutching purple crayones*

Teesed, could you plz give us a quickanddirty run down on how to link more than two shops? I'm in the midst of putting your gem to work in my shops, but I'm hesitating over how to do all three of mine.

Thank you!


-Blue

"He took all my money and it may sound funny, but I've come to get my money back ..."
 
Reply With QuoteReport This Post
Moderateur
Picture of Teesed
Posted Hide Post
No problem. It's really as easy as taking the A & B stores and making it A,B and C stores. If you want them all to look the same, I'd draw out a diagram on a sheet of paper to use as you set them up.

I'll work it up, then post.
 
Reply With QuoteReport This Post
Moderateur
Picture of Teesed
Posted Hide Post
Let's say you have shop_a, shop_b and shop_c. If you want to have an identical sidebar, with shop a, b and c sections in that order, do this.

In shop_a, you should have this:

<!-- cp menu start --><cpstore:sidebar><!-- cp menu end -->
<script src="http://www.cafewish.com/mergemenu.asp?shopid=shop_b"></script>
<script src="http://www.cafewish.com/mergemenu.asp?shopid=shop_c"></script>

In shop_b, you should have this:

<script src="http://www.cafewish.com/mergemenu.asp?shopid=shop_a"></script>
<!-- cp menu start --><cpstore:sidebar><!-- cp menu end -->
<script src="http://www.cafewish.com/mergemenu.asp?shopid=shop_c"></script>

In shop_c, you should have this:

<script src="http://www.cafewish.com/mergemenu.asp?shopid=shop_a"></script>
<script src="http://www.cafewish.com/mergemenu.asp?shopid=shop_b"></script>
<!-- cp menu start --><cpstore:sidebar><!-- cp menu end -->


See how the placement of the sidebar and the includes scripts works? You can just do the same thing for 4 or 5 shops. Of course, if you're consolidating lots of shops and if you expand the sidebar sections to show subsections, you're going to have a looooooong sidebar navigation.
 
Reply With QuoteReport This Post
  Powered by Social Strata Page 1 2 3  
 

    Community Forums: Home    CafePress Community Forums  Hop To Forum Categories  General Help & Sharing  Hop To Forums  Shop Customization & HTML    Merging two shops' sidebars