I am using firegento magesetup in my magento 1.9.3.4 store. Magesetup adds tax-details and shipping cost details to my category pages which i don't need/want as it hurts my SEO. In their Faq they advice to make a custom module with an event/observer that removes these details.
I've made a custom module based on their faq but it doesn't work..
Here is my setup:
app/etc/Modules/
app/code/local/Mycustom/
app/code/local/Mycustom/Taxremover/
app/code/local/Mycustom/Taxremover/etc
app/code/local/Mycustom/Taxremover/Model
app >> etc >> modules >> Mycustom_Taxremover.xml
<?xml version="1.0"?>
<config>
<modules>
<Mycustom_Taxremover>
<codePool>local</codePool>
<active>true</active>
</Mycustom_Taxremover>
</modules>
</config>>
app >> code >> local >> has a Mycustom directory with Taxremover directory that has etc and Model directories in it
etc has> config.xml with
<?xml version="1.0"?>
<config>
<modules>
<Mycustom_Taxremover>
<version>0.0.1</version>
</Mycustom_Taxremover>
</modules>
<global>
<models>
<mycustom_taxremover>
<class>Mycustom_Taxremover_Model</class>
</mycustom_taxremover>
</models>
</global>
<frontend>
<events>
<magesetup_after_product_price>
<observers>
<mycustom_taxremover>
<type>singleton</type>
<class>mycustom_taxremover/observer</class>
<method>removeMageSetupPriceHint</method>
</mycustom_taxremover>
</observers>
</magesetup_after_product_price>
</events>
</frontend>
</config>
Model has> Observer.php
<?php
/**
* @mageEvent magesetup_after_product_price
*
* @param type $event
*/
public function removeMageSetupPriceHint($event)
{
if(in_array('catalog_category_view', Mage::app()->getLayout()->getUpdate()->getHandles()) || in_array('catalogsearch_result_index', Mage::app()->getLayout()->getUpdate()->getHandles()))
{
$obj = $event->getHtmlObj();
$obj->setPrefix('');
$obj->setHtml('');
$obj->setSuffix('');
}
}
?>
the result is that only 1 product is shown on a category page and only the product Image and Title is visible, all other divs and the spans with the tax details and shippings cost details are gone. inlcuding the product price.