Reputation: 176
Friends i am stuck with a big problem in Opencart Version 1.5.3.1 and badly need your help.
I added option for "Color" for my product and for each color Opencart requires to tell its Quantity. My client have thousands of products with no issue of stock/quantity.
Its very irritating for them to keep on inserting some numeric value for each color in each product ... not forgetting most of the products have 5 to 15 colors.
Is been 3 days i am searching codes and trying but so far i am unable to find how to disable that. Problem is if quantity is not inserted then it will not show that color.
I found this code in controller/product/product.php but it solved nothing
foreach ($option['option_value'] as $option_value) {
if (!$option_value['subtract'] || ($option_value['quantity'] > 0)) { ...
I changed it to:
foreach ($option['option_value'] as $option_value) {
if (!$option_value['subtract']) {...
Kindly help me solve this issue, it would be a great favor. Thanks
Upvotes: 2
Views: 5923
Reputation: 15151
Open system/library/cart.php
Find this code around lines 67-69
if ($option_value_query->row['subtract'] && (!$option_value_query->row['quantity'] || ($option_value_query->row['quantity'] < $quantity))) {
$stock = false;
}
and either remove them, comment them out or change false to true
Upvotes: 2