Jump to content

How to change Quick view button from fixed to display on hover in product list


rajansinha02

Recommended Posts

Try this:

 

<script>
  $(document).ready(function(){
    $('.quick-view').mouseenter(function(){
      $(this).trigger('click');
    });
  });
</script>
 
put it in your themes/<your theme folder>/product-list.php  (make backup!!)
 
and it should work on all the category product lists.
 
(Adjust and add self to homefeatured, newproducts, bestsellers etc.)
 
Hope this works, let me know,
pascal.
Link to comment
Share on other sites

Hello Pascal

 

Thank you very much for your prompt response, I add product-list.php with your code as you mentioned to the theme folder but did not get the desired effect.

 

Do I need to make changes in product-list.css also if any if you can help with desired changes.

 

 

Thanks once again

 

Rajan

Link to comment
Share on other sites

  • 2 weeks later...

Hi rajah,

 

Try to put it in the themes/<your theme folder>/product-list.tpl code like here: (Make backup!)

 

{if isset($quick_view) && $quick_view}
  <div class="quick-view-wrapper-mobile">
    <a class="quick-view-mobile" href="{$product.link|escape:'html':'UTF-8'}" rel="{$product.link|escape:'html':'UTF-8'}">
      <i class="icon-eye-open"></i>
    </a>
  </div>
  <a class="quick-view" href="{$product.link|escape:'html':'UTF-8'}" rel="{$product.link|escape:'html':'UTF-8'}">
    <span>{l s='Quick view'}</span>
  </a>
  <script>
    $(document).ready(function(){
      $('.quick-view').mouseenter(function(){
        $(this).css("background-color","yellow");  // test line to see if it triggers. remove this line afterwards
        $(this).trigger('click');
      });
    });
  </script>
{/if}
{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
 
 
This should do it:
Example on what it does:
 
pascal
Link to comment
Share on other sites

  • 1 year later...
  • 2 months later...
  • 10 months later...

my site is designed on prestashop framework. My designer has comment on quick view, which is not showing on pages, but it is making url mysite.com/quickview/product....

 

I want to remove these url and also not want my site to make these urls again. Can anyone help which file to change or remove and where to find it.

Edited by booklovers (see edit history)
Link to comment
Share on other sites

Assuming you're using the default PrestaShop theme, you can disable quick view using the "Theme configurator" module. Just go to the module's configuration page and then change "Display quick view window on homepage and category pages" to "No".

 

If this doesn't work, you'll have to manually edit product-list.tpl in your theme and remove the quick view code.

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