kazack Posted June 8, 2014 Share Posted June 8, 2014 This thread is being started for support of the Product Image Verify contribution that I created for Osc 2.3.x.x. I had a few e-mails about this as I thought it was straight forward and didn't think that it needed support, and also had some feature requests as well. So now here it is, if you have problems, questions, feature requests or just want to talk about this contribution please feel free to post away. This contribution can be found at: http://addons.oscommerce.com/info/8210 There is an update as I wrote this mode in 2011, didn't think it was that long ago, but walked through both a manual install and a drag n drop install on a new virgin install of OSC 2.3.4 and come to find out somehow when I packaged up the files I wasn't using the 2.3.x.x file, so the css and everything on the admin side got messed up and distorted. A brief description of this contribution: I run several OSC 2.2 sites (in the process of converting at the last minute to 2.3.x.x, seems like it will take forever as I have 100+ contributions installed) and most of the sites get a daily feed that is automatically imported into my different OSC sites. Well most of us know that the feeds we sometimes get from providers do not contain all the proper information, and especially the images. When you have a site with a few products no problem, but when you have hundreds to thousands of products it is almost impossible to go through each and every product to check if an image was downloaded or not. What this contribution does for a virgin install is go through every product and selects the image if one is available and checks the file system to see if one actually exists. If the database does not have an image associated with the product, or the image is not found in the file system then it will list the relevant information and tell you what the issue is with the image. Now you can see at a glance if all your products have the expecting images in the database and in the file system. If there are no issues with images then nothin will be displayed, as to why waste resources. Being this is the first post I am also going to include a screenshot here for those of you that came across this thread but did not actually download the contribution package. Thanks in advance for any posts about this contribution as all feedback is welcomed. Shawn Mulligan Quote Link to comment Share on other sites More sharing options...
kazack Posted June 15, 2014 Author Share Posted June 15, 2014 It has come to my attention that not all users running php 5.x.x have access to the function: file_put_contents(). After doing some reading some hosting providers are blocking this function. I uploaded an updated full package for 2.3.4 to reflect the fix for this. The error message being seen is something similar to: Fatal error: Call to undefined function: file_put_contents() in /home/domain/public_html/catalog/admin/image_verify.php on line 146 I corrected the issue by adding a new block of code the /catalog/admin/image_verify.php and this was the only file modified. If you do not want to download the whole package again you can just add the following lines of code: if(!function_exists('file_put_contents')) { function file_put_contents($filename, $data, $file_append = false) { $fp = fopen($filename, (!$file_append ? 'w+' : 'a+')); if(!$fp) { trigger_error('file_put_contents cannot write in file.', E_USER_ERROR); return; } fputs($fp, $data); fclose($fp); } } Any questions or issues please feel free to ask. Thanks, Shawn Mulligan Quote Link to comment Share on other sites More sharing options...
meos_webmaster Posted December 17, 2014 Share Posted December 17, 2014 Hi kazack! I installed this add-on on a osCommerce 2.3.4 install. I have tried the installation several times now and have the same results. The first thing I notice was the icons were not showing on the admin page next to the products. This was fixed by changing the <? on line 155 of image_verify.php to <?php When I click on a product I never get the product name in the box on the right hand side with the edit and delete button as seen in the screenshot included with the Image Verifier package. Notice the Adoration product and the other 2 language versions that are highlighted. I have tried both version of the admin/image_verify.php script both with the same results. What versions of PHP you have tried it with? My test server is running PHP 5.5.9 I am also wondering if you have tested it with multiple languages? We are running 3 languages. I notice that 3 items will get highlighted, one for each language, when I click on one product. Any help you can give in getting this setup correctly would be appreciated! Frederick Quote Link to comment Share on other sites More sharing options...
Guest Posted February 27, 2015 Share Posted February 27, 2015 Update for image.verify.php uploaded http://addons.oscommerce.com/info/8210 Fix for missing Edit and Delete Buttons only Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.