// Context part 11

This commit is contained in:
tDidierjean
2011-07-18 15:50:58 +00:00
parent 4b7dee58b7
commit 6551a3ece7
60 changed files with 378 additions and 520 deletions
+3 -3
View File
@@ -49,7 +49,7 @@ class BirthdayPresent extends Module
public function getContent()
{
global $cookie, $currentIndex;
$context = Context::getContext();
if (Tools::isSubmit('submitBirthday'))
{
@@ -57,7 +57,7 @@ class BirthdayPresent extends Module
Configuration::updateValue('BIRTHDAY_DISCOUNT_TYPE', (int)(Tools::getValue('id_discount_type')));
Configuration::updateValue('BIRTHDAY_DISCOUNT_VALUE', (float)(Tools::getValue('discount_value')));
Configuration::updateValue('BIRTHDAY_MINIMAL_ORDER', (float)(Tools::getValue('minimal_order')));
Tools::redirectAdmin($currentIndex.'&configure=birthdaypresent&token='.Tools::getValue('token').'&conf=4');
Tools::redirectAdmin(AdminTab::$currentIndex.'&configure=birthdaypresent&token='.Tools::getValue('token').'&conf=4');
}
$this->_html = '
@@ -73,7 +73,7 @@ class BirthdayPresent extends Module
<label>'.$this->l('Type').'</label>
<div class="margin-form">
<select name="id_discount_type">';
$discountTypes = Discount::getDiscountTypes((int)($cookie->id_lang));
$discountTypes = Discount::getDiscountTypes($context->language->id);
foreach ($discountTypes AS $discountType)
$this->_html .= '<option value="'.(int)($discountType['id_discount_type']).'"'.((Configuration::get('BIRTHDAY_DISCOUNT_TYPE') == $discountType['id_discount_type']) ? ' selected="selected"' : '').'>'.$discountType['name'].'</option>';
$this->_html .= '