Magento Themes and Magento Extensions

Magento Enterprise Tabs – How to select specific tab?

Share
Posted on May 18th, 2013 | Posted by admin

Magento Enterprise Tabs – How to select specific tab?

This is how tab config looks in - catalog.xml

01 <block type="catalog/product_view_description" name="product.description"as="description" template="catalog/product/view/description.phtml">
02 <action method="addToParentGroup"><group>detailed_info</group></action>
03 <action method="setTitle" translate="value"><value>Product Details</value></action>
04 </block>
05 <block type="catalog/product_view_attributes" name="product.attributes"as="additional" template="catalog/product/view/attributes.phtml">
06 <action method="addToParentGroup"><group>detailed_info</group></action>
07 <action method="addToParentGroup"><group>detailed_info</group></action>
08 <action method="setTitle" translate="value"><value>Additional Information</value></action>
09 </block>
10 <block type="cms/block" name="payment_options_tab" as="payment_options_tab"template="catalog/product/view/custom_tab_content.phtml">
11 <action method="setBlockId"><block_id>payment_options_tab</block_id></action>
12 <action method="addToParentGroup"><group>detailed_info</group></action>
13 <action method="setTitle" translate="value"><value>Payment Options</value></action>
14 </block>
15 <block type="cms/block" name="shipping_calculator_tab"as="shipping_calculator_tab"template="catalog/product/view/custom_tab_content.phtml">
16 <action method="setBlockId"><block_id>shipping_calculator_tab</block_id></action>
17 <action method="addToParentGroup"><group>detailed_info</group></action>
18 <action method="setTitle" translate="value"><value>Shipping Calculator</value></action>
19 </block>

content of - custom_tab_content.phtml

Log all SQL queries in Magento

Share
Posted on May 17th, 2013 | Posted by admin

In Varien_Db_Adapter_Pdo_Mysql

Magento : lib/varien/Db/Adapter/Pdo/Mysql.php
set
protected $_debug = true;
protected $_logAllQueries = true;

and (if nor already there) create the folder defined in

protected $_debugFile = ‘var/debug/sql.txt’;

Give read / write permission

Magento: Programmatically Modify Attribute Configuration

Share
Posted on May 16th, 2013 | Posted by admin

Magento: Programmatically Modify Attribute Configuration

I was asked programmatically modify a product attribute so that it was no longer searchable, and make a different attribute searchable instead. I wrote up the code and put it on our database updater module to run as an upgrade script, but you could put it anywhere you want. To modify an attribute, you can do the following:

Get rid of ?__store=default from your Magento links

Share
Posted on May 15th, 2013 | Posted by admin

If you’re like me, you make use of a lot of widget links within Magento, and those Widget links have a pesky habit of adding ?___store=default to the end of your URLs, which first of all don’t look nice and it certainly doesn’t help your optimisation efforts when it comes to SEO and ridding yourself of duplicate content.

This is a dead simple fix, and gives you peace of mind.

Simply copy the follow file: app/code/core/Mage/Catalog/Block/Widget/Link.php and paste it into app/code/local/Magento/Catalog/Block/Widget/Link.php

Then lines 89 – 92 need to be commented out. These lines look like this: (if it changes in future versions!)

Hiding (or Showing) Filters In Certain Categories

Share
Posted on April 25th, 2013 | Posted by admin

Layered Navigation Plus and Layered Navigation Positioning extensions, you can easily hide or show individual filters in certain categories. Here is how:

  1. Open category in which you’d like to hide certain filter.
  2. Go to “Custom Design” tab.
  3. In “Custom Layout Update” field, add: 
    <reference name=”mana.catalog.above_products.nav“>
    <action method=”setHideCategory“><value>1</value></action>
    </reference>
Page 3 of 16«12345»10...Last »