46 var $calculate_tax =
false;
52 var $value_has_tax =
false;
81 foreach(Array(
'name',
'value',
'value_has_tax',
'calculate_tax') as $var) {
105 $o->openField(translate(
'name'));
106 if ($wa) text_box($prefix.
'_name', $this->name, 15);
107 else echo $this->name;
111 $o->openField(translate(
'value'));
112 if ($wa) text_box($prefix.
'_value', ($this->value == -1) ?
'' : $this->value, 10);
113 else echo ($this->value == -1) ?
' ' : $this->value;
114 $o->note(translate(
'ecom_product_price_note_value'));
117 case 'value_has_tax' :
118 $o->openField(translate(
'ecom_product_price_value_has_tax'));
119 $options = Array(0 =>
'No', 1 =>
'Yes');
120 if ($wa) combo_box($prefix.
'_value_has_tax', $options,
false, (
int) $this->value_has_tax);
121 else echo $options[(int) $this->value_has_tax];
122 $o->note(translate(
'ecom_product_price_note_value_has_tax'));
125 case 'calculate_tax' :
126 $o->openField(translate(
'ecom_product_price_calculate_tax'));
127 $options = Array(0 =>
'No', 1 =>
'Yes');
128 if ($wa) combo_box($prefix.
'_calculate_tax', $options,
false, (
int) $this->calculate_tax);
129 else echo $options[(int) $this->calculate_tax];
130 $o->note(translate(
'ecom_product_price_note_calculate_tax'));
151 foreach(Array(
'name',
'value',
'calculate_tax',
'value_has_tax') as $var) {
172 if (!isset($_POST[$prefix.
'_'.$var]))
return false;
175 $val = trim($_POST[$prefix.
'_'.$var]);
181 $val = floatval($val);
183 trigger_localised_error(
'ECOM0001', E_USER_WARNING);
189 case 'value_has_tax' :
190 case 'calculate_tax' :
196 if ($this->$var != $val) {