From 6319bb0372ff1a03feb2083fc7d05eebbada1cd9 Mon Sep 17 00:00:00 2001 From: bMancone Date: Wed, 14 Dec 2011 18:49:30 +0000 Subject: [PATCH] // Added one field in Product object, so one product can be managed independantly from the stock management (advanced) if necessary --- .../themes/template/products/quantities.tpl | 39 ++++++++++++++++--- classes/Product.php | 7 ++++ controllers/admin/AdminProductsController.php | 11 ++++++ install-dev/sql/db.sql | 1 + install-dev/sql/upgrade/1.5.0.2.sql | 1 + 5 files changed, 54 insertions(+), 5 deletions(-) diff --git a/admin-dev/themes/template/products/quantities.tpl b/admin-dev/themes/template/products/quantities.tpl index bf7bef382..43127eecf 100644 --- a/admin-dev/themes/template/products/quantities.tpl +++ b/admin-dev/themes/template/products/quantities.tpl @@ -59,8 +59,16 @@ - depends_on_stock == 1 && $stock_management_active == 1}checked="checked" {/if} {if $stock_management_active == 0}disabled="disabled" {/if} type="radio" name="depends_on_stock" class="depends_on_stock" id="depends_on_stock_1" value="1"/> - + advanced_stock_management == 1 && $stock_management_active == 1}value="on" checked="checked" {/if} {if $stock_management_active == 0}disabled="disabled" {/if} + type="checkbox" name="advanced_stock_management" class="advanced_stock_management" id="advanced_stock_management" /> + +

+ + + + + depends_on_stock == 1 && $stock_management_active == 1}checked="checked" {/if} {if $stock_management_active == 0 || $product->advanced_stock_management == 0}disabled="disabled" {/if} type="radio" name="depends_on_stock" class="depends_on_stock" id="depends_on_stock_1" value="1"/> +

@@ -105,13 +113,13 @@ - out_of_stock == 0}checked="checked" {/if} id="out_of_stock_1" type="radio" checked="checked" value="0" class="out_of_stock" name="out_of_stock"> + out_of_stock == 0} checked="checked" {/if} id="out_of_stock_1" type="radio" checked="checked" value="0" class="out_of_stock" name="out_of_stock">
- out_of_stock == 1} 'checked="checked" {/if} id="out_of_stock_2" type="radio" value="1" class="out_of_stock" name="out_of_stock"> + out_of_stock == 1} checked="checked" {/if} id="out_of_stock_2" type="radio" value="1" class="out_of_stock" name="out_of_stock">
- out_of_stock == 2} 'checked="checked" {/if} id="out_of_stock_3" type="radio" value="2" class="out_of_stock" name="out_of_stock"> + out_of_stock == 2} checked="checked" {/if} id="out_of_stock_3" type="radio" value="2" class="out_of_stock" name="out_of_stock">