From 8b33ac5acad2a19d2b1a12b4d239986b949859bd Mon Sep 17 00:00:00 2001 From: sLorenzini Date: Wed, 10 Jul 2013 12:21:22 +0200 Subject: [PATCH] // quantities product modified + line bootsrap added in order, categories and attributes group controllers --- .../controllers/products/quantities.tpl | 317 +++++++++--------- .../admin/AdminAttributesGroupsController.php | 1 + .../admin/AdminCategoriesController.php | 1 + controllers/admin/AdminOrdersController.php | 1 + 4 files changed, 153 insertions(+), 167 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/products/quantities.tpl b/admin-dev/themes/default/template/controllers/products/quantities.tpl index 21253424f..813d628c7 100644 --- a/admin-dev/themes/default/template/controllers/products/quantities.tpl +++ b/admin-dev/themes/default/template/controllers/products/quantities.tpl @@ -25,13 +25,12 @@ {if isset($product->id)} -

{l s='Available quantities for sale'}

-
+ {l s='Available quantities for sale'} {if !$ps_stock_management} -
{l s='The stock management is disabled'}
+
{l s='The stock management is disabled'}
{else} {include file="controllers/products/multishop/check_fields.tpl" product_tab="Quantities"} -
+

{l s='This interface allows you to manage available quantities for sale for products. It also allows you to manage product combinations in the current shop.'}

{l s='You can choose whether or not to use the advanced stock management system for this product.'}

{l s='You can manually specify the quantities for the product/each product combination, or you can choose to automatically determine these quantities based on your stock (if advanced stock management is activated).'}

@@ -40,17 +39,19 @@

{l s='For packs: If it has products that use advanced stock management, you have to specify a common warehouse for these products in the pack.'}

{l s='Also, please note that when a product has combinations, its default combination will be used in stock movements.'}

-
+ {if $show_quantities == true} - - - is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="stockForVirtualProduct"> - - - is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="stockForVirtualProduct"> - - - - is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="stockForVirtualProduct"> - - - {if isset($pack_quantity)} + /> + {l s='I want to specify available quantities manually.'} + +

+ + + + {if isset($pack_quantity)} +
+

{l s='When a product has combinations, quantities will be based on the default combination.'}

+

{l s='Given the quantities of the products in this pack, the maximum quantity should be:'} {$pack_quantity}

+
+ {/if} + +
- is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="row stockForVirtualProduct"> +
+

+

- + {l s='I want to use the advanced stock management system for this product.'} + {if $stock_management_active == 0 && !$product->cache_is_pack} - {l s='This requires you to enable advanced stock management.'} + {else if $product->cache_is_pack} - {l s='This parameter depends on the product(s) in the pack.'} + {/if} + +

+ + + +
is_virtual || $product->cache_is_pack}style="display:none;"{/if} class="row stockForVirtualProduct"> + +
+

+

- + {l s='Available quantities for current product and its combinations are based on warehouse stock. '} + {if ($stock_management_active == 0 || $product->advanced_stock_management == 0) && !$product->cache_is_pack}  - {l s='This requires you to enable advanced stock management globally or for this product.'} + {else if $product->cache_is_pack}  - {l s='This parameter depends on the product(s) in the pack.'} + {/if} + +

+

+

+ + + + + - + + - {/if} + + {foreach from=$attributes item=attribute} - + - - - - + {/foreach}
-

{l s='When a product has combinations, quantities will be based on the default combination.'}

-

{l s='Given the quantities of the products in this pack, the maximum quantity should be:'} {$pack_quantity}

-
{l s='Quantity'}{l s='Designation'}
- - - - - - - - - - - - - {foreach from=$attributes item=attribute} - - - - - {/foreach} - -
{l s='Quantity'}{l s='Designation'}
- {$available_quantity[$attribute['id_product_attribute']]} - - {$product_designation[$attribute['id_product_attribute']]}
+
+ {$available_quantity[$attribute['id_product_attribute']]} + {$product_designation[$attribute['id_product_attribute']]}
- - - - - - - -
-
    -
  • - 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 == 2} checked="checked" {/if} id="out_of_stock_3" type="radio" value="2" class="out_of_stock" name="out_of_stock"> - -
  • -
-
-
+ +
+ +
+

+ +

+

+ +

+

+ +

+
+
+ {else}

{l s='It is not possible to manage quantities when:'}

@@ -191,60 +174,60 @@
{/if} {/if} -
-

{l s='Availability settings'}

- - {if !$has_attribute} - - - - - {/if} - {if $ps_stock_management} - - - - - - - - - {if !$countAttributes} - - - - - {/if} + +
+ {l s='Availability settings'} + + {if !$has_attribute} +
+ +
+ +
+

{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}

+
+ {/if} + + {if $ps_stock_management} + {include file="controllers/products/multishop/checkbox.tpl" field="available_now" type="default" multilang="true"} +
+ +
+
+ {include file="controllers/products/input_text_lang.tpl" + languages=$languages + input_value=$product->available_now + input_name='available_now'} +
+
+

{l s='Forbidden characters:'} <>;=#{}

+
+
+ {include file="controllers/products/multishop/checkbox.tpl" field="available_later" type="default" multilang="true"} + +
+
+ {include file="controllers/products/input_text_lang.tpl" + languages=$languages + input_value=$product->available_later + input_name='available_later'} +
+
+

{l s='Forbidden characters:'} <>;=#{}

+
+ + + + {if !$countAttributes} + + +

{l s='The available date when this product is out of stock.'}

{/if} -
- -

{l s='The minimum quantity to buy this product (set to 1 to disable this feature)'}

-
- {include file="controllers/products/multishop/checkbox.tpl" field="available_now" type="default" multilang="true"} - - - {include file="controllers/products/input_text_lang.tpl" - languages=$languages - input_value=$product->available_now - input_name='available_now'} - {l s='Forbidden characters:'} <>;=#{}  -
- {include file="controllers/products/multishop/checkbox.tpl" field="available_later" type="default" multilang="true"} - - - {include file="controllers/products/input_text_lang.tpl" - languages=$languages - input_value=$product->available_later - input_name='available_later'} - {l s='Forbidden characters:'} <>;=#{}  -
- -

{l s='The available date when this product is out of stock.'}

-
+ {/if} -{/if} \ No newline at end of file +{/if} +{*$default_language*} \ No newline at end of file diff --git a/controllers/admin/AdminAttributesGroupsController.php b/controllers/admin/AdminAttributesGroupsController.php index 937d632e0..900b9665d 100644 --- a/controllers/admin/AdminAttributesGroupsController.php +++ b/controllers/admin/AdminAttributesGroupsController.php @@ -31,6 +31,7 @@ class AdminAttributesGroupsControllerCore extends AdminController public function __construct() { + $this->bootstrap = true; $this->context = Context::getContext(); $this->table = 'attribute_group'; $this->identifier = 'id_attribute_group'; diff --git a/controllers/admin/AdminCategoriesController.php b/controllers/admin/AdminCategoriesController.php index 4d48eb608..9c5106cb3 100644 --- a/controllers/admin/AdminCategoriesController.php +++ b/controllers/admin/AdminCategoriesController.php @@ -40,6 +40,7 @@ class AdminCategoriesControllerCore extends AdminController public function __construct() { + $this->bootstrap = true; $this->table = 'category'; $this->className = 'Category'; $this->lang = true; diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index 8f980e828..6de68c770 100755 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -30,6 +30,7 @@ class AdminOrdersControllerCore extends AdminController public function __construct() { + $this->bootstrap = true; $this->table = 'order'; $this->className = 'Order'; $this->lang = false;