Dirty Butter Posted March 7, 2017 Share Posted March 7, 2017 Looking at Foundation 6.1.5 - how is the "if there is no image chosen then show this No Image placeholder image instead" coded? Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 7, 2017 Share Posted March 7, 2017 (edited) It is not coded in the skin. In CubeCart's GUI class, getProductImage() function, if there are images associated with a product, then ultimately a URL for the main image of the requested size is generated and given to the template. If no images are associated with the product, the skin's default image (provided with the skin) is used to ultimately generate a URL for the image of the requested size and is given to the template. In CubeCart's Catalogue class, imagePath() function, is where the source image (the skin's default image if specified) is resized and saved to the /images/cache/ folder, if necessary, and the actual URL is formulated. Edited March 7, 2017 by bsmither Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 7, 2017 Author Share Posted March 7, 2017 Thanks for that - I've double checked my gui and catalogue class code vs stock between 6.1.5 and a recent 6.1.6 commit and don't see anything causing a change in the default image display. In the 6.1.6 commit I see the placeholder image on the homepage as expected, but when I open that product listing I see the alt text for the image only - NO image at all. With so many changes to images in beta 6.1.6 I don't know where to look for the problem. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 7, 2017 Share Posted March 7, 2017 (edited) Showing the ALT text means the image was not deliverable: either a 404 or a badly formatted URL. Examining the HTML source within the browser will show this (or use Firebug). Is this site viewable to the public? Edited March 7, 2017 by bsmither Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 7, 2017 Author Share Posted March 7, 2017 No. the test site is password protected. I'll check with Firebug and see what i can find there. <a class="open-clearing" href="#" data-thumb-index="0"> <img id="img-preview" src="" alt="2005 Old Navy 10 inch Seated Shaggy Chamois Brown Bear"> </a> Nothing at all about the homepage image: <a class="th" href="https://dirtybutter.com/plushtest/2005-old-navy-10-inch-seated-shaggy-chamois-brown-bear.html" title="2005 Old Navy 10 inch Seated Shaggy Chamois Brown Bear"> <img src="https://dirtybutter.com/plushtest/images/cache/skins/blue/images/noimage.200.png" alt="2005 Old Navy 10 inch Seated Shaggy Chamois Brown Bear"> </a> Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 7, 2017 Author Share Posted March 7, 2017 I have now upgraded https://dirtybutterestates.com to the same install I have on the hidden test site. I've taken the images off of one front page item, so you can see what it does. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 8, 2017 Share Posted March 8, 2017 So, it seems that the core code is not creating a NoImage variant for the 'large' size. It could be because your "brown" skin's config.xml <images> declarations specify: <image reference="large" maximum="600" quality="80" default="" /><!-- Doesnt need a default --> So, I'm thinking that your "brown" skin has been specially created to show a "large" size image on the content.product.php template. Try editing the config.xml file to: <image reference="large" maximum="600" quality="80" default="noimage.png" /> Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 8, 2017 Author Share Posted March 8, 2017 Makes sense!!! Will fix tomorrow, as off computer for the night. Thank you! Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 8, 2017 Author Share Posted March 8, 2017 Worked like a charm! I don't normally pay attention to the skin config in a file compare - since I know it's different from stock. Lesson learned and will be more careful when ignoring file differences. 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.