').addClass("loader");
this.buttons = {
- next : $(''+options.labelNext+'').attr("href","#").addClass("buttonNext"),
- previous : $(''+options.labelPrevious+'').attr("href","#").addClass("buttonPrevious"),
- finish : $(''+options.labelFinish+'').attr("href","#").addClass("buttonFinish")
+ next : $(''+options.labelNext+'').attr("href","#").addClass("buttonNext").addClass("btn"),
+ previous : $(''+options.labelPrevious+'').attr("href","#").addClass("buttonPrevious").addClass("btn"),
+ finish : $(''+options.labelFinish+'').attr("href","#").addClass("buttonFinish").addClass("btn")
};
/*
diff --git a/js/validate.js b/js/validate.js
new file mode 100644
index 000000000..766d319ed
--- /dev/null
+++ b/js/validate.js
@@ -0,0 +1,72 @@
+/*
+* 2007-2013 PrestaShop
+*
+* NOTICE OF LICENSE
+*
+* This source file is subject to the Open Software License (OSL 3.0)
+* that is bundled with this package in the file LICENSE.txt.
+* It is also available through the world-wide-web at this URL:
+* http://opensource.org/licenses/osl-3.0.php
+* If you did not receive a copy of the license and are unable to
+* obtain it through the world-wide-web, please send an email
+* to license@prestashop.com so we can send you a copy immediately.
+*
+* DISCLAIMER
+*
+* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
+* versions in the future. If you wish to customize PrestaShop for your
+* needs please refer to http://www.prestashop.com for more information.
+*
+* @author PrestaShop SA
+* @copyright 2007-2013 PrestaShop SA
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+function validate_isName(s)
+{
+ var reg = /^[^0-9!<>,;?=+()@#"°{}_$%:]+$/;
+ return reg.test(s);
+}
+
+function validate_isGenericName(s)
+{
+ var reg = /^[^<>={}]+$/;
+ return reg.test(s);
+}
+
+function validate_isAddress(s)
+{
+ var reg = /^[^!<>?=+@{}_$%]+$/;
+ return reg.test(s);
+}
+
+function validate_isPostCode(s)
+{
+ var reg = /^[a-z 0-9-]+$/i;
+ return reg.test(s);
+}
+
+function validate_isCityName(s)
+{
+ var reg = /^[^!<>;?=+@#"°{}_$%]+$/;
+ return reg.test(s);
+}
+
+function validate_isMessage(s)
+{
+ var reg = /^[^<>{}]+$/;
+ return reg.test(s);
+}
+
+function validate_isPhoneNumber(s)
+{
+ var reg = /^[+0-9. ()-]+$/;
+ return reg.test(s);
+}
+
+function validate_isDniLite(s)
+{
+ var reg = /^[0-9a-z-.]{1,16}$/i;
+ return reg.test(s);
+}
diff --git a/modules/blockbestsellers/blockbestsellers.php b/modules/blockbestsellers/blockbestsellers.php
index 2d06046b5..cfe87a90d 100644
--- a/modules/blockbestsellers/blockbestsellers.php
+++ b/modules/blockbestsellers/blockbestsellers.php
@@ -217,7 +217,7 @@ class BlockBestSellers extends Module
if (Configuration::get('PS_CATALOG_MODE'))
return false;
- if (!($result = ProductSale::getBestSalesLight((int)$params['cookie']->id_lang, 0, 5)))
+ if (!($result = ProductSale::getBestSalesLight((int)$params['cookie']->id_lang, 0, 8)))
return (Configuration::get('PS_BLOCK_BESTSELLERS_DISPLAY') ? array() : false);
$bestsellers = array();
diff --git a/modules/homefeatured/homefeatured.php b/modules/homefeatured/homefeatured.php
index 5d7ec5b57..5a2b1ca54 100644
--- a/modules/homefeatured/homefeatured.php
+++ b/modules/homefeatured/homefeatured.php
@@ -112,6 +112,7 @@ class HomeFeatured extends Module
public function hookHeader($params)
{
$this->context->controller->addCSS(($this->_path).'homefeatured.css', 'all');
+ $this->context->controller->addJS(($this->_path).'js/homefeatured.js');
}
public function hookDisplayHome($params)
diff --git a/modules/homefeatured/js/homefeatured.js b/modules/homefeatured/js/homefeatured.js
new file mode 100644
index 000000000..62606689b
--- /dev/null
+++ b/modules/homefeatured/js/homefeatured.js
@@ -0,0 +1,36 @@
+/*
+* 2007-2013 PrestaShop
+*
+* NOTICE OF LICENSE
+*
+* This source file is subject to the Academic Free License (AFL 3.0)
+* that is bundled with this package in the file LICENSE.txt.
+* It is also available through the world-wide-web at this URL:
+* http://opensource.org/licenses/afl-3.0.php
+* If you did not receive a copy of the license and are unable to
+* obtain it through the world-wide-web, please send an email
+* to license@prestashop.com so we can send you a copy immediately.
+*
+* DISCLAIMER
+*
+* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
+* versions in the future. If you wish to customize PrestaShop for your
+* needs please refer to http://www.prestashop.com for more information.
+*
+* @author PrestaShop SA
+* @copyright 2007-2013 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+$(document).ready(function()
+{
+ $('.title_block').click(function(){
+ var button = $(this);
+ $('#index #center_column .products_block').removeClass('active');
+ button.parent('.products_block').addClass('active');
+ $('#index #center_column .products_block .block_content').hide(0, function(){
+ button.next('.block_content').show(0);
+ });
+ });
+});
\ No newline at end of file
diff --git a/themes/default/address.tpl b/themes/default/address.tpl
index 95159c25b..263d3465e 100644
--- a/themes/default/address.tpl
+++ b/themes/default/address.tpl
@@ -100,7 +100,7 @@ $(function(){ldelim}
{if $field_name eq 'company'}
{else}{/if}
-
- {if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE}
- {if ($product.quantity > 0 OR $product.allow_oosp)}
- {l s='Add to cart' mod='homefeatured'}
- {else}
- {l s='Add to cart' mod='homefeatured'}
- {/if}
- {else}
-
- {/if}
-
-
- {/foreach}
-
-
- {else}
-
{l s='No featured products' mod='homefeatured'}
- {/if}
-
-
+{capture name=title}{l s='Popular' mod='homefeatured'}{/capture}
+{include file="$tpl_dir./product-list-home.tpl" id="homefeatured_block" title=$smarty.capture.title}
\ No newline at end of file
diff --git a/themes/default/product-list-colors.tpl b/themes/default/product-list-colors.tpl
new file mode 100644
index 000000000..5bfa034e2
--- /dev/null
+++ b/themes/default/product-list-colors.tpl
@@ -0,0 +1,31 @@
+{*
+* 2007-2013 PrestaShop
+*
+* NOTICE OF LICENSE
+*
+* This source file is subject to the Academic Free License (AFL 3.0)
+* that is bundled with this package in the file LICENSE.txt.
+* It is also available through the world-wide-web at this URL:
+* http://opensource.org/licenses/afl-3.0.php
+* If you did not receive a copy of the license and are unable to
+* obtain it through the world-wide-web, please send an email
+* to license@prestashop.com so we can send you a copy immediately.
+*
+* DISCLAIMER
+*
+* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
+* versions in the future. If you wish to customize PrestaShop for your
+* needs please refer to http://www.prestashop.com for more information.
+*
+* @author PrestaShop SA
+* @copyright 2007-2013 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+
+
+
+ {foreach from=$colors_list item='color'}
+
+ {/foreach}
+
diff --git a/themes/default/product-list-home.tpl b/themes/default/product-list-home.tpl
new file mode 100644
index 000000000..45e19689c
--- /dev/null
+++ b/themes/default/product-list-home.tpl
@@ -0,0 +1,62 @@
+{*
+* 2007-2013 PrestaShop
+*
+* NOTICE OF LICENSE
+*
+* This source file is subject to the Academic Free License (AFL 3.0)
+* that is bundled with this package in the file LICENSE.txt.
+* It is also available through the world-wide-web at this URL:
+* http://opensource.org/licenses/afl-3.0.php
+* If you did not receive a copy of the license and are unable to
+* obtain it through the world-wide-web, please send an email
+* to license@prestashop.com so we can send you a copy immediately.
+*
+* DISCLAIMER
+*
+* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
+* versions in the future. If you wish to customize PrestaShop for your
+* needs please refer to http://www.prestashop.com for more information.
+*
+* @author PrestaShop SA
+* @copyright 2007-2013 PrestaShop SA
+* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*}
+