ok so I am currently experiencing a slight issue with adding some new products. i've uploaded them using easy populate 4 and when i go to look at the new items i get just a broken image icon and some text that appears to be a link, i click this link and it gives me a pop up saying this file is not available. Before I type anymore i must stress that These images are provided for the purpose of listing items via a supplier that has given me permission to use these and a the ability to create a product feed including image urls.
Upon diagnosing the issue with the aid of another zencart forum member in the following thread... https://www.zen-cart.com/showthread....p&goto=newpost
it was noticed that the url's had been inserted to the products image section in the database, however, sadly zen is setup to use pictures in the form of uploads that reside in the home/images folder so when it is trying to display these images it is infact replacing the https with /images so it is trying to load
Code:
crazygamer.uk/images/www.pictureserver.co.uk/image1.jpg
for the picture which results in no image being displayed.
After some searching in the forums i came across something that was wrote many years ago. 2006 i believe?
I'm not sure if this fix would still be valid for use on 1.57c using php 7.4 though. The "fix" comes in the form of a module, well it is a plugin contribution for download here listed for 1.38, that comprises of a license.txt and an "install.txt", its more of instructions rather than a module and not being a php expert and just a novice i have no way to tell if the php is still valid or deprecated, maybe perhaps there is an easier method available also as there is the downside of then having to go through my catalogue and adjust the paths for images i've uploaded myself for listings i've not made using easy populate with some 300 items before adding these that isn't a job i wish to undertake unless absolutly necessary. so the "fix" is provided quoted below. is there a better option and if not is this upto date? can anyone assist in getting these images to load correctly?
This is something that has been answered previously but that long ago that the answers no longer potentially work?
Code:
Module Name
============
External Product Images
Description
===========
Ported from OSC commerce script, author and specific contribution unknown.
This module is released for use with Zen Cart 1.3.8a 3/15/2010 by PRO-Webs.net
This release is considered beta, as while tested the testing is short at
1 week.
Version Date
============
Beta 1.0 3/15/2010
Author
======
Melanie Prough, PRO-Webs, Inc.
Report Bugs
===========
[email protected]
Installation
============
Step 1: Increase Data Image Field Characters:
In your Zen Cart admin, run the following SQL patch AFTER backing up your database.
ALTER TABLE `products` CHANGE `products_image` `products_image` VARCHAR( 150 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;
Step 2:
Open includes/configure.php
On line 36 after this
define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');
Add
// PRO-Webs Use External Images
define('DIR_EXT_HTTP', 'http://');
Step 3:
In all of these files find DIR_WS_IMAGES and replace with DIR_EXT_HTTP
includes/functions/functions_lookups.php
includes/modules/additional_images.php
includes/modules/also_purchased_products.php
includes/modules/attributes.php(Optional! Hand edit for attribute images)
includes/modules/featured_products.php
includes/modules/main_product_image.php
includes/modules/new_products.php
includes/modules/pages/popup_image/header_php.php
includes/modules/pages/shopping_cart/header_php.php
includes/modules/pages/specials/main_template_vars.php
includes/modules/product_listing.php
includes/modules/specials_index.php
includes/templates/your_template/popup_image_additional/tpl_main_page.php
includes/templates/template_default/sideboxes/tpl_featured.php
includes/templates/template_default/sideboxes/tpl_reviews_random.php
includes/templates/template_default/sideboxes/tpl_whats_new.php
includes/templates/template_default/templates/tpl_modules_products_all_listing.php
includes/templates/template_default/templates/tpl_modules_products_featured_listing.php
includes/templates/template_default/templates/tpl_modules_products_new_listing.php
includes/templates/template_default/templates/tpl_reviews_default.php
Module Use
==========
This module will now expect you to add a filename path for your product images.
In your product data entry you will add images in the
"Or, select an existing image file from server, filename:" field. These images
will contain the full path to the image, less the http://.
For example: domain.com/images/1254785.jpg
Note that this module does not disallow the use of your own images, but they
now need to be added in the same manner.
For example: your_domain.com/images/1254785.jpg
The image uploader, while unharmed will no longer add a properly formatted
image reference for your products.
i'm sure this is a problem many have or will have with the upgrade of zen to a new version and php change so it would be great to not only solve this for my site but give a working solution to other zencart site owners :)
Bookmarks