I’ve had a live site for a couple of years. For purposes of my question, the url to my live site is “mylivesite.com”. I need to make major changes to the site, so I recently set up a local copy on my laptop. For purposes of my question, the url to my local site is “mylocalsite.com”. Both sites are running on version 1.5.1.
When I initially set up my products on the live site, in the Products Description box I entered absolute addresses to my images. For example: src=”http://www.mylivesite.com/images/att...usa-union.jpg”
The problem with absolute addresses is that I cannot make changes on my local site and test those changes before uploading them to my live site, so I want to convert all references from absolute to relative. And I need the reference to work on both my local and live sites.
I’ve been experimenting with just one of the products on my local site – in my admin I edited the Products Description box and changed the above path to: src="../images/attributes_universal/usa-union.jpg" When I preview the change in my admin, everything looks correct. When I access the product in any browser however, I get a rectangle where the image should be.
My understanding is that the paths that Zen Cart uses to access images (or other files for that matter) are defined in the configure.php files, so I’m thinking that may be where my problem is.
On my live site includes\configure.php includes the following definitions (these are the same as in the admin\includes\configure.php file):
Define(‘HTTP_SERVER’, ‘http://mylivesite.com’);
Define(‘HTTPS_SERVER’, ‘https://mylivesite.com’);
Define(‘ENABLE_SSL’, ‘true’);
Define(‘DIR_WS_CATALOG’, ‘/’);
Define(‘DIR_WS_IMAGES’, ‘images/’);
Define(‘DIR_FS_CATALOG’, ‘/home/accountname/public_html/’); (NOTE accountname is my accountname on my Host Gator server)
On my local site includes\configure.php has the following definitions:
Define(‘HTTP_SERVER’, ‘http://mylocalsite.com’);
Define(‘HTTPS_SERVER’, ‘https://mylocalsite.com’);
Define(‘ENABLE_SSL’, ‘false’);
Define(‘DIR_WS_CATALOG’, ‘/store/’);
Define(‘DIR_WS_IMAGES’, ‘images/’);
Define(‘DIR_FS_CATALOG’, ‘C:/xampp/htdocs/store/’);
I’m not sure if this is enough information to help diagnose my problem, or if any of the information I’ve included is relevant, but any help pointing me in the right direction is greatly appreciated.


Reply With Quote

