Magento Themes and Magento Extensions

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.

Magento – Add a new tab on customer edit page

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

This version touches core files. Please make backup before you get started.

In Magento: I am going to add ‘Survey’ tab and display text

1. Open /app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php
Inside _beforeToHtml() method, add the following code

1 $this->addTab('Survey',array(
2 'label' =>Mage::helper('customer')-&gt;__('Survey'),
3 'class' => 'ajax',
4 'url' => $this->getUrl('*/*/survey',array('_current'=>true)),
5 ));

How to Add Categories in Magento

Share
Posted on October 23rd, 2012 | Posted by admin

Adding new categories in Magento is simple. Go to Catalog > Manage Categories page. Select parent category to which you want to add new one by clicking on it on the category tree shown on the left side of the form. Parent category values will be filled in the category form on the main part of the editor form. To add new category, click on the ‘Add Subcategory’ button on the left top side of the editor. Once the form values are cleared, you can start filling the new category data. Most of the available fields are self explanatory.
Is Active – defines if category is visible to site visitors

Display Mode

Products Only – category will only show products

Static Block Only – show only static block defined on next attribute (do not show products)