From 1895ec873182e2d27d49219d17ba2da5fe1ed458 Mon Sep 17 00:00:00 2001 From: Madman Date: Fri, 26 Jul 2013 15:30:54 +0200 Subject: [PATCH 01/23] // Begining of Support for Advanved Stock Managment in CSV Import --- controllers/admin/AdminImportController.php | 28 +++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php index 81723c4fc..5f500accd 100644 --- a/controllers/admin/AdminImportController.php +++ b/controllers/admin/AdminImportController.php @@ -1477,6 +1477,34 @@ class AdminImportControllerCore extends AdminController // clean feature positions to avoid conflict Feature::cleanPositions(); } + + // set advanced stock managment + if($product->advanced_stock_managment) { + $product->setAdvancedStockManagement($product->advanced_stock_managment); + } + +/* + Add these checks andd also create a warning messeage + case 'advanced_stock_management' : + if (Tools::getValue('value') === false) + die (Tools::jsonEncode(array('error' => $this->l('Undefined value')))); + if ((int)Tools::getValue('value') != 1 && (int)Tools::getValue('value') != 0) + die (Tools::jsonEncode(array('error' => $this->l('Uncorrect value')))); + if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && (int)Tools::getValue('value') == 1) + die (Tools::jsonEncode(array('error' => $this->l('Not possible if advanced stock management is disabled. ')))); + if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && Pack::isPack($product->id)) + die (Tools::jsonEncode(array('error' => $this->l('Not possible if the product is a pack.')))); + + $product->setAdvancedStockManagement((int)Tools::getValue('value')); + if (StockAvailable::dependsOnStock($product->id) == 1 && (int)Tools::getValue('value') == 0) + StockAvailable::setProductDependsOnStock($product->id, 0); + break; + + } +*/ +// if (StockAvailable::dependsOnStock($product->id) == 1 && (int)Tools::getValue('value') == 0) +// StockAvailable::setProductDependsOnStock($product->id, 0); +// break; // stock available if (Shop::isFeatureActive()) From 4857c8c7889149c7ad314cce684c20f20f5dce47 Mon Sep 17 00:00:00 2001 From: PhpMadman Date: Mon, 29 Jul 2013 09:35:39 +0200 Subject: [PATCH 02/23] [+] BO: Added support for Advanced Stock Management [*] BO: Fixed typos [*] BO: Auto remove product from DependsOnStock of Advanced Stock Management is disabled [*] BO: Added id to warehouse controller --- controllers/admin/AdminImportController.php | 42 ++++++++----------- .../admin/AdminWarehousesController.php | 4 ++ 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php index 5f500accd..c2361ffc3 100644 --- a/controllers/admin/AdminImportController.php +++ b/controllers/admin/AdminImportController.php @@ -243,7 +243,11 @@ class AdminImportControllerCore extends AdminController 'shop' => array( 'label' => $this->l('ID / Name of shop'), 'help' => $this->l('Ignore this field if you don\'t use the Multistore tool. If you leave this field empty, the default shop will be used.'), - ) + ), + 'advanced_stock_management' => array( + 'label' => $this->l('Advanced Stock Management'), + 'help' => $this->l('Enable Advanced Stock Management on product (0 = No, 1 = Yes)') + ), ); self::$default_values = array( @@ -1479,32 +1483,20 @@ class AdminImportControllerCore extends AdminController } // set advanced stock managment - if($product->advanced_stock_managment) { - $product->setAdvancedStockManagement($product->advanced_stock_managment); + if($product->advanced_stock_management) { + if($product->advanced_stock_management != 1 || $product->advanced_stock_management != 0) { + $this->warnings[] = Tools::displayError('Advanced stock management has incorrect value. Not set'); + } elseif(!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && $product->advanced_stock_management == 1) { + $this->warnings[] = Tools::displayError('Advanced stock management is not enabled, can not enable on product '); + } else { + $product->setAdvancedStockManagement($product->advanced_stock_management); + } + // automaticly disable depends on stock, if a_s_m set to disabled + if (StockAvailable::dependsOnStock($product->id) == 1 && $product->advanced_stock_management == 0) { + StockAvailable::setProductDependsOnStock($product->id, 0); + } } -/* - Add these checks andd also create a warning messeage - case 'advanced_stock_management' : - if (Tools::getValue('value') === false) - die (Tools::jsonEncode(array('error' => $this->l('Undefined value')))); - if ((int)Tools::getValue('value') != 1 && (int)Tools::getValue('value') != 0) - die (Tools::jsonEncode(array('error' => $this->l('Uncorrect value')))); - if (!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && (int)Tools::getValue('value') == 1) - die (Tools::jsonEncode(array('error' => $this->l('Not possible if advanced stock management is disabled. ')))); - if (Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && Pack::isPack($product->id)) - die (Tools::jsonEncode(array('error' => $this->l('Not possible if the product is a pack.')))); - - $product->setAdvancedStockManagement((int)Tools::getValue('value')); - if (StockAvailable::dependsOnStock($product->id) == 1 && (int)Tools::getValue('value') == 0) - StockAvailable::setProductDependsOnStock($product->id, 0); - break; - - } -*/ -// if (StockAvailable::dependsOnStock($product->id) == 1 && (int)Tools::getValue('value') == 0) -// StockAvailable::setProductDependsOnStock($product->id, 0); -// break; // stock available if (Shop::isFeatureActive()) diff --git a/controllers/admin/AdminWarehousesController.php b/controllers/admin/AdminWarehousesController.php index 8628f1f52..99e1371cc 100644 --- a/controllers/admin/AdminWarehousesController.php +++ b/controllers/admin/AdminWarehousesController.php @@ -38,6 +38,10 @@ class AdminWarehousesControllerCore extends AdminController $this->multishop_context = Shop::CONTEXT_ALL; $this->fields_list = array( + 'id_warehouse' => array( + 'title' => $this->l('ID'), + 'width' => 50, + ), 'reference' => array( 'title' => $this->l('Reference'), 'width' => 150, From 909948bfb950d5d7a29d9a14179de162644265c1 Mon Sep 17 00:00:00 2001 From: PhpMadman Date: Mon, 29 Jul 2013 10:27:31 +0200 Subject: [PATCH 03/23] [+] BO : Added support to set A warehouse by id [*] BO : Import will clear any warehouses allready set --- controllers/admin/AdminImportController.php | 25 +++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php index c2361ffc3..17621d2bd 100644 --- a/controllers/admin/AdminImportController.php +++ b/controllers/admin/AdminImportController.php @@ -248,6 +248,7 @@ class AdminImportControllerCore extends AdminController 'label' => $this->l('Advanced Stock Management'), 'help' => $this->l('Enable Advanced Stock Management on product (0 = No, 1 = Yes)') ), + 'warehouse' => array('label' => $this->l('Warehouse')), ); self::$default_values = array( @@ -1484,10 +1485,10 @@ class AdminImportControllerCore extends AdminController // set advanced stock managment if($product->advanced_stock_management) { - if($product->advanced_stock_management != 1 || $product->advanced_stock_management != 0) { + if($product->advanced_stock_management != 1 && $product->advanced_stock_management != 0) { $this->warnings[] = Tools::displayError('Advanced stock management has incorrect value. Not set'); } elseif(!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && $product->advanced_stock_management == 1) { - $this->warnings[] = Tools::displayError('Advanced stock management is not enabled, can not enable on product '); + $this->warnings[] = sprintf(Tools::displayError('Advanced stock management is not enabled, can not enable on product %1$s '),$product->name[$default_language_id]); } else { $product->setAdvancedStockManagement($product->advanced_stock_management); } @@ -1497,6 +1498,26 @@ class AdminImportControllerCore extends AdminController } } + // Check if warehouse exists + if(Warehouse::exists($product->warehouse)) { + // Get already associated warehouses + $associated_warehouses_collection = WarehouseProductLocation::getCollection($product->id); + + // Delete any entry in warehouse for this product + foreach ($associated_warehouses_collection as $awc) + { + $awc->delete(); + } + $warehouse_location_entity = new WarehouseProductLocation(); + $warehouse_location_entity->id_product = $product->id; + $warehouse_location_entity->id_product_attribute = 0; + $warehouse_location_entity->id_warehouse = $product->warehouse; + $warehouse_location_entity->save(); + + StockAvailable::synchronize($product->id); // Don't know if it is needed, but it can't hurt + } else { + $this->warnings[] = sprintf(Tools::displayError('Warehouse did not exists, can not set on product %1$s '),$product->name[$default_language_id]); + } // stock available if (Shop::isFeatureActive()) From 1dd7d6afcc0b42b6baebe10fc38924a73714ac16 Mon Sep 17 00:00:00 2001 From: PhpMadman Date: Mon, 29 Jul 2013 11:54:15 +0200 Subject: [PATCH 04/23] [-] BO : Fixed incorrect error message in a_s_m [+] BO : Added support for Depends On Stock [-] BO : Added missing check if warehouse is set in csv --- controllers/admin/AdminImportController.php | 77 ++++++++++++++------- 1 file changed, 51 insertions(+), 26 deletions(-) diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php index 17621d2bd..c323eeea0 100644 --- a/controllers/admin/AdminImportController.php +++ b/controllers/admin/AdminImportController.php @@ -248,7 +248,14 @@ class AdminImportControllerCore extends AdminController 'label' => $this->l('Advanced Stock Management'), 'help' => $this->l('Enable Advanced Stock Management on product (0 = No, 1 = Yes)') ), - 'warehouse' => array('label' => $this->l('Warehouse')), + 'depends_on_stock' => array( + 'label' => $this->l('Depends On Stock'), + 'help' => $this->l('0 = Use quantity set in product, 1 = Use quantity from Warehouse') + ), + 'warehouse' => array( + 'label' => $this->l('Warehouse'), + 'help' => $this->l('ID of the warehouse to set as storeage') + ), ); self::$default_values = array( @@ -1486,7 +1493,7 @@ class AdminImportControllerCore extends AdminController // set advanced stock managment if($product->advanced_stock_management) { if($product->advanced_stock_management != 1 && $product->advanced_stock_management != 0) { - $this->warnings[] = Tools::displayError('Advanced stock management has incorrect value. Not set'); + $this->warnings[] = sprintf(Tools::displayError('Advanced stock management has incorrect value. Not set for product %1$s '),$product->name[$default_language_id]); } elseif(!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && $product->advanced_stock_management == 1) { $this->warnings[] = sprintf(Tools::displayError('Advanced stock management is not enabled, can not enable on product %1$s '),$product->name[$default_language_id]); } else { @@ -1499,34 +1506,52 @@ class AdminImportControllerCore extends AdminController } // Check if warehouse exists - if(Warehouse::exists($product->warehouse)) { - // Get already associated warehouses - $associated_warehouses_collection = WarehouseProductLocation::getCollection($product->id); - - // Delete any entry in warehouse for this product - foreach ($associated_warehouses_collection as $awc) - { - $awc->delete(); + if($product->warehouse) { + if(!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) { + $this->warnings[] = sprintf(Tools::displayError('Advanced stock management is not enabled, warehouse not set on product %1$s '),$product->name[$default_language_id]); + } else { + if(Warehouse::exists($product->warehouse)) { + // Get already associated warehouses + $associated_warehouses_collection = WarehouseProductLocation::getCollection($product->id); + + // Delete any entry in warehouse for this product + foreach ($associated_warehouses_collection as $awc) + { + $awc->delete(); + } + $warehouse_location_entity = new WarehouseProductLocation(); + $warehouse_location_entity->id_product = $product->id; + $warehouse_location_entity->id_product_attribute = 0; + $warehouse_location_entity->id_warehouse = $product->warehouse; + $warehouse_location_entity->save(); + + StockAvailable::synchronize($product->id); // Don't know if it is needed, but it can't hurt + } else { + $this->warnings[] = sprintf(Tools::displayError('Warehouse did not exists, can not set on product %1$s '),$product->name[$default_language_id]); + } } - $warehouse_location_entity = new WarehouseProductLocation(); - $warehouse_location_entity->id_product = $product->id; - $warehouse_location_entity->id_product_attribute = 0; - $warehouse_location_entity->id_warehouse = $product->warehouse; - $warehouse_location_entity->save(); - - StockAvailable::synchronize($product->id); // Don't know if it is needed, but it can't hurt - } else { - $this->warnings[] = sprintf(Tools::displayError('Warehouse did not exists, can not set on product %1$s '),$product->name[$default_language_id]); } - + // stock available - if (Shop::isFeatureActive()) - { - foreach ($shops as $shop) - StockAvailable::setQuantity((int)$product->id, 0, $product->quantity, (int)$shop); + if($product->depends_on_stock) { // if not set + if($product->depends_on_stock != 0 && $product->depends_on_stock != 1) { + $this->warnings[] = sprintf(Tools::displayError('Incorrect value for depends on stock for product %1$s '),$product->name[$default_language_id]); + } elseif((!$product->advanced_stock_management || $product->advanced_stock_management == 0) && $product->depends_on_stock == 1) { + $this->warnings[] = sprintf(Tools::displayError('Advanced stock management not enabled, can not set depends on stock %1$s '),$product->name[$default_language_id]); + } else { + StockAvailable::setProductDependsOnStock($product->id, $product->depends_on_stock); + } + } else { // if not depends_on_stock set, use normal qty + if (Shop::isFeatureActive()) + { + foreach ($shops as $shop) + StockAvailable::setQuantity((int)$product->id, 0, $product->quantity, (int)$shop); + } + else + { + StockAvailable::setQuantity((int)$product->id, 0, $product->quantity, $this->context->shop->id); + } } - else - StockAvailable::setQuantity((int)$product->id, 0, $product->quantity, $this->context->shop->id); } From e90dafe7b1d3e9c092dd71ebcca9ec1e5ebdac2e Mon Sep 17 00:00:00 2001 From: djfm Date: Wed, 4 Dec 2013 16:18:22 +0000 Subject: [PATCH 05/23] // more descriptive labels in dashactivity --- modules/dashactivity/dashactivity.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/dashactivity/dashactivity.php b/modules/dashactivity/dashactivity.php index ce5939890..1acb5e3d2 100644 --- a/modules/dashactivity/dashactivity.php +++ b/modules/dashactivity/dashactivity.php @@ -353,7 +353,7 @@ class Dashactivity extends Module $fields_form['form']['input'][] = array( 'label' => $this->l('Cart active'), - 'desc' => $this->l('Default time range to consider a Shopping cart as active (default 30, max 120)'), + 'desc' => $this->l('How long (in minutes) a cart is to be considered active after the last recorded change.'), 'name' => 'DASHACTIVITY_CART_ACTIVE', 'type' => 'select', 'options' => array( @@ -371,7 +371,7 @@ class Dashactivity extends Module ); $fields_form['form']['input'][] = array( 'label' => $this->l('Visitor online'), - 'desc' => $this->l('Default time range to consider a Visitor as online (default 30, max 120)'), + 'desc' => $this->l('How long (in minutes) a visitor is to be considered online after their last action (default: 30 min).'), 'name' => 'DASHACTIVITY_VISITOR_ONLINE', 'type' => 'select', 'options' => array( @@ -389,14 +389,14 @@ class Dashactivity extends Module ); $fields_form['form']['input'][] = array( 'label' => $this->l('Cart abandoned (min)'), - 'desc' => $this->l('Default time range (min) to consider a Shopping cart as abandoned (default 24hrs)'), + 'desc' => $this->l('How long (in hours) after the last action a cart is to be considered as abandoned (default: 24 hrs).'), 'name' => 'DASHACTIVITY_CART_ABANDONED_MIN', 'type' => 'text', 'suffix' => $this->l('hrs'), ); $fields_form['form']['input'][] = array( 'label' => $this->l('Cart abandoned (max)'), - 'desc' => $this->l('Default time range (max) to consider a Shopping cart as abandoned (default 48hrs)'), + 'desc' => $this->l('How long (in hours) after the last action a cart is no longer to be considered as abandoned (default: 24 hrs).'), 'name' => 'DASHACTIVITY_CART_ABANDONED_MAX', 'type' => 'text', 'suffix' => $this->l('hrs'), From ec8ca92e6782349d674429b91532fa195226212d Mon Sep 17 00:00:00 2001 From: gRoussac Date: Wed, 4 Dec 2013 18:49:34 +0100 Subject: [PATCH 06/23] // norms --- controllers/admin/AdminImportController.php | 52 +++++++++------------ 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/controllers/admin/AdminImportController.php b/controllers/admin/AdminImportController.php index cd206a10c..77633ee0d 100644 --- a/controllers/admin/AdminImportController.php +++ b/controllers/admin/AdminImportController.php @@ -1707,68 +1707,62 @@ class AdminImportControllerCore extends AdminController } // set advanced stock managment - if($product->advanced_stock_management) { - if($product->advanced_stock_management != 1 && $product->advanced_stock_management != 0) { + if($product->advanced_stock_management) + { + if($product->advanced_stock_management != 1 && $product->advanced_stock_management != 0) $this->warnings[] = sprintf(Tools::displayError('Advanced stock management has incorrect value. Not set for product %1$s '),$product->name[$default_language_id]); - } elseif(!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && $product->advanced_stock_management == 1) { + elseif(!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT') && $product->advanced_stock_management == 1) $this->warnings[] = sprintf(Tools::displayError('Advanced stock management is not enabled, can not enable on product %1$s '),$product->name[$default_language_id]); - } else { + else $product->setAdvancedStockManagement($product->advanced_stock_management); - } // automaticly disable depends on stock, if a_s_m set to disabled - if (StockAvailable::dependsOnStock($product->id) == 1 && $product->advanced_stock_management == 0) { + if (StockAvailable::dependsOnStock($product->id) == 1 && $product->advanced_stock_management == 0) StockAvailable::setProductDependsOnStock($product->id, 0); - } } // Check if warehouse exists - if($product->warehouse) { - if(!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) { + if($product->warehouse) + { + if(!Configuration::get('PS_ADVANCED_STOCK_MANAGEMENT')) $this->warnings[] = sprintf(Tools::displayError('Advanced stock management is not enabled, warehouse not set on product %1$s '),$product->name[$default_language_id]); - } else { - if(Warehouse::exists($product->warehouse)) { + else + { + if(Warehouse::exists($product->warehouse)) + { // Get already associated warehouses $associated_warehouses_collection = WarehouseProductLocation::getCollection($product->id); - // Delete any entry in warehouse for this product foreach ($associated_warehouses_collection as $awc) - { $awc->delete(); - } $warehouse_location_entity = new WarehouseProductLocation(); $warehouse_location_entity->id_product = $product->id; $warehouse_location_entity->id_product_attribute = 0; $warehouse_location_entity->id_warehouse = $product->warehouse; $warehouse_location_entity->save(); - StockAvailable::synchronize($product->id); // Don't know if it is needed, but it can't hurt - } else { - $this->warnings[] = sprintf(Tools::displayError('Warehouse did not exists, can not set on product %1$s '),$product->name[$default_language_id]); } + else + $this->warnings[] = sprintf(Tools::displayError('Warehouse did not exists, can not set on product %1$s '),$product->name[$default_language_id]); } } - // stock available - if($product->depends_on_stock) { // if not set - if($product->depends_on_stock != 0 && $product->depends_on_stock != 1) { + if($product->depends_on_stock) + { + if($product->depends_on_stock != 0 && $product->depends_on_stock != 1) $this->warnings[] = sprintf(Tools::displayError('Incorrect value for depends on stock for product %1$s '),$product->name[$default_language_id]); - } elseif((!$product->advanced_stock_management || $product->advanced_stock_management == 0) && $product->depends_on_stock == 1) { + elseif((!$product->advanced_stock_management || $product->advanced_stock_management == 0) && $product->depends_on_stock == 1) $this->warnings[] = sprintf(Tools::displayError('Advanced stock management not enabled, can not set depends on stock %1$s '),$product->name[$default_language_id]); - } else { + else StockAvailable::setProductDependsOnStock($product->id, $product->depends_on_stock); - } - } else { // if not depends_on_stock set, use normal qty + } + else// if not depends_on_stock set, use normal qty + { if (Shop::isFeatureActive()) - { foreach ($shops as $shop) StockAvailable::setQuantity((int)$product->id, 0, $product->quantity, (int)$shop); - } else - { StockAvailable::setQuantity((int)$product->id, 0, $product->quantity, $this->context->shop->id); - } } - } $this->closeCsvFile($handle); } From 04d2ff59ee6bff6a71c50c8fefcd27e586ab1913 Mon Sep 17 00:00:00 2001 From: Kevin Granger Date: Wed, 4 Dec 2013 19:31:02 +0100 Subject: [PATCH 07/23] // fix product list + facebook block HTML5 version WIP --- modules/blockfacebook/blockfacebook.tpl | 32 +++++++++++++++++------ themes/default-bootstrap/product-list.tpl | 5 ++-- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/modules/blockfacebook/blockfacebook.tpl b/modules/blockfacebook/blockfacebook.tpl index 17cb392ea..e69da60ee 100644 --- a/modules/blockfacebook/blockfacebook.tpl +++ b/modules/blockfacebook/blockfacebook.tpl @@ -1,10 +1,26 @@ {if $facebookurl != ''} -
-

