Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New product pics broken on secondary website (linked db)


coolfly027

Recommended Posts

Posted

Hi. Kind of an odd problem...I have 2 OSC shops linked to the same db on the same shared hosting account:

 

public html/site 1(root)/ site 2 (addon domain)

 

Everything is working fine BUT I just noticed if I add a product through the admin on Site 1, the product and all product info WILL show up on both sites, but no product pics on site 2 (catalog or admin side). If I add the product through the site 2 admin, everything is fine on both sites.

 

Site 1 was my original shop before I expanded to another city..please note that all original items that were already added before I installed site 2 DO show up with pics on site 2.

 

Sorry if this is a little confusing, I can give more info if needed..

 

Currently on 2.3.1 (both sites)...actually I realized this problem because I was about to do updates but wanted to do a thorough site check before I started.

 

Thanks!

 

edit: sorry forgot to mention, I do have a handfull of mods, one of them being for multiple product pics with fancy lightbox...

Posted

Sorry to double post, but I kinda sorta figured out what's going on here, but still can use some help. When I originally installed Site 2 I used all the folders/files (including pic folders) of site 1, then changed the configs for site2..this is why the original item pics are viewable..because they exist in the site 2 image folder. The stores are identical except for the main store logo. So I guess I need to change the config on site 2 to point to the image folders (paths) of site 1. The only thing that doesn't make sense to me is why when I add an item through Admin Site 2, they do show up in Site 1??

Posted

The only thing that doesn't make sense to me is why when I add an item through Admin Site 2, they do show up in Site 1??

 

Hey Chris,

 

Since both sites are sharing the same database they are sharing the same products.

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Posted

so site1 your adding the images to the folder on site1 but they arent local to site2....Sounds like you might just need to ftp to site2 and upload to the same folder structure....OR

 

in your includes/configure.php file on site2 where you see image category you could just change that to your full url to images on site1. Which isnt a bad idea at all since it would be able to load your page faster since it can pull from more urls quicker than all local.

Posted

I have a similar setup working.

I have main site as e.g. www.site-a.com

and second site as www.site-b.com

 

on the file level, i have my main domain as in the web root directory

I choose to setup a second directory at the same level, and pointed the site-b dns record to that directory.

I only have the admin code installed in the main site-a.com environments admin directory.

 

I have an extra dns record to fetch the images for site-b from the site-a images directory

so http://img.site-b.com points to filepath_to_site-a_catalog/images directory

 

Since I have on-the-fly thumbnailer, I needed to make sure when no thum bexists, they also get generated.

In order to have this working on my site, I needed to abstract the image host, from the images directory.

so the includes/configure has this section

 define('DIR_WS_IMAGE_HOST', 'http://img.site-b.com/');
 define('DIR_WS_IMAGE_DIR','images/');
 define('DIR_WS_IMAGES', DIR_WS_IMAGE_HOST . DIR_WS_IMAGE_DIR);

I'm not sure if this is needed in every situation, but just a quick heads up, it is something you might run into

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Archived

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

×
×
  • Create New...