jahwise Posted May 30, 2003 Posted May 30, 2003 Greetings, I need help figuring out how i am going to get all these imageless products out of the 45,000 in my catalog to not show up as a broken image links in my OSC shopping cart.... there has got to be some way to make this happen without me having to go through and write down every single product that is imageless and then going back into the CSV file to blank out the image name...? (so it will default to the no_image.gif ---someone? anyone? is there anything in the contributions for this kinda thing? thanks in advance, taylor
Ajeh Posted May 30, 2003 Posted May 30, 2003 You could just change the setting in Admin that Images are not required and you get nothing. If you have the names in the products table already and are missing the images, you can add to the /includes/functions/html_ouput.php a peice of code I picked up in one of the messages on the forum, and forget who posted it ... that I am using in The Shoppe Enhancement Controller. Modify the top of the tep_image function to read: //// // The HTML image wrapper function function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') { // BOF: WebMakers.com Added: Shoppe Enhancement Controller // if no image found use default image if (SHOW_MISSING_IMAGE_ON=='1') { if (!is_file($src)) { $src = (DIR_WS_IMAGES . SHOW_MISSING_IMAGE_FILE); } // replace missing images with default } // EOF: WebMakers.com Added: Shoppe Enhancement Controller if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) { return false; } I have a define('SHOW_MISSING_IMAGE_ON','1'); setup to turn this on. Then I have a define('SHOW_MISSING_IMAGE_FILE','no_picture.gif'); NOTE: this means any image that is missing shows the no_picture.gif It's a good way to find out if you are missing images anywhere that you have defined as well.
jahwise Posted May 30, 2003 Author Posted May 30, 2003 Thanks so much, that worked...http://www.loopwise.com now also, what about having those products that have images show up in order first in the categories...is that possible somehow? like to give priority listing to the images with products? thanks, -taylor
jahwise Posted May 30, 2003 Author Posted May 30, 2003 can anyone think of a script which would automatically turn off products with no images associated with them? i have over 45,000 and i want to make sure those imageless products just dont show up... -taylor
Ajeh Posted May 30, 2003 Posted May 30, 2003 Is the field products_image blank on those files? Or are the image files missing and the products_image contains the name of the missing image?
jahwise Posted May 30, 2003 Author Posted May 30, 2003 actually figured it out linda...there was a script which did that, but i have another question for you...can you think of a script which assign priority listing to the image products and put the image -less products towards the back of the results? -taylor http://www.loopwise.com
Ajeh Posted May 30, 2003 Posted May 30, 2003 That is why I asked the question ... Is your products_image field blank or does it contain the name of a file that is missing from the server? Do you have any type of indicator that these products are not available?
jahwise Posted May 30, 2003 Author Posted May 30, 2003 it contains the name of a file that is missing from the server... -taylor
jahwise Posted May 30, 2003 Author Posted May 30, 2003 WHAT ABOUT THIS: can anyone think of a script that would search through my 45,000 plus products and automatically turn those products which dont have images OFF and unlist them in the shopping cart ? (they have the image names in the excel, but the images themselves are not uploaded yet) This would save me an immense amount of time... -taylor
Ajeh Posted May 30, 2003 Posted May 30, 2003 It could be written to test for the image file and update the products table.
Wisha Posted May 9, 2005 Posted May 9, 2005 You could just change the setting in Admin that Images are not required and you get nothing.If you have the names in the products table already and are missing the images, you can add to the /includes/functions/html_ouput.php a peice of code I picked up in one of the messages on the forum, and forget who posted it ... that I am using in The Shoppe Enhancement Controller. Modify the top of the tep_image function to read: //// // The HTML image wrapper function ?function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') { // BOF: WebMakers.com Added: Shoppe Enhancement Controller ? ?// if no image found use default image ? ?if (SHOW_MISSING_IMAGE_ON=='1') { ? ? ?if (!is_file($src)) { ? ? ? ?$src = (DIR_WS_IMAGES . SHOW_MISSING_IMAGE_FILE); ? ? ?} // replace missing images with default ? ?} // EOF: WebMakers.com Added: Shoppe Enhancement Controller ? ?if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) { ? ? ?return false; ? ?} I have a define('SHOW_MISSING_IMAGE_ON','1'); setup to turn this on. Then I have a define('SHOW_MISSING_IMAGE_FILE','no_picture.gif'); NOTE: this means any image that is missing shows the no_picture.gif It's a good way to find out if you are missing images anywhere that you have defined as well. <{POST_SNAPBACK}> Hi all, if someone could tell me in which file to write the above defines that would be awesome! Thanks, Will.
Winterchild Posted May 9, 2005 Posted May 9, 2005 read the post: includes/functions/html_ouput.php Forum search Contributions search Documentation search (note: docs being adapted for MS3, may be different for MS2) 3 tips for better forum searching Want to post? Read this first: osCommerce for dummies Topic name etiquette Basics: Basics for design Right syntax to use near '-20, 20' Cannot re-assign $this Parse error
Winterchild Posted May 9, 2005 Posted May 9, 2005 Try english.php in the language file (or any other language for english) Forum search Contributions search Documentation search (note: docs being adapted for MS3, may be different for MS2) 3 tips for better forum searching Want to post? Read this first: osCommerce for dummies Topic name etiquette Basics: Basics for design Right syntax to use near '-20, 20' Cannot re-assign $this Parse error
Recommended Posts
Archived
This topic is now archived and is closed to further replies.