bosanci28 Posted October 8, 2015 Share Posted October 8, 2015 While back i transferred from v4 to v6, and it did screw my stock , i had items out of stock and after update people where buying some stuff that was in stock,but i did not have them...Now i notice that a lot of my stuff is listed as "new" items, witch i do not sell new items, un-less i specify in the description.So my question is , how do i remove the "new" from here:and just let it all be as "used" all the time when i list something? Thanks for help! Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 9, 2015 Share Posted October 9, 2015 In the admin skin template products.index.php, near line 161:Find: <select name="condition" id="condition" class="textbox" type="text"> <option value="new" {if $PRODUCT.condition == 'new'}selected="selected"{/if}>{$LANG.catalogue.condition_new}</option> <option value="used" {if $PRODUCT.condition == 'used'}selected="selected"{/if}>{$LANG.catalogue.condition_used}</option> <option value="refurbished" {if $PRODUCT.condition == 'refurbished'}selected="selected"{/if}>{$LANG.catalogue.condition_refurbished}</option> </select> Change to: <select name="condition" id="condition" class="textbox" type="text"> <option value="used" {if $PRODUCT.condition == 'used'}selected="selected"{/if}>{$LANG.catalogue.condition_used}</option> <option value="new" {if $PRODUCT.condition == 'new'}selected="selected"{/if}>{$LANG.catalogue.condition_new}</option> <option value="refurbished" {if $PRODUCT.condition == 'refurbished'}selected="selected"{/if}>{$LANG.catalogue.condition_refurbished}</option> </select> In a <select> form control, the order of the choices coded will be that order shown, and the first choice in the list will be the default shown, unless a "selected" attribute is used.So, by switching the order of the choices so that 'Used' is first in the list, it will be the default choice selected.To change all of your existing inventory from "new" to "used", will require a SQL statement executed directly on the database. Quote Link to comment Share on other sites More sharing options...
bosanci28 Posted October 9, 2015 Author Share Posted October 9, 2015 Hello Bsmither ,Thank you for replying! and the above edit!Now regarding the "To change all of your existing inventory from "new" to "used", will require a SQL statement executed directly on the database."Do you think that can help? if will send the database over to you? really appreciated.I was searching maybe to export the store csv file and replace the "new" with "used" and import it back,but could not find how to do it... Thanks, Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 9, 2015 Share Posted October 9, 2015 You can do it in CubeCart, but the better way is to do it using a tool that your hosting control panel makes available to you - phpMyAdmin.I can't give you step-by-step instructions on how to execute a query in phpMyAdmin, but that program is really straightforward. I just don't know phpMyAdmin that well.The query you need is:UPDATE CubeCart_inventory SET `condition` = 'used';Two things to watch for:1. You may have a table prefix, so be sure to use it.2. Your database may be configured to not allow for uncontrolled updates.A table prefix may be cc6_CubeCart_inventory.If disallowed to make uncontrolled updates, you will need to add WHERE 1 just ahead of the semi-colon at the end of the statement.In CubeCart's admin, Maintenance, Query Database (Warning!), you can enter the query here but you will not get any feedback regarding success or failure.. Quote Link to comment Share on other sites More sharing options...
bosanci28 Posted October 9, 2015 Author Share Posted October 9, 2015 (edited) I have database like this:And yes i have it as "CubeCart_inventory"Will have to do some backups , just in case and then try to run that query. Appreciated! Edited October 9, 2015 by bosanci28 Quote Link to comment Share on other sites More sharing options...
bosanci28 Posted October 9, 2015 Author Share Posted October 9, 2015 Looks like that query worked nice, it did change all from new to used. Appreciate your help! Thank you for your time!. 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.