X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Remove 'Quick view' from Crisp White Template (https://forum.x-cart.com/showthread.php?t=74690)

sabinudash 11-21-2016 04:37 AM

Remove 'Quick view' from Crisp White Template
 
Hello,

I would like to turn off the 'Quick view' that appears on mouse-over on product pages on Crisp White template. I could not get the css for this.

Could anyone please kindly help me?

Thank you.

qualiteam 11-21-2016 09:40 PM

Re: Remove 'Quick view' from Crisp White Template
 
You should create a custom module that "decorates" the \XLite\View\Product\ListItem class and makes the isQuickLookEnabled() method always return "false":
PHP Code:

// ...

    /**
     * Return true if quick-look is enabled on the items list
     *
     * @return boolean
     */
    
protected function isQuickLookEnabled()
    {
        return 
false;
    }

// ... 


ElegantXMods.com 01-19-2017 04:16 AM

Re: Remove 'Quick view' from Crisp White Template
 
Hi Alex,
please check my attempts and see where I am most closer to a working code

PHP Code:

<?php
 
namespace XLite\Module\modx\NewArrivalsPage\Controller\Customer;



//abstract class AntiQuickLook extends \XLite\View\Product\ListItem implements \XLite\Base\IDecorator
////no result

//abstract class AntiQuickLook extends \XLite\Module\modx\NewArrivalsPage\Controller\Customer\AntiQuickLook implements \XLite\View\Product\ListItem
////XLite\Module\modx\NewArrivalsPage\Controller\Customer\AntiQuickLook cannot implement XLite\View\Product\ListItem - it is not an interface

abstract class AntiQuickLook extends \XLite\Module\modx\NewArrivalsPage\Controller\Customer\AntiQuickLook implements \XLite\Base\IDecorator
/////no result
{
    
/**
     * Return true if quick-look is enabled on the items list
     *
     * @return boolean
     */
    
protected function isQuickLookEnabled()
    {
        return 
false;
    }
}


qualiteam 01-25-2017 01:40 AM

Re: Remove 'Quick view' from Crisp White Template
 
The class that you should extend is \XLite\View\Product\ListItem, not any of those that you used in your example.

And your class is to be \XLite\Module\Modx\NewArrivalsPage\View\Product\Li stItem, not \XLite\Module\Modx\NewArrivalsPage\Controller\Cust omer\AntiQuickLook

kevinrm 01-27-2017 05:50 PM

Re: Remove 'Quick view' from Crisp White Template
 
I have to agree, the "Quick View" is very confusing on the Crisp White. As a customer, when you hover over the product you see "Add to Cart" and "Quick View" easily. It's not clear at all how to navigate to the product to see more information. Even when you click "Quick View", the link to the product details is hard to find.

I would appreciation more information on how to remove the "Quick View" link...

kevinrm 01-27-2017 06:05 PM

Re: Remove 'Quick view' from Crisp White Template
 
Either the "Quick View" button should be removed, or a "Product Details" button should be added. It's not clear to a first time customer how to navigate to product details at all.

Triple A Racing 01-28-2017 11:00 PM

Re: Remove 'Quick view' from Crisp White Template
 
As an interim measure whilst you write and test your module to operate on CWS, pretty sure you could achieve what you want via Custom CSS:
Code:

.products-grid .quicklook, .products-list .quicklook {
  display: none;
}
.products-grid .quicklook button, .products-list .quicklook button {
  display: none;
}

Working with a standard CWS setup, this should remove the functionality and the button we think.

You'll retain the 'greying out' effect i.e. the current active selection of any particular product indicator, but depending on which view you're using at the time, only the 'add to cart button' etc should remain. You can then add any additional guidance notes for visitors on your FAQ page if you think you need it

kevinrm 01-28-2017 11:53 PM

Re: Remove 'Quick view' from Crisp White Template
 
That worked good, thanks!

sales@webosusa.com 03-01-2019 11:33 PM

Re: Remove 'Quick view' from Crisp White Template
 
A better option is to setup the html in it as blank so prevent loading of unnecessary code that would make your page slower to load.
For instance in the custom JavaScript under "Look & Feel" > "Custom CSS & JS" > "Custom JavaScript"


Code:


$('.quicklook').html('');

Triple A Racing 03-02-2019 07:48 PM

Re: Remove 'Quick view' from Crisp White Template
 
Quote:

Originally Posted by sales@webosusa.com
A better option is to setup the html in it as blank so prevent loading of unnecessary code that would make your page slower to load.
For instance in the custom JavaScript under "Look & Feel" > "Custom CSS & JS" > "Custom JavaScript" Code: $('.quicklook').html('');

Totally agree. Unnecessary code is well worth avoiding, so we applied this ^^ to our own dev store to test it, but after we had done that, all the "Quick View" nonsense remains, even after a "just in case" dev store re-deployment. Quite why Custom CSS works perfectly, but Custom JS doesn't, when both are applied in order to achieve the exact same end result is still a mystery at present. Did you test this against the XC5 "Quick View" function yourself @webosusa ? If you did, was your Custom JS literally, just that one line:
Code:

$('.quicklook').html('');
with no other supporting reference code?

sales@webosusa.com 03-02-2019 08:49 PM

Re: Remove 'Quick view' from Crisp White Template
 
To be honest that is all I have placed in my custom JS and it did work. The element was blank and no "Quick view" was showing. not sure why did not work for you. Perhaps I should re-test it. Thanks for the input.:D

cflsystems 03-03-2019 06:45 AM

Re: Remove 'Quick view' from Crisp White Template
 
Don't use css display property to remove elements. This has been suggested numerous times but it is really bad practice. The element still exists in the source code and it is still rendered.


Same applies to js.


If you want to completely get rid of it modify the code to not render this element at all. This is the only proper way of doing it. I think every XC5 store should have one "custom modifications" module even if it is empty and does nothing. Then you can just apply this little changes here and there without creating new module for each one.



jQuery .hrml may not work on display:none elements so probably that's the reason it is not working for you. Either remove the css rule or call the elements with :hidden in the js line to find it.

Triple A Racing 03-03-2019 07:15 AM

Re: Remove 'Quick view' from Crisp White Template
 
Quote:

Originally Posted by cflsystems
... I think every XC5 store should have one "custom modifications" module even if it is empty and does nothing. Then you can just apply this little changes here and there without creating new module for each one...

Agreed and we have! It's not empty and this is one of those small items that's in it :-) Our original post on this was a suggested interim workaround, posted over two years ago to be fair. We didn't ever consider the js option back then, which is why we tried it out of interest after reading the very recent post (and having switched off the module first) However, thanks for the pointer; :hidden in the js line because that's very useful, despite us not actually needing it for real, in this particular case.

kevinrm 03-04-2019 04:29 AM

Re: Remove 'Quick view' from Crisp White Template
 
CFLSystems made a module for me, "Products List Links" which "Remove Quick View button and add Product Details button/link to products on list and search results pages." I can't remember if he sells that or if it was just custom made for my site but it works well.

xim 03-04-2019 07:27 AM

Re: Remove 'Quick view' from Crisp White Template
 
We removed the QuickView feature in 54 version of X-Cart.

cflsystems 03-04-2019 05:23 PM

Re: Remove 'Quick view' from Crisp White Template
 
Quote:

Originally Posted by kevinrm
CFLSystems made a module for me, "Products List Links" which "Remove Quick View button and add Product Details button/link to products on list and search results pages." I can't remember if he sells that or if it was just custom made for my site but it works well.


Custom made for you Kevin. Feel free to share if you want to.


All times are GMT -8. The time now is 09:54 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.