Jump to content

Featured products only use Quick view


snBuster

Recommended Posts

Hey

I'm working on a small website with only 4 products.
And I was wondering weather it would be possible to
only use the quick view on featured products on the front page?

I've seen thread about removing it, but I would like to remove the link to the product page.
The reason being a new page is unnecessary. 

Link to comment
Share on other sites

The best solution I can think of without editing any theme files is using this custom javascript code.

$(document).ready(function () {
  $('body').on('click', '.product-miniature .product-thumbnail,.product-miniature .product-title a', function (event) {
    prestashop.emit('clickQuickView', {
      dataset: $(event.target).closest('.js-product-miniature').data()
    });
    event.preventDefault();
	return false;
  });
});

This code is for the Classic theme. Two ways to put it to your site.

1. If you have a module which has a "Custom js" field, then put it to the "Custom js" field. If you don't have a module like that, you can try the free "Custom css and js" code I created..

2. Put it to the \themes\classic\assets\js\custom.js file.

 

Another solution is to eidt the \themes\classic\templates\catalog\_partials\miniatures\product.tpl file to add a classname "quick-view" to links.

 

  • Thanks 2
Link to comment
Share on other sites

1 hour ago, tantan199 said:

The best solution I can think of without editing any theme files is using this custom javascript code.


$(document).ready(function () {
  $('body').on('click', '.product-miniature .product-thumbnail,.product-miniature .product-title a', function (event) {
    prestashop.emit('clickQuickView', {
      dataset: $(event.target).closest('.js-product-miniature').data()
    });
    event.preventDefault();
	return false;
  });
});

This code is for the Classic theme. Two ways to put it to your site.

1. If you have a module which has a "Custom js" field, then put it to the "Custom js" field. If you don't have a module like that, you can try the free "Custom css and js" code I created..

2. Put it to the \themes\classic\assets\js\custom.js file.

 

Another solution is to eidt the \themes\classic\templates\catalog\_partials\miniatures\product.tpl file to add a classname "quick-view" to links.

 

The first solution works perfekt!
Cant belive it was that simple!

Just for visualization here are to screenshot .
i'm not all done yet, but this workaround made the customer flow much simpler. 
 

productpage.JPG

Frontpage-w-popup.JPG

Link to comment
Share on other sites

On 6/26/2019 at 2:23 PM, tantan199 said:

The best solution I can think of without editing any theme files is using this custom javascript code.


$(document).ready(function () {
  $('body').on('click', '.product-miniature .product-thumbnail,.product-miniature .product-title a', function (event) {
    prestashop.emit('clickQuickView', {
      dataset: $(event.target).closest('.js-product-miniature').data()
    });
    event.preventDefault();
	return false;
  });
});

This code is for the Classic theme. Two ways to put it to your site.

1. If you have a module which has a "Custom js" field, then put it to the "Custom js" field. If you don't have a module like that, you can try the free "Custom css and js" code I created..

2. Put it to the \themes\classic\assets\js\custom.js file.

 

Another solution is to eidt the \themes\classic\templates\catalog\_partials\miniatures\product.tpl file to add a classname "quick-view" to links.

 

Worked out for me as well. Much appreciated!

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...