Jump to content

Multiple Wish List


down999

Recommended Posts

Hi, I have trouble with the wishlist.

 

When I have (in my account) multiple wish lists, then adding the products to the wish list stop working (in the front office), when I change the product list view from the grid -> list or the list -> grid.

 

It is working good with the one wish list.

 

Thanks!

Link to comment
Share on other sites

  • 7 months later...

Hello

 

Im facing the same problem, when switching between list/grid , the "Add to wishlist" link / button stops working, happens even on the live demo: http://demo.prestashop.com/en/?view=front   chek it

 

i think its a problem with the default theme (the js and some lines on tpl) are different from the base wishlist module ..

hope the PS team can give a solution or upgrade

 

thanks

Felix

Link to comment
Share on other sites

 

hello

edit this file:

/themes/default-bootstrap/js/global.js

 

there is a function:

function display(view)

{

 if (view == 'list')

 {

  $('ul.product_list').removeClass('grid').addClass('list row');

  $('.product_list > li').removeClass('col-xs-12 col-sm-6 col-md-4').addClass('col-xs-12');

  $('.product_list > li').each(function(index, element) {

      var html = '';

      html = '<div class="product-container"><div class="row">';

      html += '<div class="left-block col-xs-4 col-sm-5 col-md-4">' + $(element).find('.left-block').html() + '</div>';

      html += '<div class="center-block col-xs-4 col-sm-7 col-md-4">';

      html += '<div class="product-flags">'+ $(element).find('.product-flags').html() + '</div>';

      html += '<h5 itemprop="name">'+ $(element).find('h5').html() + '</h5>';

      var hookReviews = $(element).find('.hook-reviews');

      if (hookReviews.length) {

    html += hookReviews.clone().wrap('<div>').parent().html();

      }

      html += '<p class="product-desc">'+ $(element).find('.product-desc').html() + '</p>';

      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>';

      }

      html += '</div>';

      html += '<div class="right-block col-xs-4 col-sm-12 col-md-4"><div class="right-block-content row">';

      var price = $(element).find('.content_price').html();      // check : catalog mode is enabled

      if (price != null) {

    html += '<div class="content_price col-xs-5 col-md-12">'+ price + '</div>';

      }

      html += '<div class="button-container col-xs-7 col-md-12">'+ $(element).find('.button-container').html() +'</div>';

      html += '<div class="functional-buttons clearfix col-sm-12">' + $(element).find('.functional-buttons').html() + '</div>';

      html += '</div>';

      html += '</div></div>';

      $(element).html(html);

  });

  $('.display').find('li#list').addClass('selected');

  $('.display').find('li#grid').removeAttr('class');

  $.totalStorage('display', 'list');

 }

 else

 {

  $('ul.product_list').removeClass('list').addClass('grid row');

  $('.product_list > li').removeClass('col-xs-12').addClass('col-xs-12 col-sm-6 col-md-4');

  $('.product_list > li').each(function(index, element) {

      var html = '';

      html += '<div class="product-container">';

      html += '<div class="left-block">' + $(element).find('.left-block').html() + '</div>';

      html += '<div class="right-block">';

      html += '<div class="product-flags">'+ $(element).find('.product-flags').html() + '</div>';

      html += '<h5 itemprop="name">'+ $(element).find('h5').html() + '</h5>';

      var hookReviews = $(element).find('.hook-reviews');

      if (hookReviews.length) {

    html += hookReviews.clone().wrap('<div>').parent().html();

      }

      html += '<p itemprop="description" 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 itemprop="offers" itemscope itemtype="https://schema.org/Offer" class="button-container">'+ $(element).find('.button-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>';

      }

      html += '</div>';

      html += '<div class="functional-buttons clearfix">' + $(element).find('.functional-buttons').html() + '</div>';

      html += '</div>';

      $(element).html(html);

  });

  $('.display').find('li#grid').addClass('selected');

  $('.display').find('li#list').removeAttr('class');

  $.totalStorage('display', 'grid');

 }

}

