Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1 domain, 2 shops, 2 DB's - Category Box problem...


mc21repsol

Recommended Posts

Hi guys,

 

I try my best to find answers to any problems I encounter with osC, but this one's had me flummuxed for a couple of days now, and I'm hoping someone with a bigger brain than me (and there are a lot of you out there!) can tell me why the following is happening! :'(

 

Setup:

 

Shop 1:

 

www.my-domain.com/shop-1/

Database 1

 

Shop 2:

 

www.my-domain.com/shop-2/

Database 2

 

As shop-1 is fairly modified, I did the following...

 

First I created a new (empty) database, then copied all the files from /shop-1/ to /shop-2/. I then exported database 1 to a ZIP file, and imported it into the new database 2. I emptied all the contents of the newly populated database relating to products/product attributes/categories/customers/orders etc., and just kept the "bare bones" to save me the monotony of configuring the shipping, currencies, zones, etc. For all intent and purposes, shop-2 was completely empty. Finally, via "Easy Populate", I uploaded the products I required to the "new" shop.

 

shop-1 has 13 categories (2 of which are hidden with Sam's [spooks] "Hide Products & Categories V1" contribution. Approximatel 3400 items are visible, and 5400 are hidden.

shop-2 has 1 category... the 5400 items that I have hidden in shop-1.

 

This is were I get confused! Some who know me would say it doesn't take much, but this one really has me scratching my head, and has done for 2 days and a whole night (without sleep, literally!) now! :(

 

Scenario:

 

When I first call up www.my-domain.com/shop-2/ in a browser, all is fine, however if I refresh the page the categories box from shop-1 appears! Clicking any of the categories in the "phantom" box takes me to shop-1! :blink: :'(

 

[With the shop-1 categories box still displayed in shop-2, I can click an item in the "new products" box, and sometimes the shop-2 categories box will return. Also, sometimes I can get the shop-2 categories box back by refreshing (or hard-refreshing -- Ctrl+F5) the page... but not always. :angry:

 

Not wanting to state the obvious, but I have of course changed the configure.php files for shop-2 to point to database 2, and even made sure the password for it is different. I can't see for the life of me just how it can show the shop-1 categories box at will. :blink: :blink:

 

Admin side is fine. Nothing but the 5400 items in 1 category/61 sub categories!

 

Anyone have any ideas by any chance... please?

 

I wasn't sure if I was allowed to post the shop address, so erred on the side of caution!

 

Thanks,

 

Mr. Confused

A.K.A. Andy.

Link to comment
Share on other sites

When products from one shop appeear in another it means they are using the same cache.

 

In the admin of one of the shops set "Use cache" to false (save it) and see if the situation imporves.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

When products from one shop appeear in another it means they are using the same cache.

 

In the admin of one of the shops set "Use cache" to false (save it) and see if the situation imporves.

Hello Germ, and thank you for your reply.

 

My initial knee-jerk response is "spot on!"... but I will get back to you shortly once I've rummaged around for a while on a couple of different machines and browsers!

 

As it is though, it appears you've hit the nail on the head.

 

Thank you.

 

Andy.

Link to comment
Share on other sites

Well, that certainly seems to have done it Germ, thank you. :)

 

The next question is however, how can I use a cache on both shops? With 4000~5000+ items in each store, I would naturally like to cache the categories box to help keep the page load times down. Would it be a case of creating additional "tmp" folders (e.g. continue using /tmp/ for shop-1 and creating /tmp-2/ for shop-2 etc.?).

 

I don't have full control of the server, so if this sounds like a suitable approach, I would need to speak nicely to support to see if they will create any additional folders for me and give them the correct permissions as I believe the /tmp/ folder should reside outside of my www folder? Does this sound like the solution to you?

 

Again, thank you for your answer to my first question. I learnt something today, and feel all warm and fuzzy! :)

 

This is all a bit of a PITA actually! Personally I would like to put all the products in one store as shop-1 customers of course have to create a second account if they wish to purchase from the other range of products in shop-2. Until I can talk some sense into the man that pays the bills though, I have to do what I can do! :huh:

 

Mr. Notquiteso Confusedtonight

A.K.A. Andy.

Link to comment
Share on other sites

Make a local folder for your own private cache and point the cache to it in the admin.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Make a local folder for your own private cache and point the cache to it in the admin.

The admin control panel is accessed from multiple machines in multiple locations, so I am not sure that's an option. Also, how would that help store visitors with page load times?

 

Andy.

Link to comment
Share on other sites

The admin control panel is accessed from multiple machines in multiple locations, so I am not sure that's an option. Also, how would that help store visitors with page load times?

 

Andy.

That's got nothing to do with it.

 

You make a folder named tmp in the root of the store.

 

In the admin change the cache from /tmp/ to just tmp/

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

That's got nothing to do with it.

 

You make a folder named tmp in the root of the store.

 

In the admin change the cache from /tmp/ to just tmp/

Sorry, what I was thinking of was this post by The Big Boss himself, that advises the /tmp/ folder should reside outside the /public_html/ folder.

 

Doesn't /tmp/ store sessions as well as cache, or am I worrying about nothing?

 

Andy.

Link to comment
Share on other sites

Sessions aren't stored there if STORE_SESSIONS is set to MYSQL in the config file.

 

And that thread talks about "worst case scenario", meaning you have to give the folder 777 permissions.

 

You should NEVER have a folder with 777 permissions accessible from the web.

 

If you put it outside the the confines of the shop you just have to give it the "full path" in the admin.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

OK, I'm with you. The highest folder permission I ever set is 755... most are 444.

 

Sessions are set to MySQL.

 

So, I will see what results I can achieve with setting different "tmp" folders for each store.

 

Again, thank you for your help and suggestions.

 

Andy.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...