I want to remove the ‘add to compare’ option with this template. Can someone point me in the right direction?
p.s. this is an awesome template. Looks and functions beautifully.
7 answers
Dear Websner!
Welcome to Joomlart! Thanks for using and enjoying our product.
Regarding your question: how to remove ‘add to compare’ with JM Mesolite, this is the solution:
-- Open: app\design\frontend\default\jm_mesolite\layout\cat alog.xml and find this code:
Code:
<block type="core/template" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
comment it, it will become:
Code:
<!--<block type="core/template" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>-->
-- Copy "Catalog" directory from "app\design\frontend\base\defaulttemplate" to "app\design\frontend\default\jm_mesolitetempl ate"
-- Open "app\design\frontend\default\jm_mesolitetemplate\ catalog\product\list.phtml", Remove this code:
PHP Code:
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
<?php endif; ?>
About line 72 to 74 and 110 to 112.
-- Open "app\design\frontend\default\jm_mesolitetemplate\ catalog\product\view\addto.phpml", remove this code:
PHP Code:
<?php if($_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product) ): ?>
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
<?php endif; ?>
about line 33 to 35.
This will help you to complete remove "add to compare" feature in this theme.
Hope this helps and have a good day!
thanks for the quick reply. I tried what you mentioned but the template seemed to have some problems after. You mentioned in the steps that this is for JM Mesolite but I am using JM Morganite. Does it make a difference?
When I went to copy the catalog folder to "app\design\frontend\default\jm_morganitetemplate " the folder already existed. Do I over write the contents?
Dear websner!
Sorry for my mistake, I was wrong that you wanted to remove compare for mesolite theme. This is the correct instruction for you in removing compare function in jm morganite:
-- Open: app\design\frontend\default\jm_morganite\layout\ca talog.xml and find this code:
Code:
Code:
<block type="core/template" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
comment it, it will become:
Code:
<!--<block type="core/template" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>-->
-- Open "app\design\frontend\default\jm_morganitetemplate \ catalog\product\list.phtml", Remove this code:
PHP Code:
<?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
<?php endif; ?>
About line 77 to 80 and 117 to 119.
-- Copy "addto.phpml" from "app\design\frontend\base\defaulttemplate\catalog \product\view\" to "app\design\frontend\default\jm_morganitetemplate \ catalog\product\view\"
-- Open "app\design\frontend\default\jm_morganitetemplate \ catalog\product\view\addto.phpml", remove this code:
PHP Code:
<?php if($_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product) ): ?>
<li><span class="separator">|</span> <a href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
<?php endif; ?>
about line 33 to 35.
This will help you to complete remove "add to compare" feature in this theme.
Sorry again for this inconvenience.
that did the trick, thank you!
Hello, one more question regarding this topic. Now that I have removed ‘add to wishlist’ and ‘add to compare’, but ‘add items to cart’ box shows the word ‘OR’. Where do I remove that?
Dear Websner!
Welcome back! How you been?
Regarding your question, please change in:
app\design\frontend\base\defaulttemplate\catalog \product\view.phtml for product detail and app\design\frontend\base\defaulttemplate\catalog \product\list.phtml for product list.
Hope this helps and good luck!
Hi, thank you. That worked, I’m all set.
This question is now closed