Turn off comparison per product category?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Just checking to see if this is possible. For example, I may want people to compare watches but not gift cards.
13 years ago
it's only possible with a bit of coding -

to begin with you would need to create a  new product template :

copy OneVarient.ascx     - which you can find in folder  templates/products   and paste into the same folder


rename it ( to anything - eg   VariantWithoutCompareButton.ascx      )


to achieve the result you want  should be as simple as removing the line
                <nopCommerce:ProductAddToCompareList ID="ctrlProductAddToCompareList" runat="server" />

you have to reference the new file in admin
content management --> templates --> product templates

click 'add new'  ( first of all, I recommend you look at how the existing templates are referenced )

when you edit/add a new product  which you don't want to have a compare button, look for a drop down list   'Product template:'  - you will see your new template listed - select it and the compare button won't show on that product

- hayden
13 years ago
Very slick! Thanks. I am still trying to understand the dev side of this but have really enjoyed the product so far. If you guys have any dev documents (SDK) like you do for the user guide I would gladly purchase it as well.

Thanks again.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.