{l s='Follow us on facebook' mod='blockfacebook'}

- +
+ +
+

{l s='Follow us on facebook' mod='blockfacebook'}

+ -{/if} - - +
+{/if} \ No newline at end of file diff --git a/themes/default-bootstrap/product-list.tpl b/themes/default-bootstrap/product-list.tpl index e248b68bb..fa1a114aa 100644 --- a/themes/default-bootstrap/product-list.tpl +++ b/themes/default-bootstrap/product-list.tpl @@ -151,14 +151,13 @@ href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product.id_product|intval}&token={$static_token}", false)|escape:'html'}" rel="nofollow" title="{l s='Add to cart'}" - data-id-product="{$product.id_product|intval}" - token={$static_token}", false)|escape:'html'}"> + data-id-product="{$product.id_product|intval}"> {l s='Add to cart'} {else} From 7117a6f4fdd295fb64456d82ab04fcb0dcb047e9 Mon Sep 17 00:00:00 2001 From: Vincent Augagneur Date: Thu, 5 Dec 2013 10:35:51 +0100 Subject: [PATCH 08/23] [-] BO : fixed bug #PSCSX-76 - carrier wizard fees not display after reload carrier --- js/admin_carrier_wizard.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/admin_carrier_wizard.js b/js/admin_carrier_wizard.js index 6a1dedb8e..6ecea9104 100644 --- a/js/admin_carrier_wizard.js +++ b/js/admin_carrier_wizard.js @@ -31,7 +31,6 @@ $(document).ready(function() { if (parseInt($('input[name="is_free"]:checked').val())) is_freeClick($('input[name="is_free"]:checked')); displayRangeType(); - checkAllZones(); }); function initCarrierWizard() @@ -676,4 +675,4 @@ function checkAllZones(elt) $('.fees div.input-group input:text, .fees_all div.input-group input:text').attr('disabled', 'disabled').val(''); } -} \ No newline at end of file +} From 5e9db96f614c58c490233deef922677bdf4b3ad9 Mon Sep 17 00:00:00 2001 From: Kevin Granger Date: Thu, 5 Dec 2013 10:38:59 +0100 Subject: [PATCH 09/23] // home is valid W3C! --- themes/default-bootstrap/css/highdpi.css | 7 +------ themes/default-bootstrap/header.tpl | 11 ++++++----- .../default-bootstrap/modules/blockcart/blockcart.tpl | 4 ++-- themes/default-bootstrap/product-list.tpl | 10 +--------- 4 files changed, 10 insertions(+), 22 deletions(-) diff --git a/themes/default-bootstrap/css/highdpi.css b/themes/default-bootstrap/css/highdpi.css index 1f777ceb2..6f06e9369 100644 --- a/themes/default-bootstrap/css/highdpi.css +++ b/themes/default-bootstrap/css/highdpi.css @@ -1,11 +1,7 @@ -@media only screen and (-webkit-min-device-pixel-ratio: 2), -only screen and (min-device-pixel-ratio: 2) { - - +@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) { .replace-2x { font-size: 1px; } - .example { background-image: url(../images/example2x.png); -webkit-background-size:13px 13px; @@ -13,5 +9,4 @@ only screen and (min-device-pixel-ratio: 2) { -o-background-size:13px 13px; background-size:13px 13px; } - } \ No newline at end of file diff --git a/themes/default-bootstrap/header.tpl b/themes/default-bootstrap/header.tpl index fa06645fe..b64881274 100644 --- a/themes/default-bootstrap/header.tpl +++ b/themes/default-bootstrap/header.tpl @@ -44,16 +44,18 @@ + + - - + + {if isset($css_files)} {foreach from=$css_files key=css_uri item=media} - + {/foreach} {/if} @@ -62,10 +64,9 @@ var viewport = document.querySelector("meta[name=viewport]"); viewport.setAttribute('content', 'initial-scale=1.0,maximum-scale=1.0,user-scalable=0,width=device-width,height=device-height'); } - if(navigator.userAgent.match(/Android/i)){ + if(navigator.userAgent.match(/Android/i)) { window.scrollTo(0,1); } - var baseDir = '{$content_dir|addslashes}'; var baseUri = '{$base_uri|addslashes}'; var static_token = '{$static_token|addslashes}'; diff --git a/themes/default-bootstrap/modules/blockcart/blockcart.tpl b/themes/default-bootstrap/modules/blockcart/blockcart.tpl index 39ea46550..fae2c2d06 100644 --- a/themes/default-bootstrap/modules/blockcart/blockcart.tpl +++ b/themes/default-bootstrap/modules/blockcart/blockcart.tpl @@ -76,8 +76,8 @@ var generated_date = {$smarty.now|intval}; {assign var='productId' value=$product.id_product} {assign var='productAttributeId' value=$product.id_product_attribute}
- - + + {$product.name|escape:htmlall:'UTF-8'}
diff --git a/themes/default-bootstrap/product-list.tpl b/themes/default-bootstrap/product-list.tpl index fa1a114aa..5ff63a2bc 100644 --- a/themes/default-bootstrap/product-list.tpl +++ b/themes/default-bootstrap/product-list.tpl @@ -116,13 +116,10 @@ {$product.name|truncate:45:'...'|escape:'html':'UTF-8'} - {hook h='displayProductListReviews' product=$product} -

