Magento Themes and Magento Extensions

How to Track Social Interaction with Google Analytics and AddThis

Share
Posted on October 31st, 2012 | Posted by admin

Tracking your websites social media interactions is becoming a necessary statistic in addition to your other visitor behavior demographics. For some websites, this may even be one of the more important statistics to track: A blog owner may want to see how often a post gets shared after its been published; An e-commerce website may want to know the most popular product among thousands of pages; Or even knowing how many times your page URL’s have been shared in other ways.

If you useGoogle Analytics and implemented this manually, adding social media actions tracking can be done in several ways, including Google’s Guide, which is flexible, yet not as quickly implemented as other methods. If you just need the tracking of basic actions, I suggest to use AddThis’ API.

Note: Keep in mind that after implementing Google Analytics, the tracking of Google Plusinteractions will already be integrated. By implementing the below snippets, tracking the actions for Facebook LikesTwitter and other AddThis plugins you may add will track-able as well.

Although AddThis has a WordPress, Magento and other plugins depending on your CMS, you may want to implement the AddThis codes manually anyway. For example, this snippet of code will include the standard Facebook Like, Tweet and Pin on Pinterest button:

Usage of image preloading for color swatch operation

Share
Posted on October 30th, 2012 | Posted by admin

Color Swatch is an often requirement for Magento Stores. You can find lots of Color Swatch Extensions and tutorials in the internet. Most of them are slow in speed in terms of swatching the image . So i am sharing some tips on overcoming that.

You just have to place the following code in app/design/frontend/*/*/catalog/product/view/media.phtml:

1
2
3
4
5
6
7
8
9
10
11
12
<script type="text/javascript">
jQuery(function(){
<?php
$count = 1;
foreach ($this->getGalleryImages() as $_image): ?>
var image<?php echo $count; ?> = jQuery('<img />').attr('src', '<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile()); ?>');
<?php
$count++;
endforeach;
?>
});
</script>

Magento XML RPC API – Invalid return payload: not-xmlrpc xml element NIL – for product.info

Share
Posted on October 29th, 2012 | Posted by admin

I am working for the Magento API as a server and XML RPC PHP from Joomla as a client to bring up the information of product from Magento. Today I found where the problem persists and I have some workarounds for the fixes. But the fixes are in the Core files of Magento and Joomla itself.

Here is my detailed explanation and fixes for the problem.

Problem

When I was working with the XML RPC Magento API, everything working just fine like creating customers, listing product attribute sets and attributes, listing products, etc. But when I came to get the product information of a particular product in a page and used following code:

How to delete an order from Magento database

Share
Posted on October 27th, 2012 | Posted by admin

How to delete an order from Magento database

Sometimes, when you have a bad order, then you might want to delete all the data connected to that bad order. So, here is how to do it.

Lets say, your order ID is 102455667

. So goto your phpmyadmin and run this SQL,

SET @increment_id = '102455667';

SELECT *
    FROM `sales_flat_quote_address_item`
    WHERE `sales_flat_quote_address_item`.`quote_address_id` IN (
        SELECT `address_id`
            FROM `sales_flat_quote_address`
            WHERE `sales_flat_quote_address`.`quote_id` IN (
            SELECT `entity_id`
                FROM `sales_flat_quote`
                WHERE `sales_flat_quote`.`reserved_order_id` = @increment_id
                )
        );

Quick Tip: Disable all Local Modules at Once

Share
Posted on October 25th, 2012 | Posted by admin

While going through the study guide for the Magento Developer Exam, I’ve been learning a few interesting details that are squirreled away in the Magento code, but can be useful in day to day Magento development.

For example, while going through the section on Module loading, it is revealed that we can easily disable all modules living in the local (app/code/local) namespace by editing app/etc/local.xml and setting thedisable_local_modules node to true:

1
2
3
4
5
6
7
8
<config>
<global>
...
<disable_local_modules>true</disable_local_modules>
...
</global>
...
</config>

Of course, if you have cache enable, clear or disable it to see the effects.

Page 1 of 712345»...Last »