diff --git a/admin-dev/themes/default/template/controllers/orders/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/orders/helpers/form/form.tpl deleted file mode 100755 index 2e27fa066..000000000 --- a/admin-dev/themes/default/template/controllers/orders/helpers/form/form.tpl +++ /dev/null @@ -1,1066 +0,0 @@ -{* -* 2007-2011 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 3.0) -* that is bundled with this package in the file LICENSE.txt. -* It is also available through the world-wide-web at this URL: -* http://opensource.org/licenses/afl-3.0.php -* If you did not receive a copy of the license and are unable to -* obtain it through the world-wide-web, please send an email -* to license@prestashop.com so we can send you a copy immediately. -* -* DISCLAIMER -* -* Do not edit or add to this file if you wish to upgrade PrestaShop to newer -* versions in the future. If you wish to customize PrestaShop for your -* needs please refer to http://www.prestashop.com for more information. -* -* @author PrestaShop SA -* @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 8971 $ -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} - -{if $show_toolbar} -
-
- {include file="toolbar.tpl"} -
-

- {block name=pageTitle} - {$title|default:' '} - {/block} -

-
-
-
-
{block name="leadin"}{/block}
-{/if} -
{l s='Customer'} -

- {l s='Add new customer'}

-
-
-

-
- -
- -
- -
- -
- -
-
-
-
-
diff --git a/classes/SpecificPriceRule.php b/classes/SpecificPriceRule.php index 44a68018a..b770487cb 100755 --- a/classes/SpecificPriceRule.php +++ b/classes/SpecificPriceRule.php @@ -52,10 +52,11 @@ class SpecificPriceRuleCore extends ObjectModel 'id_currency' => array('type' => self::TYPE_INT, 'required' => true), 'id_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'from_quantity' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'required' => true), + 'price' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), 'reduction' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true), 'reduction_type' => array('type' => self::TYPE_STRING, 'validate' => 'isReductionType', 'required' => true), - 'from' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat', 'required' => true), - 'to' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat', 'required' => true), + 'from' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat', 'required' => false), + 'to' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat', 'required' => false), ), ); diff --git a/controllers/admin/AdminSpecificPriceRuleController.php b/controllers/admin/AdminSpecificPriceRuleController.php index 13ca9de2c..9575bff17 100755 --- a/controllers/admin/AdminSpecificPriceRuleController.php +++ b/controllers/admin/AdminSpecificPriceRuleController.php @@ -181,31 +181,28 @@ class AdminSpecificPriceRuleControllerCore extends AdminController 'name' => 'from_quantity', 'size' => 6, 'maxlength' => 10, - 'value' => '1', 'required' => true, ), array( 'type' => 'text', - 'label' => $this->l('Price:'), + 'label' => $this->l('Price (tax excl.):'), 'name' => 'price', 'size' => 6, 'maxlength' => 10, - 'value' => '0', 'suffix' => $this->context->currency->getSign('right'), + 'desc' => $this->l('Put 0 to not change the price') ), array( 'type' => 'date', 'label' => $this->l('From:'), 'name' => 'from', 'size' => 12, - 'required' => true ), array( 'type' => 'date', 'label' => $this->l('To:'), 'name' => 'to', 'size' => 12, - 'required' => true ), array( 'type' => 'select', @@ -229,7 +226,11 @@ class AdminSpecificPriceRuleControllerCore extends AdminController 'class' => 'button' ), ); - + $this->fields_value = array( + 'price' => number_format((($value = $this->getFieldValue($this->object, 'price')) ? $value : 0), 2), + 'from_quantity' => (($value = $this->getFieldValue($this->object, 'from_quantity')) ? $value : 1), + 'reduction' => number_format((($value = $this->getFieldValue($this->object, 'from_quantity')) ? $value : 0), 2), + ); $attribute_groups = array(); $attributes = Attribute::getAttributes((int)$this->context->language->id); foreach ($attributes as $attribute) @@ -257,7 +258,6 @@ class AdminSpecificPriceRuleControllerCore extends AdminController 'conditions' => $this->object->getConditions(), 'is_multishop' => Shop::isFeatureActive() ); - return parent::renderForm(); }