Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Two shops on one server - Categories sometimes get swapped around


gregp

Recommended Posts

Hi,

 

My original installation of osCommerce is at www.coffeetamper.com.au/shop/. I now have a second online store residing on the same server but with a different domain name www.thingscoffee.com.au which I set up by cloning my existing shop and changing the database connection details.

 

The content of each shop remains completely separate as you'd expect since they're running two different databases, except 'sometimes' the Categories and Manufacturers box on one of the sites is the one from the other site! Everything else is OK, just Categories and Manufacturers. Initially I thought this was a caching issue on the PC I installed the new shop with, but I've tried it on a different PC and noticed the same thing. The most damning finding was I installed Opera for the first time on a separate PC, and having never visited thingscoffee.com.au with that browser I got its menu when visiting coffeetamper. The frustration of course is that it's not consistent, however ultimately I need it to perform properly for the customer otherwise they're going to get waylaid. Refresh, shift+refresh doesn't help; clearing Opera's cache and refreshing had an immediate benefit but as soon as I went to a different page I got the wrong menu back. Likewise when I have a faulty menu on the front page but click on one of the products (which are the correct products) the menu reverts to the correct one.

 

One other interesting detail is, when things is displaying coffeetamper's menu, if I go into coffeetamper's admin panel and edit one of the category headings, as soon as I save those changes and refresh the things site it switches to the correct menu. I've had the fault just now in Firefox with coffeetamper displaying things' menu, but when I opened the sites in IE and Opera they were each displaying the correct menus!

 

There's nothing hard-coded into the categories.php file that would force it to use one particular site. I'm tending to think it's a caching issue but am not really sure.

 

I've got a movie of this at http://www.coffeetamper.com.au/external-co...things_skin.swf

 

Any help in tracking this down would be greatly appreciated!

 

Thanks,

Greg

Link to comment
Share on other sites

Problem solved. Caching was turned on on both installations so the categories and manufacturers lists were getting cached. Clearing the cache through admin and refreshing one site magically made its menu correct and the other's incorrect. The giveaway was in includes/column_left.php:

 

 

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_categories_box();

} else {

include(DIR_WS_BOXES . 'categories.php');

}

 

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_manufacturers_box();

} else {

include(DIR_WS_BOXES . 'manufacturers.php');

}

 

Cache turned off on low-traffic site, problem solvered.

Greg

Link to comment
Share on other sites

Problem solved. Caching was turned on on both installations so the categories and manufacturers lists were getting cached. Clearing the cache through admin and refreshing one site magically made its menu correct and the other's incorrect. The giveaway was in includes/column_left.php:

 

 

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_categories_box();

} else {

include(DIR_WS_BOXES . 'categories.php');

}

 

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_manufacturers_box();

} else {

include(DIR_WS_BOXES . 'manufacturers.php');

}

 

Cache turned off on low-traffic site, problem solvered.

Greg

 

I had the same problem. I HIGHLY recommend using caching. All you have to do is make the caching directory different for each store.

 

Just create the directory and then set it in the store under "Configuration / Cache / Cache Directory"

Don't forget to also change "Configuration / Logging / Log Destination" and "Configuration / Sessions / Session Directory"

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...