change it to:

function display(view)

{

 if (view == 'list')

 {

  $('ul.product_list').removeClass('grid').addClass('list row');

  $('.product_list > li').removeClass('col-xs-12 col-sm-6 col-md-4').addClass('col-xs-12');

  $('.product_list > li').each(function(index, element) {

      var html = '';

      html = '<div class="product-container"><div class="row">';

      html += '<div class="left-block col-xs-4 col-sm-5 col-md-4">' + $(element).find('.left-block').html() + '</div>';

      html += '<div class="center-block col-xs-4 col-sm-7 col-md-4">';

      html += '<div class="product-flags">'+ $(element).find('.product-flags').html() + '</div>';

      html += '<h5 itemprop="name">'+ $(element).find('h5').html() + '</h5>';

      var hookReviews = $(element).find('.hook-reviews');

      if (hookReviews.length) {

    html += hookReviews.clone().wrap('<div>').parent().html();

      }

      html += '<p class="product-desc">'+ $(element).find('.product-desc').html() + '</p>';

      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>';

      }

      html += '</div>';

      html += '<div class="right-block col-xs-4 col-sm-12 col-md-4"><div class="right-block-content row">';

      var price = $(element).find('.content_price').html();      // check : catalog mode is enabled

      if (price != null) {

    html += '<div class="content_price col-xs-5 col-md-12">'+ price + '</div>';

      }

      html += '<div class="button-container col-xs-7 col-md-12">'+ $(element).find('.button-container').html() +'</div>';

      html += '<div class="functional-buttons clearfix col-sm-12">' + $(element).find('.functional-buttons').html() + '</div>';

      html += '</div>';

      html += '</div></div>';

      $(element).html(html);

  });

  $('.display').find('li#list').addClass('selected');

  $('.display').find('li#grid').removeAttr('class');

  $.totalStorage('display', 'list');

 }

 else

 {

  $('ul.product_list').removeClass('list').addClass('grid row');

  $('.product_list > li').removeClass('col-xs-12').addClass('col-xs-12 col-sm-6 col-md-4');

  $('.product_list > li').each(function(index, element) {

      var html = '';

      html += '<div class="product-container">';

      html += '<div class="left-block">' + $(element).find('.left-block').html() + '</div>';

      html += '<div class="right-block">';

      html += '<div class="product-flags">'+ $(element).find('.product-flags').html() + '</div>';

      html += '<h5 itemprop="name">'+ $(element).find('h5').html() + '</h5>';

      var hookReviews = $(element).find('.hook-reviews');

      if (hookReviews.length) {

    html += hookReviews.clone().wrap('<div>').parent().html();

      }

      html += '<p itemprop="description" 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 itemprop="offers" itemscope itemtype="https://schema.org/Offer" class="button-container">'+ $(element).find('.button-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>';

      }

      html += '</div>';

      html += '<div class="functional-buttons clearfix">' + $(element).find('.functional-buttons').html() + '</div>';

      html += '</div>';

      $(element).html(html);

  });

  $('.display').find('li#grid').addClass('selected');

  $('.display').find('li#list').removeAttr('class');

  $.totalStorage('display', 'grid');

 }

 

      $('.wishlist').each(function() {

    current = $(this);

    $(this).children('.wishlist_button_list').popover({

        html: true,

        content: function () {

      return current.children('.popover-content').html();

        }

    });

      });

 

}

 

 

 

in css:

product_list.css

 

change

@media (min-width: 992px) {

  ul.product_list.list > li .right-block .right-block-content .functional-buttons {

    overflow: hidden;

    } }

 

to:

@media (min-width: 992px) {

  ul.product_list.list > li .right-block .right-block-content .functional-buttons {

    } }

 

 

 

enjoy ;-)

if you dont see the changes - clear shop cache

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...