Merge pull request #991 from TMMeilleur/bootstrap

// fixed add to wishlist/compare buttons and added product review
This commit is contained in:
Rémi Gaillard
2013-11-18 06:22:43 -08:00
18 changed files with 639 additions and 293 deletions
+4 -1
View File
@@ -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());
+32
View File
@@ -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');
}
@@ -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');
}
@@ -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;
+30 -14
View File
@@ -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;
}
/* ************************************************************************************************
@@ -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 {
+50 -10
View File
@@ -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) {
+7
View File
@@ -28,6 +28,13 @@
{if isset($HOOK_HOME_TAB)}
<ul id="home-page-tabs" class="nav nav-tabs">{/if}{$HOOK_HOME_TAB}{if isset($HOOK_HOME_TAB)}</ul>
{/if}
<script type="text/javascript">
$('document').ready(function(){
blockHover();
if (typeof reloadProductComparison != 'undefined')
reloadProductComparison();
});
</script>
<div class="tab-content">
{$HOOK_HOME_TAB_CONTENT}
</div>
@@ -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 <contact@prestashop.com>
* @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 <contact@prestashop.com>
* @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();
});
+1 -1
View File
@@ -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';
@@ -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 <contact@prestashop.com>
* @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
*}
<div class="wishlist">
<a href="#" id="wishlist_button_{$product.id_product|intval}" rel="{$product.id_product|intval}" onclick="WishlistCart('wishlist_block_list', 'add', '{$product.id_product|intval}', false, 1); return false;" class="addToWishlist wishlistProd_{$product.id_product|intval}">{l s="Add to Wishlist"}</a>
</div>
@@ -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 <contact@prestashop.com>
* @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
*}
<script type="text/javascript">
var isLoggedWishlist = {if $logged}true{else}false{/if};
var wishlistProductsIds = [];
</script>
{foreach from=$wishlist_products item=product name=i}
<script type="text/javascript">wishlistProductsIds.push({$product.id_product});</script>
{/foreach}
@@ -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 <contact@prestashop.com>
* @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}
<div class="comments_note">
<div class="star_content clearfix">
{section name="i" start=0 loop=5 step=1}
{if $averageTotal le $smarty.section.i.index}
<div class="star"></div>
{else}
<div class="star star_on"></div>
{/if}
{/section}
</div>
<span class="nb-comments">{l s='%s Review(s)'|sprintf:$nbComments mod='productcomments'}&nbsp</span>
</div>
{/if}
@@ -0,0 +1,6 @@
<script type="text/javascript">
$( document ).ready(function() {
$('input[@type=radio].star').rating();
$('.auto-submit-star').rating();
});
</script>
+26 -10
View File
@@ -29,13 +29,6 @@
{assign var='nbItemsPerLineTablet' value=2}
{assign var='nbItemsPerLineMobile' value=3}
{else}
<script type="text/javascript">
$('document').ready(function(){
blockHover();
if (typeof reloadProductComparison != 'undefined')
reloadProductComparison();
});
</script>
{assign var='nbItemsPerLine' value=4}
{assign var='nbItemsPerLineTablet' value=3}
{assign var='nbItemsPerLineMobile' value=2}
@@ -78,6 +71,7 @@
</div>
<div class="right-block">
<h5>{if isset($product.pack_quantity) && $product.pack_quantity}{$product.pack_quantity|intval|cat:' x '}{/if}<a class="product-name" href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:45:'...'|escape:'htmlall':'UTF-8'}</a></h5>
{hook h='displayProductListReviews' product=$product}
<p class="product-desc">{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}</p>
{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
<div class="content_price">
@@ -91,7 +85,6 @@
</div>
{/if}
<div class="button-container">
{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 @@
</ul>
<!-- Script for transformation Grid/List layouts -->
{if $page_name == 'product'}
<script type="text/javascript">
$('document').ready(function(){
blockHover();
if (typeof reloadProductComparison != 'undefined')
reloadProductComparison();
});
</script>
{/if}
<script type="text/javascript">
function blockHover(status) {
$('.product_list.grid li.ajax_block_product').each(function() {
@@ -162,8 +164,15 @@
html += '<div class="center-block col-xs-4 col-xs-7 col-md-4">';
html += '<div class="product-flags">'+ $(element).find('.product-flags').html() + '</div>';
html += '<h5>'+ $(element).find('h5').html() + '</h5>';
var rating = $(element).find('.comments_note').html(); // check : rating
if (rating != null) {
html += '<div class="comments_note">'+ rating + '</div>';
}
html += '<p class="product-desc">'+ $(element).find('.product-desc').html() + '</p>';
html += '<div class="color-list-container">'+ $(element).find('.color-list-container').html() +'</div>';
var colorList = $(element).find('.color-list-container').html();
if (colorList != null) {
html += '<div class="color-list-container">'+ colorList +'</div>';
}
var availability = $(element).find('.availability').html(); // check : catalog mode is enabled
if (availability != null) {
html += '<span class="availability">'+ availability +'</span>';
@@ -199,13 +208,20 @@
html += '<div class="right-block">';
html += '<div class="product-flags">'+ $(element).find('.product-flags').html() + '</div>';
html += '<h5>'+ $(element).find('h5').html() + '</h5>';
var rating = $(element).find('.comments_note').html(); // check : rating
if (rating != null) {
html += '<div class="comments_note">'+ rating + '</div>';
}
html += '<p class="product-desc">'+ $(element).find('.product-desc').html() + '</p>';
var price = $(element).find('.content_price').html(); // check : catalog mode is enabled
if (price != null) {
html += '<div class="content_price">'+ price + '</div>';
}
html += '<div class="button-container">'+ $(element).find('.button-container').html() +'</div>';
html += '<div class="color-list-container">'+ $(element).find('.color-list-container').html() +'</div>';
var colorList = $(element).find('.color-list-container').html();
if (colorList != null) {
html += '<div class="color-list-container">'+ colorList +'</div>';
}
var availability = $(element).find('.availability').html(); // check : catalog mode is enabled
if (availability != null) {
html += '<span class="availability">'+ availability +'</span>';
+38 -10
View File
@@ -1589,11 +1589,10 @@ ul.step {
margin:0 1px 0 0;
width: 16px;
height: 16px;
text-indent: -999em;
cursor: pointer
}
.cancel, .cancel a { 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; }
.star, .star a { }
.cancel a, .star a {
display: block;
width: 100%;
@@ -2966,17 +2965,46 @@ form#sendComment h3 {font-size:14px;}
.star {
position: relative;
top:2px;
top:-1px;
float: left;
height: 12px;
width: 12px;
width: 14px;
overflow: hidden;
text-indent: -999em;
cursor: pointer
cursor: pointer;
font-size:14px;
font-weight:normal;
}
.star, .star a {
display:block;
}
.star a {
position:absolute;
text-indent:-5000px;
}
div.star {
&:after {
content:"";
font-family:$font-icon;
display:inline-block;
color:#777676;
}
}
div.star.star_on {
display:block;
&:after {
content:"";
font-family:$font-icon;
display:inline-block;
color:#ef8743;
}
}
div.star.star_hover {
&:after {
content:"";
font-family:$font-icon;
display:inline-block;
color:#ef8743;
}
}
.star, .star a { background: url(modules/productcomments/img/star.png) no-repeat 0 0;}
div.star_on a { background-position: 0 -13px }
div.star_hover a, div.star a:hover { background-position: 0 -13px }
/* ************************************************************************************************
@@ -14,8 +14,7 @@ padding-top:2px;
li{display:inline-block;
line-height:30px;
/*min 768px max 991px*/
@media (min-width: $screen-sm) and (max-width: $screen-sm-max) {
@media (min-width: $screen-sm) and (max-width: $screen-sm-max) { //min 768px max 991px
display:block;
line-height:20px
}
@@ -29,8 +28,7 @@ padding-top:2px;
padding:0;
display:inline-block;
/*min 768px max 991px*/
@media (min-width: $screen-sm) and (max-width: $screen-md-max) {
@media (min-width: $screen-sm) and (max-width: $screen-md-max) { //min 768px max 991px
float:none;
line-height:20px;
}
@@ -67,8 +65,7 @@ padding-top:2px;
padding-right:30px;
margin-right:9px;
/* min 768px max 991px*/
@media (min-width: $screen-sm) and (max-width: $screen-sm-max) {
@media (min-width: $screen-sm) and (max-width: $screen-sm-max) { // min 768px max 991px
margin-right:0;
padding:0;
border:none
@@ -80,10 +77,29 @@ padding-top:2px;
#product_comments_block_extra{
.comments_note {margin-bottom:5px}
.comments_note span,
.star_content {float:left;color:$base-text-color}
.star_content {margin-top:1px}
div.star {background: url(img/star.png) no-repeat 0 0}
div.star_on {background: url(img/star.png) no-repeat 0 -13px}
.star_content {
float:left;
color:$base-text-color;
}
.star_content {
margin-top:1px;
}
div.star {
&:after {
content:"";
font-family:$font-icon;
display:inline-block;
color:#777676;
}
}
div.star_on {
&:after {
content:"";
font-family:$font-icon;
display:inline-block;
color:#ef8743;
}
}
.comments_advices {clear:both;}
}
@@ -106,8 +122,7 @@ padding-top:2px;
color: $base-text-color;
text-align: left;
/*max 767px*/
@media (max-width: $screen-xs-max) {
@media (max-width: $screen-xs-max) { //max 767px
width:275px;
}
@@ -218,11 +233,22 @@ padding-top:2px;
float:left;
}
div.comment .star_content {margin: 0 0 0 5px}
div.star,
div.star {
&:after {
content:"";
font-family:$font-icon;
display:inline-block;
color:#777676;
}
}
div.star_on {
background: url(img/star.png) no-repeat 0 0
&:after {
content:"";
font-family:$font-icon;
display:inline-block;
color:#ef8743;
}
}
div.star_on {background-position: 0 -13px}
.comment_author_infos {clear:both;
padding-top:9px;
strong{display:block;color:$base-text-color}
@@ -234,8 +260,7 @@ padding-top:2px;
overflow:hidden;
border-left:$main_border;
/*max 767px */
@media (max-width: $screen-sm-max) {
@media (max-width: $screen-sm-max) { //max 767px
border-left: none
}
+72 -31
View File
@@ -73,6 +73,15 @@ ul.product_list {
}
}
}
.comments_note {
text-align:left;
overflow:hidden;
.star_content {
float:left;
}
.nb-comments {overflow:hidden; font-style:italic;}
}
}
/*******************************************************
@@ -127,7 +136,16 @@ ul.product_list.grid {
padding:0 15px 7px 15px;
min-height:53px;
}
.comments_note {
@media (min-width: $screen-lg) { // min 1200px
display:none;
}
.star_content {
margin-left:59px;
margin-right:3px;
margin-bottom:12px;
}
}
.product-desc {
display:none;
}
@@ -169,16 +187,26 @@ ul.product_list.grid {
&.wishlist {
border-right:1px solid $base-border-color;
a:before {
display:inline-block;
font-family:$font-icon;
content:"";
margin-right:3px;
}
a.ckecked:before {
content:"";
}
@media (min-width: $screen-md) and (max-width: $screen-md-max) { // min 992px max 1199px
border-right:0;
i {display:none;}
a:before {display:none;}
}
@media (min-width: $screen-xs) and (max-width: $screen-xs-max) { // min 480px max 767px
border-right:0;
i {display:none;}
a:before {display:none;}
}
}
@@ -225,7 +253,7 @@ ul.product_list.grid {
}
.quick-view {display:block;}
}
.functional-buttons, .button-container {display:block}
.functional-buttons, .button-container, .comments_note {display:block}
}
}
}
@@ -248,7 +276,7 @@ ul.product_list.grid {
margin-bottom:0;
&.hovered {
margin-bottom:-289px;
margin-bottom:-320px;
padding-bottom:250px;
}
}
@@ -305,6 +333,9 @@ ul.product_list.list {
@media (max-width: $screen-xs - 1) { // max 479px
width:100%;
}
.comments_note {
margin-bottom:12px;
}
}
.right-block {
@@ -382,29 +413,39 @@ ul.product_list.list {
}
}
a, label {
font-weight:bold;
color:#777676;
cursor:pointer;
i {
width:30px;
height:30px;
font-size:15px;
text-align:center;
display:inline-block;
background:#929292;
color:$light-text-color;
padding:7px 0 0 0;
@include border-radius(100px);
margin-right:3px;
}
&:hover {
color:$base-text-color;
i {
background:$dark-background;
}
}
font-weight:bold;
color:#777676;
cursor:pointer;
}
.wishlist {
a:before {
content:"";
font-family:$font-icon;
width:30px;
height:30px;
font-size:15px;
text-align:center;
display:inline-block;
background:#929292;
color:$light-text-color;
padding:7px 0 0 0;
@include border-radius(100px);
margin-right:3px;
font-weight:normal;
margin-right:7px;
}
a:hover {
color:$base-text-color;
&:before {
background:$dark-background;
}
}
a.ckecked {
&:before {
content:"";
}
}
}
.compare {
@@ -483,7 +524,7 @@ ul.product_list.list {
@media (min-width: $screen-lg) { // min 1200px
&.hovered {
margin-bottom:-290px;
margin-bottom:-300px;
}
}
.availability {display:none;}
@@ -495,8 +536,8 @@ ul.product_list.list {
margin-bottom:0;
&.hovered {
margin-bottom:-290px;
padding-bottom:250px;
margin-bottom:-300px;
padding-bottom:230px;
}
}
}