Dirty Butter Posted January 17, 2016 Share Posted January 17, 2016 (edited) I'm using a piece of code added to products.index.php that BSMITHER helped me with many versions ago. It adds the master_image to the image tab of the Admin Product Listing. <!-- MY MASTER IMAGE --> <div class="master_image"> {$LANG.catalogue.image_main}:<br><br> <img src="{$PRODUCT.master_image}"> <br><br> {$PRODUCT.master_image} <!-- END MY MASTER IMAGE --> My uploaded images are 600, which is large in the skin config.xml.But the "MASTER" image is 200px, and the image name is always in the formatxxx/images/cache/XLDalmatianDogComfy.200.JPGIs there something I can add to config.xml, so the master_image will be the original sharp 600? Edited January 18, 2016 by Dirty Butter Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 17, 2016 Share Posted January 17, 2016 What version of CC6 did you implement this, and what version are running on now?I ask because this "master_image" is incorporated in CC608 (I didn't check any earlier).In /admin/sources/products.index.inc.php, near line 1180, there is:$master_image = isset($_GET['product_id']) ? $GLOBALS['gui']->getProductImage((int)$_GET['product_id']) : ''; $result[0]['master_image'] = !empty($master_image) ? $master_image : 'images/general/px.gif'; GUI->getProductImage() defaults to fetching the "small" size, which apparently is 200px on the longest side.We can duplicate this to get the "large" size (600px?):Add after: $large_image = isset($_GET['product_id']) ? $GLOBALS['gui']->getProductImage((int)$_GET['product_id'], "large") : ''; $result[0]['large_image'] = !empty($large_image) ? $large_image : 'images/general/px.gif'; Then, in the template, change {$PRODUCT.master_image} to {$PRODUCT.large_image}.Now, if XLDalmatianDogComfy.600.JPG isn't crisp and sharp enough, we can try to add the URL that points to the actual source image.And I hope you have enough screen real estate to show a 600px image. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted January 18, 2016 Author Share Posted January 18, 2016 I have copies of that Master Image code going all the way back to 6.0.2 - didn't look further back. And I really remember you helping me with it originally. CC must have picked up the code.Anyway, the source images are 600px wide, so your new code does give a crisp image with the detail I often need to easily distinguish one plush from another similar one.As for screen real estate, I moved the whole Master Image code section in products.index.php to ABOVE the Filemanager box. That way it fits well on my Kindle in landscape and certainly not a problem on my computer.THANK YOU! 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.