When extracting a product attribute data using SOAP, the usual approach is to create a standard class and identify the common fields in the attributes property as shown below:

$proxy = new SoapClient('http://your.magento.domain/api/v2_soap/?wsdl');
$sessionId = $proxy->login('username', 'password!');
$product = new stdclass();
$product->attributes = array(
$data = $proxy->catalogProductInfo($sessionId, $sku, null, $product);

The above var_dump() would show the values of requested fields except the custom_attribute_code. The reason for this is because a custom product attribute is available in additional_attributes property instead.

Get custom product attribute:

To get the value of custom_attribute_code, use the following code:

$proxy = new SoapClient('http://your.magento.domain/api/v2_soap/?wsdl');
$sessionId = $proxy->login('username', 'password!');
$product = new stdClass();
$product->additional_attributes = array('custom_attribute_code');
$data = $proxy->catalogProductInfo($sessionId, $sku, null, $product);

One of my clients would like to add additional HTML attributes for SEO purposes as well as to keep line breaks after saving a CMS block or page in the Magento Admin.


To do that, you must open the file js/mage/adminhtml/wysiwyg/tiny_mce/setup.js and locate the line below:

var settings = {

Right after the code plugins : plugins, add the lines highlighted in grey:

        var settings = {
            mode : (mode != undefined ? mode : 'none'),
            elements : this.id,
            theme : 'advanced',
            plugins : plugins,
            forced_root_block: false,
            extended_valid_elements: '+ul[*],+li[*],+p[*],+span[*],+div[*],+a[*]',
            remove_linebreaks : false,
            theme_advanced_buttons1 : magentoPlugins ...

Save the file and clear your cache to apply the changes.

It is common for companies with a huge product database to always have an ERP that manages their product updates. With an external service, it normally utilises the built-in Magento API. Calling the method catalogProductCreate using a SOAP service, one of the possible issues that may arise is the one below: Read the rest of this entry »

I came across a persistent issue where the admin user is unable to save any configuration in the administration window and would only be greeted with the error below:

Invalid timezone error

Invalid timezone error showing in the System > Configuration window in Magento admin.

Read the rest of this entry »

Is your checkout page failing whenever you enable Fontis’ Direct Deposit payment option? Try checking your logs to see if there’s a similar error like the one below:

Parse error: parse error in /app/design/frontend/base/default/template/fontis/australia/ payment/directdeposit/form.phtml on line 42

Read the rest of this entry »

The default Magento catalog grid is set to display 3 products per column. Most users alter the number of columns by modifying the file catalog/product/list.phtml. There’s actually a much cleaner approach to this task and you only need to modify an XML file.
Read the rest of this entry »

I recently installed a WordPress blog in my localhost using Mac OS X’s built in Apache and PHP with MySQL to test a functionality when I decided to update the permalinks to use a different format other than the default setting. When I tested the new URL, I was greeted with the following error:

Not Found
The requested URL /~user/wordpress/category/sample/ was not found on this server.
Apache/2.2.21 (Unix) DAV/2 PHP/5.3.10 with Suhosin-Patch Server at localhost Port 80

Read the rest of this entry »

I want to setup a development environment for the Mage Enabler for WordPress plugin in my new desktop so I downloaded the latest copy of Magento Community Edition which is version at the time of this writing. I used the sample data provided from the Magento download page and used all the default values.

Read the rest of this entry »

I’ve been working for the past few days with jQuery and one of the task was to manipulate HTML forms before submitting it for processing. What I needed to do is to process a form having multiple submit buttons and select tags. These set of select tags requires all values to be selected on submit.

Read the rest of this entry »

I’ve been receiving a lot of inquiries on how to create a new customer record on the fly using Mage.php or using the plugin Mage Enabler for WordPress. So, to save you time and also to provide a thread for this specific topic, here’s how to accomplish it.

Read the rest of this entry »

I needed a plugin that can show random quotes with author options as well and I found Stray Random Quotes WordPress plugin could do the trick. The only problem is, the function to display the random quote directly outputs the text onscreen together with the author.

Read the rest of this entry »

About my blog

This blog is targeted towards all levels of developers and also designers. Various topics are discussed such as Magento, PHP & MySQL, jQuery, WordPress, CSS and HTML.


Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 5,249 other subscribers

WordPress + Magento

Recent Trackbacks



All entries in this blog are my opinion and don't necessarily reflect the opinion of my employer or my mom.