This debug tool is showing layout, block,model functions and queries executed behind each page load in magento. it might be useful for debugging.
http://www.magentocommerce.com/magento-connect/magneto-debug-8676.html
Go to CMS> Manage Pages interface
Insert the below code in content area
{{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form.phtml"}}
Go to catalog/product/view.phtml
<?php $categories = $_product->getCategoryIds(); ?>
<?php foreach($categories as $i => $_category_id): ?>
<?php $_category = Mage::getModel('catalog/category')->load($_category_id) ?>
<a href="<?php echo $_category->getUrl() ?>"><?php echo $_category->getName() ?></a>
<?php endforeach; ?>
$(ul).mouseover(function() {
o.auto = 0;
});
$(ul).mouseout(function() {
o.auto = 1;
});
if(!running) {
if(!running && o.auto !=0 ) {
<global><models><catalogrule> <rewrite> <rule>Yourpackage_Yourmodule_Model_Rule</rule> </rewrite></catalogrule></models>
Create file called Rule.php in YOUR module Model directory.
Add this code in newly created file:
class Yourpackage_Yourmodule_Model_Rule extends Mage_CatalogRule_Model_Rule{ /** * Apply all price rules to product * * @param int|Mage_Catalog_Model_Product $product * @return Mage_CatalogRule_Model_Rule */ public function applyAllRulesToProduct($product) { $this->_getResource()->applyAllRulesForDateRange(NULL, NULL, $product); $this->_invalidateCache(); //Notice this little line Mage::app()->getCacheInstance()->cleanType('block_html'); $indexProcess = Mage::getSingleton('index/indexer')->getProcessByCode('catalog_product_price'); if ($indexProcess) { $indexProcess->reindexAll(); } }} var error = false, day = parseInt(this.day.value) || 0, month = parseInt(this.month.value) || 0, year = parseInt(this.year.value) || 0;
Replace:
var error = false, day = parseInt(this.day.value, 10) || 0, month = parseInt(this.month.value, 10) || 0, year = parseInt(this.year.value, 10) || 0; $_options = Mage::getResourceModel('eav/entity_attribute_option_collection') ->setStoreFilter(0) ->setAttributeFilter($attribute_id) ->setPositionOrder('asc') ->load();