// Context part 15

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7658 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-07-19 16:17:14 +00:00
parent 3baf0f02a5
commit 4ae81d8acd
39 changed files with 231 additions and 198 deletions
+1 -1
View File
@@ -245,7 +245,7 @@ class AddressControllerCore extends FrontController
else
$selectedCountry = (int)Configuration::get('PS_COUNTRY_DEFAULT');
$countries = Country::getCountries((int)self::$cookie->id_lang, true, NULL, $this->id_current_shop);
$countries = Country::getCountries((int)self::$cookie->id_lang, true);
$countriesList = '';
foreach ($countries AS $country)
$countriesList .= '<option value="'.(int)($country['id_country']).'" '.($country['id_country'] == $selectedCountry ? 'selected="selected"' : '').'>'.htmlentities($country['name'], ENT_COMPAT, 'UTF-8').'</option>';
+1 -1
View File
@@ -308,7 +308,7 @@ class AuthControllerCore extends FrontController
}*/
if (!isset($selectedCountry))
$selectedCountry = (int)(Configuration::get('PS_COUNTRY_DEFAULT'));
$countries = Country::getCountries((int)(self::$cookie->id_lang), true, NULL, $this->id_current_shop);
$countries = Country::getCountries((int)(self::$cookie->id_lang), true);
$this->smarty->assign(array(
'countries' => $countries,
+3 -3
View File
@@ -78,8 +78,8 @@ class CartControllerCore extends FrontController
$orderTotal = $context->cart->getOrderTotal(true, Cart::ONLY_PRODUCTS);
$this->cartDiscounts = $context->cart->getDiscounts();
foreach ($this->cartDiscounts AS $k => $this->cartDiscount)
if ($error = $context->cart->checkDiscountValidity(new Discount((int)($this->cartDiscount['id_discount'])), $this->cartDiscounts, $orderTotal, $context->cart->getProducts(), false, (int)$this->id_current_group_shop, (int)$this->id_current_shop))
$context->cart->deleteDiscount($this->cartDiscount['id_discount']);
if ($error = self::$cart->checkDiscountValidity(new Discount((int)($this->cartDiscount['id_discount'])), $this->cartDiscounts, $orderTotal, $context->$cart->getProducts(), false))
$context->cart->deleteDiscount((int)($this->cartDiscount['id_discount']));
$add = Tools::getIsset('add') ? 1 : 0;
$delete = Tools::getIsset('delete') ? 1 : 0;
@@ -220,7 +220,7 @@ class CartControllerCore extends FrontController
{
$discountObj = new Discount((int)($discount['id_discount']), (int)(self::$cookie->id_lang));
if ($error = self::$cart->checkDiscountValidity($discountObj, $discounts, self::$cart->getOrderTotal(true, Cart::ONLY_PRODUCTS), self::$cart->getProducts(), false, (int)$this->id_current_group_shop, (int)$this->id_current_shop))
if ($error = self::$cart->checkDiscountValidity($discountObj, $discounts, self::$cart->getOrderTotal(true, Cart::ONLY_PRODUCTS), self::$cart->getProducts(), false))
{
self::$cart->deleteDiscount((int)($discount['id_discount']));
self::$cart->update();
+1 -1
View File
@@ -249,7 +249,7 @@ class ContactControllerCore extends FrontController
WHERE cm.id_customer_thread = '.(int)$id_customer_thread.' AND cm.id_shop='.(int)$this->id_current_shop.' AND token = \''.pSQL($token).'\'');
$this->smarty->assign('customerThread', $customerThread);
}
$this->smarty->assign(array('contacts' => Contact::getContacts((int)self::$cookie->id_lang, (int)$this->id_current_shop),
$this->smarty->assign(array('contacts' => Contact::getContacts((int)self::$cookie->id_lang),
'message' => html_entity_decode(Tools::getValue('message'))
));
}
+1 -1
View File
@@ -98,7 +98,7 @@ class ParentOrderControllerCore extends FrontController
$discount = new Discount((int)(Discount::getIdByName($discountName)));
if (Validate::isLoadedObject($discount))
{
if ($tmpError = $context->cart->checkDiscountValidity($discount, $context->cart->getDiscounts(), $context->cart->getOrderTotal(), $context->cart->getProducts(), true, (int)$this->id_current_group_shop, (int)$this->id_current_shop))
if ($tmpError = $context->cart->checkDiscountValidity($discount, $context->cart->getDiscounts(), $context->cart->getOrderTotal(), $context->cart->getProducts(), true))
$this->errors[] = $tmpError;
}
else
+1 -1
View File
@@ -45,7 +45,7 @@ class SitemapControllerCore extends FrontController
{
parent::process();
$this->smarty->assign('categoriesTree', Category::getRootCategory()->recurseLiteCategTree(0));
$this->smarty->assign('categoriescmsTree', CMSCategory::getRecurseCategory(Context::getContext()->language->id, 1, 1, 1, $this->id_current_shop));
$this->smarty->assign('categoriescmsTree', CMSCategory::getRecurseCategory(Context::getContext()->language->id, 1, 1, 1));
$this->smarty->assign('voucherAllowed', (int)Configuration::get('PS_VOUCHERS'));
$blockmanufacturer = Module::getInstanceByName('blockmanufacturer');
$blocksupplier = Module::getInstanceByName('blocksupplier');