Zen Cart Logo
Forums / General Questions / One Site / Two Stores ??? How? - A "store within a store"

One Site / Two Stores ??? How? - A "store within a store"

Locked

Views: 3,370

Results 21 to 25 of 25
This thread is locked. New replies are disabled.
12 Sep 2007, 5:52 PM
#21
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

One Site / Two Stores ??? How? - A "store within a store"

In /includes/templates/your_template/sideboxes/tpl_categories.php, find```php
for ($i=0;$i<sizeof($box_categories_array);$i++) {
switch(true) {

and add a line to get
```php
  $iteration_top = 0;//show comics cat tree - initialize - above for loop
  for ($i=0;$i<sizeof($box_categories_array);$i++) {
    switch(true) {

Find```php
if (zen_get_product_types_to_category($box_categories_array[$i]['path']) == 3 or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1)) {
// skip if this is for the document box (==3)
} else {

```php
    $iteration_top = str_replace("cPath=","",str_replace(strchr($box_categories_array[$i]['path'],"_"),"",$box_categories_array[$i]['path'])); //show comics cat tree - set = this iteration's topcat
    if (($iteration_top != '23' and isset($cPath) and str_replace(strchr($cPath,"_"),"",$cPath) == '23')/*replace 23 with comics cPath*/ or (zen_get_product_types_to_category($box_categories_array[$i]['path']) == 3 or ($box_categories_array[$i]['top'] != 'true' and SHOW_CATEGORIES_SUBCATEGORIES_ALWAYS != 1))) {
      // skip if this is for the document box (==3) OR (show comics cat tree) if not in/under comics top cat and comics is current top cat
    } else {  

Replace "23" in two places with your comics category cPath.

I haven't tested this version, so let me know how it works.

12 Sep 2007, 7:55 PM
#22
lilleypadgifts avatar

lilleypadgifts

Totally Zenned

Join Date:
Jan 2007
Location:
Southern California
Posts:
550
Plugin Contributions:
0

Re: One Site / Two Stores ??? How? - A "store within a store"

Hmmmmm..... I could live with it that way I think.
I just want to make sure I understand exactly tho....

My current Home Page Category List
**1984 LA Olympic Pins->** (55)
**Beanie Baby Cards**
**Comics->** (114)
**Craft Supplies**
**Lucy & Me Bears**
**Neck Coolers** (1)
**Postcards**
**Salt & Pepper Shakers** (1)

My current Category List once you've clicked on Comics
**1984 LA Olympic Pins->** (55)
**Beanie Baby Cards**
**Comics->** (114)
Comico (1)
DC (24)
First (1)
Image (47)
Marvel (15)
Maximum Press (5)
Nemesis (1)
Topps (18)
Valiant (2)
**Craft Supplies**
**Lucy & Me Bears**
**Neck Coolers** (1)
**Postcards**
**Salt & Pepper Shakers** (1)

What I would like to see when you click on Comics
**Comics->** (114)
Comico (1)
DC (24)
First (1)
Image (47)
Marvel (15)
Maximum Press (5)
Nemesis (1)
Topps (18)
Valiant (2)

Are we on the same page here? I think we are. So what you're saying is, if I use that code, all of my Home Page Cats would work that way. For example, if I click from my home page on Olympic Pins, then it would show
**1984 LA Olympic Pins->** (55)
Series 1 (29)
Series 2 (17)
Series 3 (9)

and would not show the other cats as well. So it would work for ALL categories not just the one Comic one...is that right?

Actually, since we have SO MUCH STUFF and will be adding categories until Christmas 2099 ... maybe that is a good thing. What looks crowded and overwhelming on the home page will instead become more item specific to view. All of what we sell will still be accessable thru the home page, so they can see right off the bat what we have to offer, but maybe they won't be overwhelmed by it when they choose the one topic they want to look into.
Make sense?
Am I understanding it right?:blush:

Ok, just posted this and THEN saw that you had posted the info above. Before I try anything, can you just let me know if I'm understanding it all from what I have in this post above? I might just want to stick with your original code.
Thanks so much!

12 Sep 2007, 8:20 PM
#23
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: One Site / Two Stores ??? How? - A "store within a store"

It sounds like you are understanding the code correctly. Either way, I'm interested in seeing it in action.

12 Sep 2007, 8:39 PM
#24
lilleypadgifts avatar

lilleypadgifts

Totally Zenned

Join Date:
Jan 2007
Location:
Southern California
Posts:
550
Plugin Contributions:
0

Re: One Site / Two Stores ??? How? - A "store within a store"

I LOVE YOU !!! :hug:

You just saved me a ton of time trying to set up another store just so that things wouldn't look so crowded in that cat box and people would just give up looking!!

Check it out :
www.lilleypadgifts.com

I used the code from the before mentioned thread so that all of my categories work that way. Looks much cleaner, I think, and less confusing because of our wide variety of things.

Tell me what you think :smile:

13 Sep 2007, 6:49 AM
#25
lilleypadgifts avatar

lilleypadgifts

Totally Zenned

Join Date:
Jan 2007
Location:
Southern California
Posts:
550
Plugin Contributions:
0

Re: One Site / Two Stores ??? How? - A "store within a store"

I'm running into another problem...well, more of a hassle really.

I'm listing them under several different cats now since I've got the space. Once someone clicks on Comics, then they will click on 1 of the following By Age, By Publisher or By Title.
My problem is that when I'm linking items from within a sub- or sub-sub cat, after I add it I get taken back to the top most level.
For example :

I'm in Comics / By Publisher / DC
I click to COPY Action Comic #700
I choose to link a copy under the Comics/ By Title / A
After I saves, it takes me back to the Home Page and I have to click on *Comics / By Publisher / DC *all over again. Its really a hassle. I'm going to try and use the multiple linking option tomorrow when I've had more sleep, but maybe save some time, but I would still like to fix this if there is someplace to fix it :dontgetit.
Thanks!