OpenCart 2.x. How to remove Compare option from Quick View

OpenCart 2.x. How to remove Compare option from Quick View

Usually you can find the Compare button displayed in the Quick view window of the Latest and Featured modules on home page.

 

  1. Connect to server via FTP or open cPanel File manager.
  2. Open the catalog/view/theme/themeXXX/template/module/ folder on server, where XXX is your theme number.
  3. Find and comment the Compare button code or delete the line, it should be near line 47:
    <button class="btn btn-icon" type="button" data-toggle="tooltip" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-exchange"></i></button>

    Comment means change line to the following:

    <!--<button class="btn btn-icon" type="button" data-toggle="tooltip" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-exchange"></i></button>-->
  4. In order to delete the Compare option in the Featured module, please, open and edit thecatalog/view/theme/themeXXX/template/module/featured.tpl file, find and comment or delete the following line:
    <button class="btn btn-icon" type="button" data-toggle="tooltip" title="<?php echo $button_compare; ?>" onclick="compare.add('<?php echo $product['product_id']; ?>');"><i class="fa fa-exchange"></i></button>
  5. Save changes in both files. Refresh Home page with Ctrl+F5/Cmd+R to check the changes.

Was this article helpful?

Related Articles

Leave A Comment?

You must be logged in to post a comment.