From d16cd5a3bffee038830cb867fefaf7502f8cbf19 Mon Sep 17 00:00:00 2001 From: PrestaEdit Date: Tue, 27 Nov 2012 22:55:57 +0100 Subject: [PATCH 1/4] [-] FO : show mobile theme if you have click "Broswe the mobile site" on a PC --- classes/Context.php | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/classes/Context.php b/classes/Context.php index 7790dc27c..e33a91dd9 100644 --- a/classes/Context.php +++ b/classes/Context.php @@ -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; + } } } } From d8bd1f7ca6ba7dc213e985d566f7039b4fec981e Mon Sep 17 00:00:00 2001 From: Damon Skelhorn Date: Wed, 28 Nov 2012 09:35:23 +0000 Subject: [PATCH 2/4] Removed ID from repeating product rows in shopping cart table. --- themes/default/shopping-cart.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/default/shopping-cart.tpl b/themes/default/shopping-cart.tpl index 6c2cef4ed..16f58aecf 100644 --- a/themes/default/shopping-cart.tpl +++ b/themes/default/shopping-cart.tpl @@ -260,7 +260,7 @@ {if isset($cannotModify) AND $cannotModify == 1} {if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if} {else} -
+
{l s='Add'}
{if $product.minimal_quantity < ($customization.quantity -$quantityDisplayed) OR $product.minimal_quantity <= 1} From 34200851130c07f2531f392d933f31ebfb5e3521 Mon Sep 17 00:00:00 2001 From: Damon Skelhorn Date: Wed, 28 Nov 2012 10:33:25 +0000 Subject: [PATCH 3/4] Another instance of cart_quantity_button set as ID --- themes/default/shopping-cart-product-line.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/default/shopping-cart-product-line.tpl b/themes/default/shopping-cart-product-line.tpl index a71e0714b..745801c4c 100644 --- a/themes/default/shopping-cart-product-line.tpl +++ b/themes/default/shopping-cart-product-line.tpl @@ -61,7 +61,7 @@ {$product.customizationQuantityTotal} {/if} {if !isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0} -
+
{l s='Add'}
{if $product.minimal_quantity < ($product.cart_quantity-$quantityDisplayed) OR $product.minimal_quantity <= 1} From 37edf2c9b6aed3a37a5420597415c9ec4c1b3baa Mon Sep 17 00:00:00 2001 From: Damon Skelhorn Date: Thu, 29 Nov 2012 14:43:38 +0000 Subject: [PATCH 4/4] Additional instance and removed inline style since CSS present in global.css --- themes/default/order-address-product-line.tpl | 2 +- themes/default/shopping-cart-product-line.tpl | 2 +- themes/default/shopping-cart.tpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/default/order-address-product-line.tpl b/themes/default/order-address-product-line.tpl index cd4c67e2e..e2e8734a9 100644 --- a/themes/default/order-address-product-line.tpl +++ b/themes/default/order-address-product-line.tpl @@ -37,7 +37,7 @@ {if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if} {else} {if !isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0} -