Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development

This commit is contained in:
Rémi Gaillard
2012-11-29 16:29:03 +01:00
4 changed files with 23 additions and 18 deletions
+20 -15
View File
@@ -111,22 +111,27 @@ class ContextCore
$this->mobile_device = false;
if ($this->checkMobileContext())
{
require_once(_PS_TOOL_DIR_.'mobile_Detect/Mobile_Detect.php');
$this->mobile_detect = new Mobile_Detect();
switch ((int)Configuration::get('PS_ALLOW_MOBILE_DEVICE'))
if(Context::getContext()->cookie->no_mobile == false AND (int)Configuration::get('PS_ALLOW_MOBILE_DEVICE') != 0)
$this->mobile_device = true;
else
{
case 1: // Only for mobile device
if ($this->mobile_detect->isMobile() && !$this->mobile_detect->isTablet())
$this->mobile_device = true;
break;
case 2: // Only for touchpads
if ($this->mobile_detect->isTablet() && $this->mobile_detect->isMobile())
$this->mobile_device = true;
break;
case 3: // For touchpad or mobile devices
if ($this->mobile_detect->isMobile() || $this->mobile_detect->isTablet())
$this->mobile_device = true;
break;
require_once(_PS_TOOL_DIR_.'mobile_Detect/Mobile_Detect.php');
$this->mobile_detect = new Mobile_Detect();
switch ((int)Configuration::get('PS_ALLOW_MOBILE_DEVICE'))
{
case 1: // Only for mobile device
if ($this->mobile_detect->isMobile() && !$this->mobile_detect->isTablet())
$this->mobile_device = true;
break;
case 2: // Only for touchpads
if ($this->mobile_detect->isTablet() && $this->mobile_detect->isMobile())
$this->mobile_device = true;
break;
case 3: // For touchpad or mobile devices
if ($this->mobile_detect->isMobile() || $this->mobile_detect->isTablet())
$this->mobile_device = true;
break;
}
}
}
}
@@ -37,7 +37,7 @@
<span style="float:left">{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}</span>
{else}
{if !isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0}
<div id="cart_quantity_button" class="cart_quantity_button" style="float:left;">
<div class="cart_quantity_button">
<a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}_0_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add&amp;id_product={$product.id_product|intval}&amp;ipa={$product.id_product_attribute|intval}&amp;id_address_delivery={$product.id_address_delivery|intval}&amp;token={$token_cart}")}" title="{l s='Add'}"><img src="{$img_dir}icon/quantity_up.gif" alt="{l s='Add'}" width="14" height="9" /></a><br />
{if $product.minimal_quantity < ($product.cart_quantity-$quantityDisplayed) OR $product.minimal_quantity <= 1}
<a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_0_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add&amp;id_product={$product.id_product|intval}&amp;ipa={$product.id_product_attribute|intval}&amp;id_address_delivery={$product.id_address_delivery|intval}&amp;op=down&amp;token={$token_cart}")}" title="{l s='Subtract'}">
@@ -61,7 +61,7 @@
<span id="cart_quantity_custom_{$product.id_product}_{$product.id_product_attribute}_{$product.id_address_delivery|intval}" >{$product.customizationQuantityTotal}</span>
{/if}
{if !isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0}
<div id="cart_quantity_button" class="cart_quantity_button" style="float:left;">
<div class="cart_quantity_button">
<a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}_0_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add&amp;id_product={$product.id_product|intval}&amp;ipa={$product.id_product_attribute|intval}&amp;id_address_delivery={$product.id_address_delivery|intval}&amp;token={$token_cart}")}" title="{l s='Add'}"><img src="{$img_dir}icon/quantity_up.gif" alt="{l s='Add'}" width="14" height="9" /></a><br />
{if $product.minimal_quantity < ($product.cart_quantity-$quantityDisplayed) OR $product.minimal_quantity <= 1}
<a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_0_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add&amp;id_product={$product.id_product|intval}&amp;ipa={$product.id_product_attribute|intval}&amp;id_address_delivery={$product.id_address_delivery|intval}&amp;op=down&amp;token={$token_cart}")}" title="{l s='Subtract'}">
+1 -1
View File
@@ -260,7 +260,7 @@
{if isset($cannotModify) AND $cannotModify == 1}
<span style="float:left">{if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}</span>
{else}
<div id="cart_quantity_button" class="cart_quantity_button" style="float:left">
<div class="cart_quantity_button">
<a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add&amp;id_product={$product.id_product|intval}&amp;ipa={$product.id_product_attribute|intval}&amp;id_address_delivery={$product.id_address_delivery}&amp;id_customization={$id_customization}&amp;token={$token_cart}")}" title="{l s='Add'}"><img src="{$img_dir}icon/quantity_up.gif" alt="{l s='Add'}" width="14" height="9" /></a><br />
{if $product.minimal_quantity < ($customization.quantity -$quantityDisplayed) OR $product.minimal_quantity <= 1}
<a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_{$product.id_address_delivery|intval}" href="{$link->getPageLink('cart', true, NULL, "add&amp;id_product={$product.id_product|intval}&amp;ipa={$product.id_product_attribute|intval}&amp;id_address_delivery={$product.id_address_delivery}&amp;id_customization={$id_customization}&amp;op=down&amp;token={$token_cart}")}" title="{l s='Subtract'}">