PDMP Webmaster Posted November 11, 2010 Share Posted November 11, 2010 Hi all, I'm not sure if this would be the right forum to post to, but here goes. When adding new products, my customer wants the 'Include in latest products in homepage?' option to default to 'No'. Anyone know how to go about doing this? -Josh Quote Link to comment Share on other sites More sharing options...
leeofaccy Posted November 13, 2010 Share Posted November 13, 2010 Hi Josh Open admin > sources > products > index.inc.php and find this block of code <select name="showFeatured" class="textbox"> <option value="1" <?php if(isset($results[0]['showFeatured']) && $results[0]['showFeatured']==1) echo 'selected="selected"'; ?>><?php echo $lang['admin_common']['yes'];?></option> <option value="0" <?php if(isset($results[0]['showFeatured']) && $results[0]['showFeatured']==0) echo 'selected="selected"'; ?>><?php echo $lang['admin_common']['no'];?></option> </select> and change it to this <select name="showFeatured" class="textbox"> <option value="0" <?php if(isset($results[0]['showFeatured']) && $results[0]['showFeatured']==0) echo 'selected="selected"'; ?>><?php echo $lang['admin_common']['no'];?></option> <option value="1" <?php if(isset($results[0]['showFeatured']) && $results[0]['showFeatured']==1) echo 'selected="selected"'; ?>><?php echo $lang['admin_common']['yes'];?></option> </select> Now when you add a new product, the default should now be 'No' Hope that helps Lee Quote Link to comment Share on other sites More sharing options...
PDMP Webmaster Posted November 15, 2010 Author Share Posted November 15, 2010 Lee, Good to hear from you again. Unfortunately, I haven't been able to get that to work. I tried copying and pasting your new text to replace those lines, but all that did was cause there to be no options under "Include in latest prods". I tried that twice. Then I tried flipping the two main lines' position, i.e. I cut the bottom one and pasted it over the top one, but that didn't work either. While it showed "No" by default, clicking "Yes" produced no effect. Then I tried editing the two lines so that wherever they differed (i.e. if one line had a '1' while the other had a '0') I switched them out. That also showed "No" by default, but clicking "Yes" produced no effect. Now despite reverting back to my original, backed-up 'index.inc.php', the "Include in latest prods" dropdown only works for prods already entered into the store, and doesn't work for new ones. Any ideas on what's going on with CubeCart? -Josh Quote Link to comment Share on other sites More sharing options...
leeofaccy Posted November 16, 2010 Share Posted November 16, 2010 Hi Josh Try the same code, (Above) again. I have edited it, as I had missed a couple of things when I made the changes I have tested it myself and it seems fine, for existing products and new ones.. Lee Quote Link to comment Share on other sites More sharing options...
PDMP Webmaster Posted November 16, 2010 Author Share Posted November 16, 2010 Lee, I've said it before and I'll say it again: you are THE MAN!! I just figured out why it wasn't working for new products I was adding: I was forgetting to change the category from Test Category, and since I can't delete that thing I have it hidden, so of course when I changed it to Yes it didn't show up! Arrgh!!! By the way, are you a Commercial Contributor? I've put a request for a simple shipping mod at http://www.cubecartforums.org/index.php?showtopic=14255. Are you capable of that sort of programming? -Josh 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.