diff --git a/classes/controller/FrontController.php b/classes/controller/FrontController.php index 943ee39cd..db6b22313 100644 --- a/classes/controller/FrontController.php +++ b/classes/controller/FrontController.php @@ -346,7 +346,8 @@ class FrontControllerCore extends Controller 'PS_STOCK_MANAGEMENT' => Configuration::get('PS_STOCK_MANAGEMENT'), 'quick_view' => Configuration::get('PS_QUICK_VIEW'), 'shop_phone' => Configuration::get('PS_SHOP_PHONE'), - 'compared_products' => is_array($compared_products) ? $compared_products : array() + 'compared_products' => is_array($compared_products) ? $compared_products : array(), + 'comparator_max_item' => (int)Configuration::get('PS_COMPARATOR_MAX_ITEM') )); // Add the tpl files directory for mobile @@ -757,6 +758,8 @@ class FrontControllerCore extends Controller $this->addjqueryPlugin('fancybox'); $this->addJS(_THEME_JS_DIR_.'quick-view.js'); } + if (Configuration::get('PS_COMPARATOR_MAX_ITEM') > 0) + $this->addJS(_THEME_JS_DIR_.'products-comparison.js'); // Execute Hook FrontController SetMedia Hook::exec('actionFrontControllerSetMedia', array()); diff --git a/modules/blockwishlist/blockwishlist.php b/modules/blockwishlist/blockwishlist.php index 83142f8f6..2eb63f795 100644 --- a/modules/blockwishlist/blockwishlist.php +++ b/modules/blockwishlist/blockwishlist.php @@ -118,6 +118,38 @@ class BlockWishList extends Module public function hookTop($params) { + + global $errors; + + require_once(dirname(__FILE__).'/WishList.php'); + if ($this->context->customer->isLogged()) + { + $wishlists = Wishlist::getByIdCustomer($this->context->customer->id); + if (empty($this->context->cookie->id_wishlist) === true || + WishList::exists($this->context->cookie->id_wishlist, $this->context->customer->id) === false) + { + if (!sizeof($wishlists)) + $id_wishlist = false; + else + { + $id_wishlist = (int)($wishlists[0]['id_wishlist']); + $this->context->cookie->id_wishlist = (int)($id_wishlist); + } + } + else + $id_wishlist = $this->context->cookie->id_wishlist; + + + $this->smarty->assign(array( + 'id_wishlist' => $id_wishlist, + 'isLogged' => true, + 'wishlist_products' => ($id_wishlist == false ? false : WishList::getProductByIdCustomer($id_wishlist, $this->context->customer->id, $this->context->language->id, null, true)), + 'wishlists' => $wishlists, + 'ptoken' => Tools::getToken(false))); + } + else + $this->smarty->assign(array('wishlist_products' => false, 'wishlists' => false)); + return $this->display(__FILE__, 'blockwishlist_top.tpl'); } diff --git a/modules/productcomments/productcomments.php b/modules/productcomments/productcomments.php index caea20fb4..0537f4e19 100644 --- a/modules/productcomments/productcomments.php +++ b/modules/productcomments/productcomments.php @@ -709,6 +709,7 @@ class ProductComments extends Module $this->smarty->assign(array( 'product' => $params['product'], 'averageTotal' => round($average['grade']), + 'nbComments' => (int)(ProductComment::getCommentNumber((int)$params['product']['id_product'])) )); return $this->display(__FILE__, 'productcomments_reviews.tpl'); } diff --git a/themes/default-bootstrap/css/contact-form.css b/themes/default-bootstrap/css/contact-form.css index b632687f2..70dc69983 100644 --- a/themes/default-bootstrap/css/contact-form.css +++ b/themes/default-bootstrap/css/contact-form.css @@ -17,9 +17,9 @@ padding: 23px 0 0 0; margin-bottom: 30px; background: url(../img/contact-form.png) repeat-x white; - -webkit-box-shadow: rgba(0, 0, 0, 0) 0px 5px 13px; - -moz-box-shadow: rgba(0, 0, 0, 0) 0px 5px 13px; - box-shadow: rgba(0, 0, 0, 0) 0px 5px 13px; + -webkit-box-shadow: rgba(0, 0, 0, 0.17) 0px 5px 13px; + -moz-box-shadow: rgba(0, 0, 0, 0.17) 0px 5px 13px; + box-shadow: rgba(0, 0, 0, 0.17) 0px 5px 13px; } .contact-form-box fieldset { padding: 0 19px 21px 19px; diff --git a/themes/default-bootstrap/css/global.css b/themes/default-bootstrap/css/global.css index c23693255..c5766fe7a 100644 --- a/themes/default-bootstrap/css/global.css +++ b/themes/default-bootstrap/css/global.css @@ -1733,7 +1733,6 @@ ul.step li em { margin: 0 1px 0 0; width: 16px; height: 16px; - text-indent: -999em; cursor: pointer; } @@ -1741,10 +1740,6 @@ ul.step li em { background: url(../../../modules/productcomments/img/delete.gif) no-repeat 0 -16px !important; } -.star, .star a { - background: url(modules/productcomments/img/star.png) no-repeat 0 0; -} - .cancel a, .star a { display: block; width: 100%; @@ -3203,25 +3198,46 @@ form#sendComment h3 { .star { position: relative; - top: 2px; + top: -1px; float: left; - height: 12px; - width: 12px; + width: 14px; overflow: hidden; - text-indent: -999em; cursor: pointer; + font-size: 14px; + font-weight: normal; } .star, .star a { - background: url(modules/productcomments/img/star.png) no-repeat 0 0; + display: block; } -div.star_on a { - background-position: 0 -13px; +.star a { + position: absolute; + text-indent: -5000px; } -div.star_hover a, div.star a:hover { - background-position: 0 -13px; +div.star:after { + content: ""; + font-family: "FontAwesome"; + display: inline-block; + color: #777676; +} + +div.star.star_on { + display: block; +} +div.star.star_on:after { + content: ""; + font-family: "FontAwesome"; + display: inline-block; + color: #ef8743; +} + +div.star.star_hover:after { + content: ""; + font-family: "FontAwesome"; + display: inline-block; + color: #ef8743; } /* ************************************************************************************************ diff --git a/themes/default-bootstrap/css/modules/productcomments/productcomments.css b/themes/default-bootstrap/css/modules/productcomments/productcomments.css index 7d81eecc8..722424fb0 100644 --- a/themes/default-bootstrap/css/modules/productcomments/productcomments.css +++ b/themes/default-bootstrap/css/modules/productcomments/productcomments.css @@ -14,7 +14,6 @@ .comments_advices li { display: inline-block; line-height: 30px; - /*min 768px max 991px*/ } @media (min-width: 768px) and (max-width: 991px) { .comments_advices li { @@ -30,7 +29,6 @@ line-height: 30px; padding: 0; display: inline-block; - /*min 768px max 991px*/ } @media (min-width: 768px) and (max-width: 1199px) { .comments_advices a { @@ -73,7 +71,6 @@ border-right: 1px solid #d6d4d4; padding-right: 30px; margin-right: 9px; - /* min 768px max 991px*/ } @media (min-width: 768px) and (max-width: 991px) { .comments_advices a.reviews { @@ -94,11 +91,17 @@ #product_comments_block_extra .star_content { margin-top: 1px; } -#product_comments_block_extra div.star { - background: url(img/star.png) no-repeat 0 0; +#product_comments_block_extra div.star:after { + content: ""; + font-family: "FontAwesome"; + display: inline-block; + color: #777676; } -#product_comments_block_extra div.star_on { - background: url(img/star.png) no-repeat 0 -13px; +#product_comments_block_extra div.star_on:after { + content: ""; + font-family: "FontAwesome"; + display: inline-block; + color: #ef8743; } #product_comments_block_extra .comments_advices { clear: both; @@ -125,7 +128,6 @@ overflow: hidden; color: #333333; text-align: left; - /*max 767px*/ } @media (max-width: 767px) { #new_comment_form { @@ -252,12 +254,17 @@ #product_comments_block_tab div.comment .star_content { margin: 0 0 0 5px; } -#product_comments_block_tab div.star, -#product_comments_block_tab div.star_on { - background: url(img/star.png) no-repeat 0 0; +#product_comments_block_tab div.star:after { + content: ""; + font-family: "FontAwesome"; + display: inline-block; + color: #777676; } -#product_comments_block_tab div.star_on { - background-position: 0 -13px; +#product_comments_block_tab div.star_on:after { + content: ""; + font-family: "FontAwesome"; + display: inline-block; + color: #ef8743; } #product_comments_block_tab .comment_author_infos { clear: both; @@ -273,7 +280,6 @@ #product_comments_block_tab div.comment div.comment_details { overflow: hidden; border-left: 1px solid #d6d4d4; - /*max 767px */ } @media (max-width: 991px) { #product_comments_block_tab div.comment div.comment_details { diff --git a/themes/default-bootstrap/css/product_list.css b/themes/default-bootstrap/css/product_list.css index 558e610a6..d0aa2c2e8 100644 --- a/themes/default-bootstrap/css/product_list.css +++ b/themes/default-bootstrap/css/product_list.css @@ -62,6 +62,17 @@ ul.product_list .product-image-container .quick-view { display: none; } } +ul.product_list .comments_note { + text-align: left; + overflow: hidden; +} +ul.product_list .comments_note .star_content { + float: left; +} +ul.product_list .comments_note .nb-comments { + overflow: hidden; + font-style: italic; +} /******************************************************* Product list(Grid) Styles @@ -113,6 +124,16 @@ ul.product_list.grid > li .product-container h5 { padding: 0 15px 7px 15px; min-height: 53px; } +@media (min-width: 1200px) { + ul.product_list.grid > li .product-container .comments_note { + display: none; + } +} +ul.product_list.grid > li .product-container .comments_note .star_content { + margin-left: 59px; + margin-right: 3px; + margin-bottom: 12px; +} ul.product_list.grid > li .product-container .product-desc { display: none; } @@ -165,11 +186,20 @@ ul.product_list.grid > li .product-container .functional-buttons div a:hover, ul ul.product_list.grid > li .product-container .functional-buttons div.wishlist { border-right: 1px solid #d6d4d4; } +ul.product_list.grid > li .product-container .functional-buttons div.wishlist a:before { + display: inline-block; + font-family: "FontAwesome"; + content: ""; + margin-right: 3px; +} +ul.product_list.grid > li .product-container .functional-buttons div.wishlist a.ckecked:before { + content: ""; +} @media (min-width: 992px) and (max-width: 1199px) { ul.product_list.grid > li .product-container .functional-buttons div.wishlist { border-right: 0; } - ul.product_list.grid > li .product-container .functional-buttons div.wishlist i { + ul.product_list.grid > li .product-container .functional-buttons div.wishlist a:before { display: none; } } @@ -177,7 +207,7 @@ ul.product_list.grid > li .product-container .functional-buttons div.wishlist { ul.product_list.grid > li .product-container .functional-buttons div.wishlist { border-right: 0; } - ul.product_list.grid > li .product-container .functional-buttons div.wishlist i { + ul.product_list.grid > li .product-container .functional-buttons div.wishlist a:before { display: none; } } @@ -220,7 +250,7 @@ ul.product_list.grid > li .product-container .functional-buttons div.compare lab ul.product_list.grid > li.hovered .product-container .product-image-container .quick-view { display: block; } - ul.product_list.grid > li.hovered .product-container .functional-buttons, ul.product_list.grid > li.hovered .product-container .button-container { + ul.product_list.grid > li.hovered .product-container .functional-buttons, ul.product_list.grid > li.hovered .product-container .button-container, ul.product_list.grid > li.hovered .product-container .comments_note { display: block; } } @@ -242,7 +272,7 @@ ul.product_list.grid > li .product-container .functional-buttons div.compare lab margin-bottom: 0; } #blockpack ul > li.last-line.hovered { - margin-bottom: -289px; + margin-bottom: -320px; padding-bottom: 250px; } } @@ -299,6 +329,9 @@ ul.product_list.list > li .product-desc { width: 100%; } } +ul.product_list.list > li .center-block .comments_note { + margin-bottom: 12px; +} @media (min-width: 992px) { ul.product_list.list > li .right-block .right-block-content { margin: 0; @@ -387,7 +420,9 @@ ul.product_list.list > li .right-block .right-block-content .functional-buttons color: #777676; cursor: pointer; } -ul.product_list.list > li .right-block .right-block-content .functional-buttons a i, ul.product_list.list > li .right-block .right-block-content .functional-buttons label i { +ul.product_list.list > li .right-block .right-block-content .functional-buttons .wishlist a:before { + content: ""; + font-family: "FontAwesome"; width: 30px; height: 30px; font-size: 15px; @@ -402,13 +437,18 @@ ul.product_list.list > li .right-block .right-block-content .functional-buttons -o-border-radius: 100px; border-radius: 100px; margin-right: 3px; + font-weight: normal; + margin-right: 7px; } -ul.product_list.list > li .right-block .right-block-content .functional-buttons a:hover, ul.product_list.list > li .right-block .right-block-content .functional-buttons label:hover { +ul.product_list.list > li .right-block .right-block-content .functional-buttons .wishlist a:hover { color: #333333; } -ul.product_list.list > li .right-block .right-block-content .functional-buttons a:hover i, ul.product_list.list > li .right-block .right-block-content .functional-buttons label:hover i { +ul.product_list.list > li .right-block .right-block-content .functional-buttons .wishlist a:hover:before { background: #333333; } +ul.product_list.list > li .right-block .right-block-content .functional-buttons .wishlist a.ckecked:before { + content: ""; +} ul.product_list.list > li .right-block .right-block-content .functional-buttons .compare { padding-top: 10px; } @@ -468,7 +508,7 @@ ul.product_list.list > li .right-block .right-block-content .functional-buttons } @media (min-width: 1200px) { #index ul.product_list.tab-pane > li.hovered { - margin-bottom: -290px; + margin-bottom: -300px; } } #index ul.product_list.tab-pane > li .availability { @@ -481,8 +521,8 @@ ul.product_list.list > li .right-block .right-block-content .functional-buttons margin-bottom: 0; } #index ul.product_list.tab-pane > li.last-line.hovered { - margin-bottom: -290px; - padding-bottom: 250px; + margin-bottom: -300px; + padding-bottom: 230px; } } @media (min-width: 480px) and (max-width: 767px) { diff --git a/themes/default-bootstrap/index.tpl b/themes/default-bootstrap/index.tpl index 568caba9d..70d513c2f 100644 --- a/themes/default-bootstrap/index.tpl +++ b/themes/default-bootstrap/index.tpl @@ -28,6 +28,13 @@ {if isset($HOOK_HOME_TAB)} {/if} +
{$HOOK_HOME_TAB_CONTENT}
diff --git a/themes/default-bootstrap/js/modules/blockwishlist/js/ajax-wishlist.js b/themes/default-bootstrap/js/modules/blockwishlist/js/ajax-wishlist.js index 1b11ab291..ed43ef522 100644 --- a/themes/default-bootstrap/js/modules/blockwishlist/js/ajax-wishlist.js +++ b/themes/default-bootstrap/js/modules/blockwishlist/js/ajax-wishlist.js @@ -17,230 +17,257 @@ * 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 +* @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 */ /** - * Update WishList Cart by adding, deleting, updating objects - * - * @return void - */ +* Update WishList Cart by adding, deleting, updating objects +* +* @return void +*/ function WishlistCart(id, action, id_product, id_product_attribute, quantity) { - $.ajax({ - type: 'GET', - url: baseDir + 'modules/blockwishlist/cart.php', - async: true, - cache: false, - data: 'action=' + action + '&id_product=' + id_product + '&quantity=' + quantity + '&token=' + static_token + '&id_product_attribute=' + id_product_attribute, - success: function(data) - { - if (action == 'add') - { - if (isLoggedWishlist == true) { - alert ('Adedd to wishlist') - } - else { - alert ('You must be logged in to manage your wishlist.') - } - } - - if($('#' + id).length != 0) - { - $('#' + id).slideUp('normal'); - document.getElementById(id).innerHTML = data; - $('#' + id).slideDown('normal'); - } - } - }); + $.ajax({ + type: 'GET', + url: baseDir + 'modules/blockwishlist/cart.php', + async: true, + cache: false, + data: 'action=' + action + '&id_product=' + id_product + '&quantity=' + quantity + '&token=' + static_token + '&id_product_attribute=' + id_product_attribute, + success: function(data) + { + if (action == 'add') + { + if (isLoggedWishlist == true) { + wishlistProductsIdsAdd(id_product), + wishlistRefreshStatus(), + alert ('Adedd to wishlist') + } + else { + alert ('You must be logged in to manage your wishlist.') + } + } + if (action == 'delete') { + wishlistProductsIdsRemove(id_product), + wishlistRefreshStatus(); + } + if($('#' + id).length != 0) + { + $('#' + id).slideUp('normal'); + document.getElementById(id).innerHTML = data; + $('#' + id).slideDown('normal'); + } + } + }); } /** - * Change customer default wishlist - * - * @return void - */ +* Change customer default wishlist +* +* @return void +*/ function WishlistChangeDefault(id, id_wishlist) { - $.ajax({ - type: 'GET', - url: baseDir + 'modules/blockwishlist/cart.php', - async: true, - data: 'id_wishlist=' + id_wishlist + '&token=' + static_token, - cache: false, - success: function(data) - { - $('#' + id).slideUp('normal'); - document.getElementById(id).innerHTML = data; - $('#' + id).slideDown('normal'); - } - }); + $.ajax({ + type: 'GET', + url: baseDir + 'modules/blockwishlist/cart.php', + async: true, + data: 'id_wishlist=' + id_wishlist + '&token=' + static_token, + cache: false, + success: function(data) + { + $('#' + id).slideUp('normal'); + document.getElementById(id).innerHTML = data; + $('#' + id).slideDown('normal'); + } + }); } /** - * Buy Product - * - * @return void - */ +* Buy Product +* +* @return void +*/ function WishlistBuyProduct(token, id_product, id_product_attribute, id_quantity, button, ajax) { - if(ajax) - ajaxCart.add(id_product, id_product_attribute, false, button, 1, [token, id_quantity]); - else - { - $('#' + id_quantity).val(0); - WishlistAddProductCart(token, id_product, id_product_attribute, id_quantity) - document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].method='POST'; - document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].action=baseUri + '?controller=cart'; - document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].elements['token'].value = static_token; - document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].submit(); - } - return (true); + if(ajax) + ajaxCart.add(id_product, id_product_attribute, false, button, 1, [token, id_quantity]); + else + { + $('#' + id_quantity).val(0); + WishlistAddProductCart(token, id_product, id_product_attribute, id_quantity) + document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].method='POST'; + document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].action=baseUri + '?controller=cart'; + document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].elements['token'].value = static_token; + document.forms['addtocart' + '_' + id_product + '_' + id_product_attribute].submit(); + } + return (true); } function WishlistAddProductCart(token, id_product, id_product_attribute, id_quantity) { - if ($('#' + id_quantity).val() <= 0) - return (false); - $.ajax({ - type: 'GET', - url: baseDir + 'modules/blockwishlist/buywishlistproduct.php', - data: 'token=' + token + '&static_token=' + static_token + '&id_product=' + id_product + '&id_product_attribute=' + id_product_attribute, - async: true, - cache: false, - success: function(data) - { - if (data) - alert(data); - else - { - $('#' + id_quantity).val($('#' + id_quantity).val() - 1); - } - } - }); - return (true); + if ($('#' + id_quantity).val() <= 0) + return (false); + $.ajax({ + type: 'GET', + url: baseDir + 'modules/blockwishlist/buywishlistproduct.php', + data: 'token=' + token + '&static_token=' + static_token + '&id_product=' + id_product + '&id_product_attribute=' + id_product_attribute, + async: true, + cache: false, + success: function(data) + { + if (data) + alert(data); + else + { + $('#' + id_quantity).val($('#' + id_quantity).val() - 1); + } + } + }); + return (true); } /** - * Show wishlist managment page - * - * @return void - */ +* Show wishlist managment page +* +* @return void +*/ function WishlistManage(id, id_wishlist) { - $.ajax({ - type: 'GET', - async: true, - url: baseDir + 'modules/blockwishlist/managewishlist.php', - data: 'id_wishlist=' + id_wishlist + '&refresh=' + false, - cache: false, - success: function(data) - { - $('#' + id).hide(); - document.getElementById(id).innerHTML = data; - $('#' + id).fadeIn('slow'); - } - }); + $.ajax({ + type: 'GET', + async: true, + url: baseDir + 'modules/blockwishlist/managewishlist.php', + data: 'id_wishlist=' + id_wishlist + '&refresh=' + false, + cache: false, + success: function(data) + { + $('#' + id).hide(); + document.getElementById(id).innerHTML = data; + $('#' + id).fadeIn('slow'); + } + }); } /** - * Show wishlist product managment page - * - * @return void - */ +* Show wishlist product managment page +* +* @return void +*/ function WishlistProductManage(id, action, id_wishlist, id_product, id_product_attribute, quantity, priority) { - $.ajax({ - type: 'GET', - async: true, - url: baseDir + 'modules/blockwishlist/managewishlist.php', - data: 'action=' + action + '&id_wishlist=' + id_wishlist + '&id_product=' + id_product + '&id_product_attribute=' + id_product_attribute + '&quantity=' + quantity + '&priority=' + priority + '&refresh=' + true, - cache: false, - success: function(data) - { - if (action == 'delete') - $('#wlp_' + id_product + '_' + id_product_attribute).fadeOut('fast'); - else if (action == 'update') - { - $('#wlp_' + id_product + '_' + id_product_attribute).fadeOut('fast'); - $('#wlp_' + id_product + '_' + id_product_attribute).fadeIn('fast'); - } - } - }); + $.ajax({ + type: 'GET', + async: true, + url: baseDir + 'modules/blockwishlist/managewishlist.php', + data: 'action=' + action + '&id_wishlist=' + id_wishlist + '&id_product=' + id_product + '&id_product_attribute=' + id_product_attribute + '&quantity=' + quantity + '&priority=' + priority + '&refresh=' + true, + cache: false, + success: function(data) + { + if (action == 'delete') + $('#wlp_' + id_product + '_' + id_product_attribute).fadeOut('fast'); + else if (action == 'update') + { + $('#wlp_' + id_product + '_' + id_product_attribute).fadeOut('fast'); + $('#wlp_' + id_product + '_' + id_product_attribute).fadeIn('fast'); + } + } + }); } /** - * Delete wishlist - * - * @return boolean succeed - */ +* Delete wishlist +* +* @return boolean succeed +*/ function WishlistDelete(id, id_wishlist, msg) { - var res = confirm(msg); - if (res == false) - return (false); - $.ajax({ - type: 'GET', - async: true, - url: baseDir + 'modules/blockwishlist/mywishlist.php', - cache: false, - data: 'deleted&id_wishlist=' + id_wishlist, - success: function(data) - { - $('#' + id).fadeOut('slow'); - } - }); + var res = confirm(msg); + if (res == false) + return (false); + $.ajax({ + type: 'GET', + async: true, + url: baseDir + 'modules/blockwishlist/mywishlist.php', + cache: false, + data: 'deleted&id_wishlist=' + id_wishlist, + success: function(data) + { + $('#' + id).fadeOut('slow'); + } + }); } /** - * Hide/Show bought product - * - * @return void - */ +* Hide/Show bought product +* +* @return void +*/ function WishlistVisibility(bought_class, id_button) { - if ($('#hide' + id_button).css('display') == 'none') - { - $('.' + bought_class).slideDown('fast'); - $('#show' + id_button).hide(); - $('#hide' + id_button).css('display', 'block'); - } - else - { - $('.' + bought_class).slideUp('fast'); - $('#hide' + id_button).hide(); - $('#show' + id_button).css('display', 'block'); - } + if ($('#hide' + id_button).css('display') == 'none') + { + $('.' + bought_class).slideDown('fast'); + $('#show' + id_button).hide(); + $('#hide' + id_button).css('display', 'block'); + } + else + { + $('.' + bought_class).slideUp('fast'); + $('#hide' + id_button).hide(); + $('#show' + id_button).css('display', 'block'); + } } /** - * Send wishlist by email - * - * @return void - */ +* Send wishlist by email +* +* @return void +*/ function WishlistSend(id, id_wishlist, id_email) { - $.post(baseDir + 'modules/blockwishlist/sendwishlist.php', - { token: static_token, - id_wishlist: id_wishlist, - email1: $('#' + id_email + '1').val(), - email2: $('#' + id_email + '2').val(), - email3: $('#' + id_email + '3').val(), - email4: $('#' + id_email + '4').val(), - email5: $('#' + id_email + '5').val(), - email6: $('#' + id_email + '6').val(), - email7: $('#' + id_email + '7').val(), - email8: $('#' + id_email + '8').val(), - email9: $('#' + id_email + '9').val(), - email10: $('#' + id_email + '10').val() }, - function(data) - { - if (data) - alert(data); - else - WishlistVisibility(id, 'hideSendWishlist'); - }); + $.post(baseDir + 'modules/blockwishlist/sendwishlist.php', + { token: static_token, + id_wishlist: id_wishlist, + email1: $('#' + id_email + '1').val(), + email2: $('#' + id_email + '2').val(), + email3: $('#' + id_email + '3').val(), + email4: $('#' + id_email + '4').val(), + email5: $('#' + id_email + '5').val(), + email6: $('#' + id_email + '6').val(), + email7: $('#' + id_email + '7').val(), + email8: $('#' + id_email + '8').val(), + email9: $('#' + id_email + '9').val(), + email10: $('#' + id_email + '10').val() }, + function(data) + { + if (data) + alert(data); + else + WishlistVisibility(id, 'hideSendWishlist'); + }); } +function wishlistProductsIdsAdd(id){ + if ($.inArray(parseInt(id),wishlistProductsIds) == -1) + wishlistProductsIds.push(parseInt(id)) +} +function wishlistProductsIdsRemove(id){ + wishlistProductsIds.splice($.inArray(parseInt(id),wishlistProductsIds), 1) +} +function wishlistRefreshStatus(){ + $('.addToWishlist').each(function() { + if ($.inArray(parseInt($(this).prop('rel')),wishlistProductsIds)!= -1){ + $(this).addClass('ckecked'); + } + else + $(this).removeClass('ckecked'); + }); +} +$(document).ready(function() { + if (typeof wishlistProductsIds == 'undefined') { + wishlistProductsIds = []; + } + wishlistRefreshStatus(); +}); \ No newline at end of file diff --git a/themes/default-bootstrap/lang/en.php b/themes/default-bootstrap/lang/en.php index 11136241c..10279038d 100644 --- a/themes/default-bootstrap/lang/en.php +++ b/themes/default-bootstrap/lang/en.php @@ -95,7 +95,7 @@ $_LANG['history_bd0e34e5be6447844e6f262d51f1a9dc'] = 'Price Rules'; $_LANG['history_ec53a8c4f07baed5d8825072c89799be'] = 'Status'; $_LANG['history_466eadd40b3c10580e3ab4e8061161ce'] = 'Invoice'; $_LANG['history_bcd1b68617759b1dfcff0403a6b5a8d1'] = 'PDF'; -$_LANG['history_0b3db27bc15f682e92ff250ebb167d4b'] = 'Back to your account'; +$_LANG['history_0b3db27bc15f682e92ff250ebb167d4b'] = 'Back to your account.'; $_LANG['history_8cf04a9734132302f96da8e113e80ce5'] = 'Home'; $_LANG['history_01abfc750a0c942167651c40d088531d'] = '#'; $_LANG['identity_19f823c6453c2b1ffd09cb715214813d'] = 'Required field'; diff --git a/themes/default-bootstrap/modules/blockwishlist/blockwishlist_button.tpl b/themes/default-bootstrap/modules/blockwishlist/blockwishlist_button.tpl new file mode 100644 index 000000000..12ffe51a5 --- /dev/null +++ b/themes/default-bootstrap/modules/blockwishlist/blockwishlist_button.tpl @@ -0,0 +1,28 @@ +{* +* 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 +*} + + \ No newline at end of file diff --git a/themes/default-bootstrap/modules/blockwishlist/blockwishlist_top.tpl b/themes/default-bootstrap/modules/blockwishlist/blockwishlist_top.tpl new file mode 100644 index 000000000..6c6ef0c52 --- /dev/null +++ b/themes/default-bootstrap/modules/blockwishlist/blockwishlist_top.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=$wishlist_products item=product name=i} + +{/foreach} diff --git a/themes/default-bootstrap/modules/productcomments/productcomments_reviews.tpl b/themes/default-bootstrap/modules/productcomments/productcomments_reviews.tpl new file mode 100644 index 000000000..00fa35d34 --- /dev/null +++ b/themes/default-bootstrap/modules/productcomments/productcomments_reviews.tpl @@ -0,0 +1,39 @@ + {* +* 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 +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} +{if isset($nbComments) && $nbComments > 0} +
+
+ {section name="i" start=0 loop=5 step=1} + {if $averageTotal le $smarty.section.i.index} +
+ {else} +
+ {/if} + {/section} +
+ {l s='%s Review(s)'|sprintf:$nbComments mod='productcomments'}  +
+{/if} \ No newline at end of file diff --git a/themes/default-bootstrap/modules/productcomments/productcomments_top.tpl b/themes/default-bootstrap/modules/productcomments/productcomments_top.tpl new file mode 100644 index 000000000..a09be2a77 --- /dev/null +++ b/themes/default-bootstrap/modules/productcomments/productcomments_top.tpl @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/themes/default-bootstrap/product-list.tpl b/themes/default-bootstrap/product-list.tpl index f902f8e78..725e7885d 100644 --- a/themes/default-bootstrap/product-list.tpl +++ b/themes/default-bootstrap/product-list.tpl @@ -29,13 +29,6 @@ {assign var='nbItemsPerLineTablet' value=2} {assign var='nbItemsPerLineMobile' value=3} {else} - {assign var='nbItemsPerLine' value=4} {assign var='nbItemsPerLineTablet' value=3} {assign var='nbItemsPerLineMobile' value=2} @@ -78,6 +71,7 @@
{if isset($product.pack_quantity) && $product.pack_quantity}{$product.pack_quantity|intval|cat:' x '}{/if}{$product.name|truncate:45:'...'|escape:'htmlall':'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)))}
@@ -91,7 +85,6 @@
{/if}
- {hook h='displayProductListReviews' product=$product} {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)} {if isset($static_token)} @@ -134,6 +127,15 @@ +{if $page_name == 'product'} + +{/if}