Magento: How To Setup / integrate Google Adwords Conversion Tracking?

Feb 12

Magento: How To Setup Google Adwords Conversion Tracking

Magento: How To Setup Google Adwords Conversion Tracking

Setting up Google Adwords Conversion Tracking on your Magento Community store is relatively easy – but it’s not a built-in Magento feature, so you’ll have to edit a template file. Here are the 4 simple steps that need to be done:

Read More

Magento: “There has been an error processing your request”

Jan 24

Symptoms
The following error message is shown instead of your usual Magento page:
There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: 1286489434787

Cause
Usually, it is caused by calling incompatible classes in themes, extensions or templates, database connectivity issues or resource shortage (i.e. insufficient diskspace or PHP memory_limit option).

Read More

Magento shows blank/empty page. How do I solve this?

Jan 24


Symptoms
Blank page is shown in Magento Frontend, Backend or Magento Connect Manager

Cause
If you see a blank page opening your Store in browser, it indicates that there is a PHP syntax error somewhere in the code of your site.
This usually happens when you modified files, templates or extensions manually, or installed a theme or extension with PHP syntax errors.

Troubleshooting
Before starting investigation please try to Disable Magento Compiler and Clear cached Magento data , in the most cases it should solve the issue.
To see the actual error message you need to login via FTP to your Store and use the following instructions:

Read More

Magento 1.6 Upgrade Errors with Solutions

Jan 12

Magento 1.6 Upgrade Errors with Solutions

Magento 1.6 Upgrade Errors with Solutions


After upgrading to Magento 1.6, You may face some problems like Integrity constraint violation: 1062 Duplicate entry or Error 404 after installation(while home page is OK).

Read More

Setting a new theme for a developer only

Nov 24

I found a really simple solution:

- I made another store wiew
- I assigned a new theme to it
- I removed store view list from pages

now, I can easily switch between themes:
……/?___store=new_theme – new theme for developing purposes
……/?___store=default – current theme

and customers will still see and old theme

Read More

How to set the default sort order for catalog pages?

Nov 17

If you only want to change default sort order you can do it in catalog.xml just by adding the following action:

<action method="setDefaultDirection"><dir>desc</dir></action>

This action will work in any block of type “catalog/product_list_toolbar”, so the XML snippet would be:

<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
        <action method="setDefaultDirection"><dir>desc</dir></action>
    <!-- The following code shows how to set your own pager increments -->
    <!--
        <action method="setDefaultListPerPage"><limit>4</limit></action>
        <action method="setDefaultGridPerPage"><limit>9</limit></action>
        <action method="addPagerLimit"><mode>list</mode><limit>2</limit></action>
        <action method="addPagerLimit"><mode>list</mode><limit>4</limit></action>
        <action method="addPagerLimit"><mode>list</mode><limit>6</limit></action>
        <action method="addPagerLimit"><mode>list</mode><limit>8</limit></action>
        <action method="addPagerLimit" translate="label"><mode>list</mode><limit>all</limit><label>All</label></action>
    -->
</block>

This block is used twice in catalog.xml once for normal product lists and once for layered navigation product lists, so just make the same change in both places.

///////////// uncompleted //////////////

<action method="setDefaultOrder"><field>entity_id</field></action>
Read More

Cron Job: Auto Index Management

Nov 09

php /home/USERACCOUNT/public_html/shell/indexer.php reindexall
Read More

Make a direct link on Magento editor

Oct 19

<a href="{{store direct_url=category.html}}">Link</a>
Read More

Make four columns on grid view instead of three columns

Oct 12

Make four columns on grid view instead of three columns

{{block type="catalog/product_list" template="catalog/product/list.phtml" category_id="39" column_count="4"}}
Read More

How to create a Random Featured Product list on home page in Magento?

Oct 12

If you want to show products from a specific category on your home page you can do this simply with

{{block type="catalog/product_list" category_id="12" template="catalog/product/list.phtml"}}

on your home page which works fine.. however, if you want these products to be randomly selected you hit problems.

The obvious thing to try is

{{block type="catalog/product_list_random" category_id="12" template="catalog/product/list.phtml"}}

however, this displays random products from EVERY category!!

The reason for this is that the file random.php does not work as advertised so we need to create a new version that does. We do not want to break upgrade compatibility so create the following directory structure.

in app/code/local create Mage/Catalog/Block/Product/List

eg mkdir -p Mage/Catalog/Block/Product/List

In your new List directory create the following file called Random.php

<?php
class Mage_Catalog_Block_Product_List_Random extends Mage_Catalog_Block_Product_List
{
    protected function _getProductCollection()
    {
        if (is_null($this->_productCollection)) {
            $categoryID = $this->getCategoryId();
            if($categoryID)
            {
              $category = new Mage_Catalog_Model_Category();
              $category->load($categoryID); // this is category id
              $collection = $category->getProductCollection();
            } else
            {
              $collection = Mage::getResourceModel('catalog/product_collection');
            }
            Mage::getModel('catalog/layer')->prepareProductCollection($collection);
            $collection->getSelect()->order('rand()');
            $collection->addStoreFilter();
            $numProducts = $this->getNumProducts() ? $this->getNumProducts() : 3;
            $collection->setPage(1, $numProducts)->load();

            $this->_productCollection = $collection;
        }
        return $this->_productCollection;
    }
}

To call this on your home page open your Home page in CMS > Static Pages

and in Content add

{{block type="catalog/product_list_random" category_id="YOUR_CATEGORY_ID" template="catalog/product/list.phtml" column_count="4" num_products="12"}}

Create a new hidden category and add the products you wish to randomly select from. Find the category ID of this category and enter this number in the above place marker.

You will find that although you are seeing the Category display tool bar (drid view / list view / show.. etc) it has no effect on the layout. the default layout is 3 x 3 grid which is where column_count=”4″ comes into play. Alter this to meet your themes needs. Same goes for num_products=”12″.

And that is that.

Don’t want to be looking at the grid.. hide it. (evil hack alert)

Add

<style type="text/css">
.toolbar {display:none;}
</style>

at the top of your Content area on the homepage CMS. this will hide the tool bar for just the homepage.
References:
Thanks to mac75a here : http://www.magentocommerce.com/boards/viewthread/72319/ and andytm here: http://www.magentocommerce.com/boards/viewthread/72319/

Read More