Page 1 of 1

Default value for weight different than 0

Posted: Wed Jun 27, 2018 2:53 pm
by skip
Is it posible to set default weight 0.01 instead 0 ? Thanks

Re: Default value for weight different than 0

Posted: Wed Jun 27, 2018 3:25 pm
by thekrotek
Default value where exactly and for what purpose?

Re: Default value for weight different than 0

Posted: Wed Jun 27, 2018 3:32 pm
by skip
On product data page under weight, I need settings 0kg - 0.01 kg free shipping and under 0.01kg some value for shipping
So in case I forgot set 0.01 system set up automatically

Re: Default value for weight different than 0

Posted: Wed Jun 27, 2018 4:28 pm
by thekrotek
Product page doesn't have shipping method selection by default. But if you just want to have a default value for Weight option, you can simply set it right in your database, "product" table.

Re: Default value for weight different than 0

Posted: Thu Jun 28, 2018 2:35 am
by skip
I was set default value in database to 0.01 but it still show 0.00000 in admin data weight field, and if I save product without enter value it register 0.00
Maybe something in code must be changed ? image in att

Re: Default value for weight different than 0

Posted: Thu Jun 28, 2018 2:55 am
by straightlight
Maybe something in code must be changed ?
OC version?

Re: Default value for weight different than 0

Posted: Thu Jun 28, 2018 3:01 am
by skip
2.2.0.0

Re: Default value for weight different than 0

Posted: Thu Jun 28, 2018 3:34 am
by straightlight
In admin/controller/catalog/product.php file,

find:

Code: Select all

$data['weight'] = '';
replace with:

Code: Select all

$data['weight'] = '0.01';

Re: Default value for weight different than 0

Posted: Fri Jun 29, 2018 7:54 am
by skip
Thank You very much. Solved