Magento Theme with Mega / Exploded Menu and Cloud Zoom

As of 1.6.1 of Magento Community edition, there are no Cloud Zoom nor Exploded Menu in the default installation. You must either buy an extension to get these features into your theme or you can buy a theme that’s readily armed with them, like Avalanche.

avalanche themeAvalanche is probably the best theme available for Magento now, a truly premium one with unparalleled typography and layout design. It comes with Cloud Zoom for product images and a Mega Menu for the top navigation. You can enable or disable them in the Magento administrator configurations.

They also have a very technical and helpful blog frequently publishing tips and easy-to-follow guides for Magento store owners. Very useful if you want to make your store the star in the crowd. More magento themes will be released from there. Stay tuned.

What is options_container in Magento Core API?

You would notice there’s a field named options_container when you retrieve the information of a product by the product.info Magento API call. It is either ‘container1‘ or ‘container2‘.

What is it? What does it do?

It’s essentially a part of the product page layout, prescribing where the custom options of the product would be displayed. Typically, ‘container1‘ is up in the page near the price while ‘container2‘ is a bit down the page around the description area where horizontal rows are plenty. But this all depends on the theme being used.

What are msrp_enabled, msrp_display_actual_price_type and msrp in Magento API?

When you are playing with the product.info API of Magento to acquire the information of a specific product, you may scratch your head and wonder, what are these 3 fields and what do they do:

  1. msrp_enabled
  2. msrp_display_actual_price_type
  3. msrp

After trying and feeding test values to some of the fields in the Price tab of Product Information page (product editing page) in the administrator control panel, I finally found what these meant:

  1. msrp_enabled = Apply MAP (Minimum Advertised Price)
  2. msrp_display_actual_price_type = Display Actual Price
  3. msrp = Manufacturer’s Suggested Retail Price

Weird? Another case advocating terminology consistency in documentation.

In most cases, sticking to the default values would be fine. So before you are creating a product by the product.create API, use product.info to see what the default values are when the product is created from the administrator control panel.

Magento API SoapClient Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn’t load from…

I was just trying to make the Magento Core API web service to work so I could write my own automated scripts to perform scheduled manipulations on the entire database (products, attributes, categories, customers, etc.) of my Magento store. And when I tried the example here to list some of the products, it gave me this SoapClient error:

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://www.example.com/api/soap/?wsdl' : Extra content at the end of the document in \www\mapi.php:4 Stack trace: #0 \www\mapi.php(4): SoapClient->SoapClient('http://www.exam...') #1 {main} thrown in \www\mapi.php on line 4

Did some searches and finally solved the problem. What you need to do is to first download the WSDL file from your Magento installation with cURL and then open it with SoapClient rather than download the file with SoapClient.

This is the modified PHP code from the official example:

$curl = curl_init('http://www.example.com/api/soap/?wsdl');
curl_setopt($curl,CURLOPT_RETURNTRANSFER, true);

$wsdl_string = curl_exec($curl);

file_put_contents('temp.xml',$wsdl_string);

try
{
	$proxy = new SoapClient('temp.xml');
	$sessionId = $proxy->login('yourApiUser', 'yourApiKey');

	$filters = array(
		'sku' => array('like'=>'%')
	);

	$products = $proxy->call($sessionId, 'product.list', array($filters));

	var_dump($products);

}
catch (Exception $e)
{
	print '<pre>';
	var_dump(libxml_get_last_error());
	print '</pre>';
}

Just change ‘www.example.com’, ‘yourApiUser’ and ‘yourApiKey’ to your own.

Make Magento Products Always In-Stock and Never Out-of-stock

Most of the online merchants don’t manage inventory themselves and when the order comes in, they simply tap the factory or wholesaler to relay the products to the customers. Businesses in this manner, don’t quite need inventory management.

And they need to make all products in Magento to be permanently in-stock forever and NEVER out-of-stock. This way, they don’t have to: 1) select the In-stock status and enter a positive in-stock quantity every time creating the product, 2) nor modify the themes to not display Out-of-stock messages.

All right, here’s how to do it.

Log in the administrator control panel of Magento. Go to System -> Configuration -> Inventory -> Product Stock Options -> Select “Manage Stock” to “No“.

Simple, eh?

(ver 1.6.1.0)

Force URL Trailing Slash in Magento for SEO

The default Magento installation allows for URLs with and without trailing slashes. For example, the customer-service page is accessible at both URLs:

  • http://www.example.com/customer-service
  • http://www.example.com/customer-service/

This is really bad for SEO. The good practice is choose one of them as the uniform / canonical URL and redirect the other one to it in 301 HTTP code (Permanently Moved).

Then you should use the uniform one as the only URL to that page consistently across you entire site and across your link building endeavors.

We’ll use the second one here – forcing the URL to have a ending slash.

How to Force a Trailing Slash for Magento URLs?

The solution is simple. Just add this snippet immediately below the line of “RewriteEngine on” in the .htaccess file at the root of your Magento site:

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteCond %{REQUEST_URI} !(.*)\.(html|shtml|php)$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [L,R=301]

And all URLs without a trailing slash such as /customer-service would be automatically redirected to customer-service/ that’s with a trailing slash.

Optionally – get rid of ‘.html’ for product pages’ URLs

You may also want to get rid of the trailing ‘.html’ for product pages and category pages in your Magento admin panel by “System” -> “Configuration” -> “Catalog” -> “Search Engine Optimizations” or you would have URLs such as: http://www.example.com/blue-widget.html/ which is undesirable and said to cause crawling problems for Googlebot.

Don’t Count on The $1 Million Stimulus Fund

After signed up with the Going Places ($25 / month) plan, I kept contacting the support so that I could be qualified with the $1 Million Stimulus Fund which promises to rebate $15 to me every month for a year, making it just $10 / month.

But they never got back in this regard. They didn’t reply to any of my tickets requesting to be enrolled in the stimulus fund.

After reading some bottom fine print,

Participants must be at least 18 years of age. Magento reserves the right to modify or cancel this offer in whole or in part in its sole discretion at any time. Void to the extent prohibited by law.

It seemed to me they probably only endow these perks to promising merchants who are or more likely to be paying top dollars for the store hosting.

Just don’t take the $15 / month discount seriously when you are considering going with Magento Go. They probably don’t give it to everyone. You may never see it at all.