unnecessary code removed, adding new configuration values in update sql

This commit is contained in:
Julien Chanséaume
2014-04-28 15:28:25 +02:00
parent 88a5acd047
commit 0b3ad194e0
3 changed files with 7 additions and 15 deletions

View File

@@ -76,7 +76,7 @@ class CartPostage extends AbstractSmartyPlugin
{
if (! $repeat) {
return $content;
return (null !== $this->countryId) ? $content : "";
}
$customer = $this->request->getSession()->getCustomerUser();
@@ -102,9 +102,7 @@ class CartPostage extends AbstractSmartyPlugin
* cart if it exists
* - the country saved in cookie if customer have changed
* the default country
* - the default country for the shop if exists
* - the country related to the customer based on browser preferences
* - default country
* - the default country for the shop if it exists
*
*
* @param \Thelia\Model\Customer $customer
@@ -149,16 +147,6 @@ class CartPostage extends AbstractSmartyPlugin
;
}
// get browser lang
$lang_code= $this->request->getSession()->getLang()->getCode();
if ($lang_code) {
$country = CountryQuery::create()
->findOneByIsoalpha2(strtoupper($lang_code));
if (null !== $country) {
return $country;
}
}
return null;
}

View File

@@ -6,6 +6,10 @@ UPDATE `config` SET `value`='2.0.1' WHERE `name`='thelia_version';
UPDATE `config` SET `value`='1' WHERE `name`='thelia_release_version';
UPDATE `config` SET `value`='' WHERE `name`='thelia_extra_version';
INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
('front_cart_country_cookie_name','fcccn', 1, 1, NOW(), NOW());
INSERT INTO `config` (`name`, `value`, `secured`, `hidden`, `created_at`, `updated_at`) VALUES
('front_cart_country_cookie_expires','2592000', 1, 1, NOW(), NOW());
ALTER TABLE `module` ADD INDEX `idx_module_activate` (`activate`);

View File

@@ -165,7 +165,7 @@
<div class="total-price">
{assign var="totalAmount" value={cart attr='total_taxed_price_without_discount'} + $postageAmount }
<span class="price">{$totalAmount} {currency attr="symbol"}</span>
</div>cart
</div>
</td>
</tr>
</tfoot>