Jump to content

Incl in latest prod - default to No?


Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...