Guest Posted February 27, 2007 Share Posted February 27, 2007 Hi Does anyone know how to set the default value of products status to 1 so that you dont have to change it when adding or editing a product? I have found the checkbox statement in admin/catalog.php but dont know how to change wich one is marked as default. Link to comment Share on other sites More sharing options...
Velveeta Posted February 27, 2007 Share Posted February 27, 2007 HiDoes anyone know how to set the default value of products status to 1 so that you dont have to change it when adding or editing a product? I have found the checkbox statement in admin/catalog.php but dont know how to change wich one is marked as default. You can change the default at the database level, using phpmyadmin or whatever you have to access it with... Just change the products_status field in the products table to default to 1 if it's not already... If it is already, then you'll need to look at the case statement in admin/categories.php for new_product, which is where products are added or updated, and make sure that it's sending the value obtained from the product's data page, where it's got the In Stock/Out of Stock radio toggle button... If you want to change the default of that button so you don't have to remember to set it when you add a product, you can do that further down in categories.php where it constructs that part of the form, just set In Stock's value to 'checked'... Richard. Richard Lindsey Link to comment Share on other sites More sharing options...
Guest Posted February 27, 2007 Share Posted February 27, 2007 Hi Adding 'checked' worked. I had already tried using default 1 in database, but it was overwritten by the value from the default checked value that was 0 so I always got 0 if I didnt switch on the categories page. But now it workes. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.