On the new product form in Admin I would like to set the default quantity from from 0 to 1. All my products are a quantity of 1. I know the file I need to edit but not sure which line of code to change.
On the new product form in Admin I would like to set the default quantity from from 0 to 1. All my products are a quantity of 1. I know the file I need to edit but not sure which line of code to change.
There is no override file for this but if you edit the file:
/admin/includes/modules/product/collect_info.php
any default settings are applied at the beginning:
You could change this to read 1:PHP Code:
$parameters = array('products_name' => '',
'products_description' => '',
'products_url' => '',
'products_id' => '',
'products_quantity' => '',
'products_model' => '',
'products_image' => '',
'products_price' => '',
'products_virtual' => DEFAULT_PRODUCT_PRODUCTS_VIRTUAL,
'products_weight' => '',
'products_date_added' => '',
'products_last_modified' => '',
'products_date_available' => '',
'products_status' => '',
'products_tax_class_id' => DEFAULT_PRODUCT_TAX_CLASS_ID,
'manufacturers_id' => '',
'products_quantity_order_min' => '',
'products_quantity_order_units' => '',
'products_priced_by_attribute' => '',
'product_is_free' => '',
'product_is_call' => '',
'products_quantity_mixed' => '',
'product_is_always_free_shipping' => DEFAULT_PRODUCT_PRODUCTS_IS_ALWAYS_FREE_SHIPPING,
'products_qty_box_status' => PRODUCTS_QTY_BOX_STATUS,
'products_quantity_order_max' => '0',
'products_sort_order' => '0',
'products_discount_type' => '0',
'products_discount_type_from' => '0',
'products_price_sorter' => '0',
'master_categories_id' => ''
);
PHP Code:
'products_quantity' => '1',
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Perfect! Thank You.
You are most welcome ... glad that this worked for you ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Bookmarks