Announcement

Collapse
No announcement yet.

Disable Quickview on a per product basis?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Disable Quickview on a per product basis?

    There are some products that I don't want quickview to operate on. Just wondering if anyone has a thought on a good way to disable the qv functionality for these. I can think of maybe using some combination of an pulling product extra field with text like "NOQV", adding that to the template as part of a class name and using some CSS to hide quickview but that only would work for the hover button which leaves the add to cart/select options button still present. I'd be fine removing the hover button altogether and trying to address the "add to cart" button. I don't love to try to hack 3dcart this badly because it just adds complexity and potential complications down the line.

    Also, a side note, I just found a bug. If you have a 301 redirect set up on a product, quickview fails. I've tested this on HTML5 and core themes.

  • #2
    We had a company remove it completely while still using the quick cart feature. We also had them change the add to cart button to either "product details" or "select options" depending on whether or not the product has options. I don't like to mess with it myself but they sure did it quickly and inexpensively so I don;t imagine it's that difficult.

    Comment


    • #3
      Thanks. Those changes are pretty quick and I did them for the meantime. Being able to leave the built in functionality for most items and turning it off for a few would be a nice option for me. I think a jquery conditional based on the contents of a product extra field could do it but jquery isn't in my skillset right now.

      Comment


      • #4
        Turns out that this is very easy so I thought I'd share in case it benefits anyone in the future.

        This assumes you're using extra field 4 to hide items

        1. Code the add to cart button to go to the product page per 3dcart's instructions in their support article,

        2. Change this in product_item.html and everywhere you find the quickview block in your category, search_group and search templates:
        Code:
         <!--START: quickview-->
        <button class="quickview" data-toggle="modal">[product_quick-view]</button>
        <!--END: quickview-->
        to this:
        Code:
         <!--START: quickview-->
        <button class="quickview[extra_field_4]" data-toggle="modal">[product_quick-view]</button>
        <!--END: quickview-->
        3. Add this to your CSS file:
        Code:
        .quickviewHide {
        display:none;
        }
        4. Enter the word "Hide" in extra field 4 for items for which you don't want quickview to display
        Last edited by bzeltzer; 01-18-2020, 01:03 PM.

        Comment

        Working...
        X