{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}

- {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)} @@ -141,7 +138,6 @@ {/if}
{/if} -
{if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.minimal_quantity <= 1 && $product.customizable != 2 && !$PS_CATALOG_MODE} {if ($product.allow_oosp || $product.quantity > 0)} @@ -190,7 +186,6 @@ {l s='Reduced price!'} {/if}
- {if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} {if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)} @@ -210,9 +205,7 @@ {/if} {/if} -
-
{hook h='displayProductListFunctionalButtons' product=$product} {if isset($comparator_max_item) && $comparator_max_item} @@ -251,7 +244,6 @@ )}); } - {if $page_name !='index' && $page_name !='product'} {/if} -{/if} +{/if} \ No newline at end of file From 9850eeb3e51e24ce11ca23d5e339f1e51bc1fd8b Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Thu, 5 Dec 2013 11:00:58 +0100 Subject: [PATCH 10/23] // Fix category delete cancel button --- .../controllers/categories/helpers/list/list_header.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin-dev/themes/default/template/controllers/categories/helpers/list/list_header.tpl b/admin-dev/themes/default/template/controllers/categories/helpers/list/list_header.tpl index ad3092b9b..3ac34f007 100644 --- a/admin-dev/themes/default/template/controllers/categories/helpers/list/list_header.tpl +++ b/admin-dev/themes/default/template/controllers/categories/helpers/list/list_header.tpl @@ -94,7 +94,7 @@ {/if} {/foreach}