I changed the default value of Product is virtual from 0 to 1 and the radio button still comes up non virtual. What am I doing wrong?
I changed the default value of Product is virtual from 0 to 1 and the radio button still comes up non virtual. What am I doing wrong?
What product type did you change this on?
Is this happening incorrectly on a new product or when you edit an existing product?
I believe that this is managed by a setting in the product type configuration for each product type.
Look under the edit layout button and you will see:
That would appear to override anything in the database structure as looking at the collect_info.php file is using it:Product Virtual Default Status - Skip Shipping Address - When adding new products?
Default Virtual Product status to be ON when adding new products?
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' => ''
);
I had a hard time finding that file collect_info.php. Since I renamed admin to something else, it never showed up in the developer tool kit search results......but I digress.
Here is something to look at.
BTW what is [scr] tag for?
I looked in collectinfo and under virtual paragraph it set default to:
// Virtual Products
if (!isset($pInfo->products_virtual)) $pInfo->products_virtual = PRODUCTS_VIRTUAL_DEFAULT;
switch ($pInfo->products_virtual) {
case '0': $is_virtual = false; $not_virtual = true; break;
case '1': $is_virtual = true; $not_virtual = false; break;
default: $is_virtual = false; $not_virtual = false;
Last edited by pixelpadre; 24 Jun 2008 at 01:54 PM.
// Virtual Products
if (!isset($pInfo->products_virtual)) $pInfo->products_virtual = PRODUCTS_VIRTUAL_DEFAULT;
switch ($pInfo->products_virtual) {
case '0': $is_virtual = false; $not_virtual = true; break;
case '1': $is_virtual = true; $not_virtual = false; break;
default: $is_virtual = true; $not_virtual = false;
default line above should reflect case 1. I corrected it but still no change in product listing.
You keep trying to touch the code.
Why don't you put the database field back to how it was and any code changes and just change the setting for this in your configuration settings?
In the Developers Tool Kit, you can enter the constant: DEFAULT_PRODUCT_PRODUCTS_VIRTUAL into the top input box, and do not choose anything from the dropdown, to see where this setting is and change it to be what you want it to be.
Pick the Product Type you are changing and hit the edit layout button and find the setting for the virtual default.
Now, new Products when added will use this new setting.
I am afraid that I do not understand what you mean by the: [scr] tag
scr and /scr are tags in this forum. no explanation how to use them.
ok....i found edit layout in products. now virtual product is set to default.
Still have the problem of default "show quantity box". I still have to check the radio button every time i add a new product to show quantity.
thanks
ok found it in another post. have to go to configurtion edit...product info.... toggle show qty. Why wouldnt they both be in the same place..... guess i need to buy the book