I have just solved the issue of setting subtract stock default as no but now i need to set the default quantity for each option to 1000. I have also done this with the main quantity for each product through the controller but it doesn't seem to work for the product options. anyone have a solution?
Nevermind! managed to solve my own problem (was extremely simple too)
Find:
change to:
simple! hopefully this will come in handy for others with the same issue.
Find:
Code: Select all
html += ' <td class="right"><input type="text" name="product_option[' + option_row + '][product_option_value][' + option_value_row + '][quantity]" value="" size="3" /></td>';
Code: Select all
html += ' <td class="right"><input type="text" name="product_option[' + option_row + '][product_option_value][' + option_value_row + '][quantity]" value="1000" size="3" /></td>';
It looks like the code above needs to be edited from your admin/view/template/catalog/product_form.tpl file. The product option is not being used elsewhere in the admin on anyhow.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Hi,
Maybe it's late, or maybe someone is searching for something like this...
To change the default quantity in the "Data" tab of the admin page when inserted a new product:
go to: admin/controller/catalog/product.php
find this:
lines 899 - 905
replace line 904 with
Have fun!
Maybe it's late, or maybe someone is searching for something like this...
To change the default quantity in the "Data" tab of the admin page when inserted a new product:
go to: admin/controller/catalog/product.php
find this:
Code: Select all
if (isset($this->request->post['quantity'])) {
$this->data['quantity'] = $this->request->post['quantity'];
} elseif (!empty($product_info)) {
$this->data['quantity'] = $product_info['quantity'];
} else {
$this->data['quantity'] = 1;
}
replace line 904
Code: Select all
$this->data['quantity'] = 1;
Code: Select all
$this->data['quantity'] = "YOUR VALUE HERE";
This is also one of the features of Admin Enhancement Suite.
http://www.opencart.com/index.php?route ... on_id=5883
http://www.opencart.com/index.php?route ... on_id=5883
-Ryan
Who is online
Users browsing this forum: No registered users and 24 guests