<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>
    
    <title>IcebergCommerce.com/Software</title>
    <link>http://icebergcommerce.com/software/blog/iss/</link>
    <description>Magento Extensions, Widgets, Free Stuff, and common problems and solutions</description>
    <dc:language>en</dc:language>

    <dc:rights>Copyright 2011</dc:rights>
    <dc:date>2011-04-27T00:41:16+00:00</dc:date>
    <admin:generatorAgent rdf:resource="http://www.pmachine.com/" />
    

    <item>
      <title>Set Up Promotions using the Magento Auto Add to Cart Extension</title>
      <link>http://icebergcommerce.com/software/blog/iss/article/magento&#45;automatically&#45;add&#45;products&#45;to&#45;cart&#45;or&#45;basket/</link>
<image></image>
      <description><![CDATA[<p>
<a href="http://icebergcommerce.com/software/magento-auto-add-to-cart-extension.html" title="Magento Extension - Auto Add to cart is now even Better">
<img src="http://static-iceb.org/iss/images/banners/homepage/magento-auto-add-to-cart-extension-banner.jpg" width="728" height="202" alt="Magento Auto Add to Cart Extension has more new features"/>
</a>
</p>
<p>
The Popular <a href="http://icebergcommerce.com/software/magento-auto-add-to-cart-extension.html">Auto Add to Basket/Cart Magento Extension</a> by Iceberg Commerce has gotten even better with more new features!
</p>

<p>
Our best selling extension now offers the following list of features:
<div>
<ul class="disc">
<li>Assign one or more products to be auto added</li>
<li>Bulk update products to set the auto added products</li>
<li>Auto add products from the Admin</li>
<li>Auto add products from the Frontend</li>
<li>Follows stock rules stock status, max and min quantity rules</li>
<li>Auto Added Products will match quantity of product added to the cart</li>
<li>Auto added products are removed from the basket/cart if the main product is removed</li>
<li>Allows a free item to be automatically added to the cart/basket.</li>
<li>Allows a free gift to be automatically added to the cart/basket.</li>
<li>Set up Buy X get Y free rules</li>
<li>Compatible with all versions of Magento</li>
</ul>
</div>


</p>

<p><a href="http://icebergcommerce.com/software/magento-auto-add-to-cart-extension.html">Check it out here</a></p>

]]></description>
      <dc:subject>Magento, Extensions</dc:subject>


      <dc:date>2011-04-27T00:41:16+00:00</dc:date>

    </item>

    <item>
      <title>Listing Products on Your Magento Homepage</title>
      <link>http://icebergcommerce.com/software/blog/iss/article/listing&#45;products&#45;on&#45;your&#45;magento&#45;homepage/</link>
<image></image>
      <description><![CDATA[<p>
The question we get most often is how to embed products on Magento store homepages.  We have the answer, and its easy - use widgets!
</p>

<p>
Iceberg Commerce is leading the way, offering a wide range of Widgets that allow you to publish dynamic content on your store's homepage. The only requirement is Magento 1.4 or newer.
</p>

<p>
With just a few clicks, you can add a listing/grid of products.
</p>

<p>
But there is more!  You can filter products by attributes or categories.  Which means you can create landing pages for each manufacturer, product type, etc...
</p>

<p>
Try it out today - the <a href="http://icebergcommerce.com/software/magento-category-product-list-widget.html">Product List Plus Widget for Magento</a>.
</p>

<p>
We also have a <a href="http://icebergcommerce.com/software/magento-list-manufacturer-products-widget.html">free version</a> that allows you to list products by manufacturer only.
</p>

<img src="http://icebergcommerce.com/software/images/ee/homepage-products-list-magento.jpg" style="border: 0;" width="653" height="481" />

]]></description>
      <dc:subject>Magento, Widgets, SEO</dc:subject>


      <dc:date>2011-04-26T23:53:14+00:00</dc:date>

    </item>

    <item>
      <title>Magento Product Compare</title>
      <link>http://icebergcommerce.com/software/blog/iss/article/magento&#45;product&#45;compare&#45;embed/</link>
<image></image>
      <description><![CDATA[<p>
Magento has a great built in feature to allow customers to compare products side by side as they browse your store.
</p>

<p>
The missing piece with the Magento compare has been the ability to create comparison pages similar to how apple presents comparison pages for their MacBook models, ipads models, and iMac models.
<img src="http://icebergcommerce.com/software/images/ee/macbook-compare.jpg" style="border: 0;" width="730" height="377" />
</p>

<p>
Iceberg Commerce has built a great add on to allow you to do just that!
</p>

<p>
Using the <a href="http://icebergcommerce.com/software/magento-product-compare-static-embed-widget.html">Product Comparison Magento Widget by Iceberg Commerce</a>, you can embed product comparisons and embed them anywhere on your store.
</p>

<p>
This means that customers no longer have to pick which products to compare.  You build the comparison and embed it in your store.  Customers and search engines will then have easy access to the information about your top products.
</p>
<!--
<img src="http://icebergcommerce.com/software/images/ee/product-compare-frontend-magento-widget.png" style="border: 0;" width="730" height="600" />
-->
<p>
<a href="http://icebergcommerce.com/software/magento-product-compare-static-embed-widget.html">Check out the widget by clicking here.</a>

</p>
]]></description>
      <dc:subject>Magento, Widgets</dc:subject>


      <dc:date>2011-04-26T23:45:23+00:00</dc:date>

    </item>

    <item>
      <title>Increase Productivity Using Magento Widgets</title>
      <link>http://icebergcommerce.com/software/blog/iss/article/increase&#45;productivity&#45;using&#45;magento&#45;widgets/</link>
<image><img src="http://icebergcommerce.com/software/images/ee/magento-widgets-logo.png" style="border: 0;" width="325" height="70" /></image>
      <description><![CDATA[<img src="http://icebergcommerce.com/software/images/ee/magento-widgets-logo.png" style="border: 0;" width="325" height="70" /><p>
<a href="">Magento Widgets</a> have been around since Magento version 1.4.&nbsp; Using Magento Widgets, you can bring in rich dynamic data on your Homepage, CMS pages, and CMS blocks.
</p>

<p>
By Default, Magento 1.4 and higher come with widgets that allow you to add cms page links, category page links, product links, embed cms blocks, embed new products, and list recently compared and viewed products.
</p>

<p>
Iceberg Commerce is leading the way with a wide range of productivity widgets aimed at Magento store owners, managers, content creators.
</p>

<p>
Using <a href="">Magento Widgets built by Iceberg Commerce</a>, with just a few clicks you can add the following content anywhere in your store.:
<ul class="disc">
<li> <a href="http://icebergcommerce.com/software/magento-product-embed-widget.html">embed single products</a>
<li> <a href="http://icebergcommerce.com/software/magento-category-product-list-widget.html">embed listing of products</a>
<li> <a href="http://icebergcommerce.com/software/magento-product-reviews-widget.html">embed listing of product reviews</a>
<li> <a href="http://icebergcommerce.com/software/magento-product-compare-static-embed-widget.html">embed products comparisons</a>
<li> <a href="http://icebergcommerce.com/software/magento-product-list-by-tags-widget.html">embed tagged products</a>
<li> <a href="http://icebergcommerce.com/software/magento-products-list-search-keywords-widget.html">embed a product search</a>
</ul>

<p>&nbsp;</p>]]></description>
      <dc:subject>Magento, Widgets, SEO</dc:subject>


      <dc:date>2011-04-26T23:15:10+00:00</dc:date>

    </item>

    <item>
      <title>SEO Tip &#45; Changing Magento Product Review Page Titles</title>
      <link>http://icebergcommerce.com/software/blog/iss/article/seo&#45;tip&#45;changing&#45;magento&#45;product&#45;review&#45;page&#45;titles/</link>
<image></image>
      <description><![CDATA[<p>
Out of the box, Magento doesn't set a page title for individual product review pages.  This results in a missed SEO opportunity and many duplicate titles.
</p>

<p>Here is a quick way to set the page title in the following format:</p>
<div class="orange-highlight"><pre>(Product Name) Review - (Review Title)</pre></div>

<br/>

<p>
In order to do this, open up the following file:
</p>
<div class="orange-highlight"><pre>app/code/core/Mage/Review/Block/View.php</pre></div>

<br/>

<p>
Add in the following code:
</p>

<pre class="php" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">/**</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;* Set Page title</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;*/</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000000; font-weight: bold;">function</span> _prepareLayout<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #000088;">$headBlock</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getLayout</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getBlock</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'head'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$headBlock</span><span style="color: #009900;">&#41;</span> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    	<span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$product</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getProductData</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    	<span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    		<span style="color: #000088;">$title</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$product</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' Review'</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    	<span style="color: #009900;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$review</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getReviewData</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    	<span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    		<span style="color: #000088;">$title</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$review</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getTitle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    	<span style="color: #009900;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    	<span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/implode"><span style="color: #990000;">implode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' - '</span><span style="color: #339933;">,</span> <span style="color: #000088;">$title</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #000088;">$headBlock</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setTitle</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$title</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #009900;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #b1b100;">return</span> parent<span style="color: #339933;">::</span>_prepareLayout<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span></div></li></ol></pre>

<p>
If you do not want to modify core files, copy this file to:
</p>
<div class="orange-highlight"><pre>app/code/local/Mage/Review/Block/View.php</pre></div>

<br/>

This has been tested and confirmed to work in Magento 1.3, 1.4.*, 1.5.0.1, 1.5.1.0

<br/>
<br/>

<p>
The <a href="http://icebergcommerce.com/software/magento-seo-product-review-urls.html">Magento SEO Product Review URLs Extension</a>  by Iceberg Commerce has SEO Friendly URLs for all product review pages in addition to the SEO Friendly Page titles for product reviews that are outlined in this blog.
</p>
<br/>


]]></description>
      <dc:subject>Magento, SEO, Problems and Solutions, Code Snippits</dc:subject>


      <dc:date>2010-12-15T18:55:42+00:00</dc:date>

    </item>

    <item>
      <title>Easy Magento Checkout Page Improvements</title>
      <link>http://icebergcommerce.com/software/blog/iss/article/easy&#45;magento&#45;checkout&#45;page&#45;improvements/</link>
<image></image>
      <description><![CDATA[<p>Here are a couple of easy improvements that you can make to your Magento store checkout page in order to eliminate a few extra clicks for customers. All it takes is 2 lines of javascript.</p>

<h4>(1) Select "Checkout as Guest" by default</h4>

<img src="http://icebergcommerce.com/software/images/ee/checkout-as-guest.png" style="border: 0;" width="690" height="318" />

<br/><br/>

<h4>(2) Select "Ship to this Address" by default</h4>

<p>If you notice that most customers use the same billing and shipping address, you may want to select the "Ship to this Address" option by default so that customers can skip the shipping address step.
</p>

<img src="http://icebergcommerce.com/software/images/ee/biling-shipping-address-same.png" style="border: 0;" width="689" height="543" />

<br/><br/>

<p>
In order to set these defaults, you need to modify the opcheckout.js file located at:
</p>
<pre>    frontend/base/default/js/opcheckout.js</pre>


<br/>


<p>
(* Note, you may want to move this file to frontend/default/default/js/opcheckout.js and modify it there to avoid modifying core magento code)
</p>

<p>
Add this code to the end of the initialize function:
</p>
<pre class="php" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">initialize<span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>accordion<span style="color: #339933;">,</span> urls<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #339933;">...</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #666666; font-style: italic;">// Set guest checkout by default</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'login:guest'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> $<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'login:guest'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>checked<span style="color: #339933;">=</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #666666; font-style: italic;">// Set shipping = billing by default</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'billing:use_for_shipping_yes'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> $<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'billing:use_for_shipping_yes'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>checked<span style="color: #339933;">=</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li></ol></pre>

<p>
Then refresh your browser cache and test it out.
</p>
<p>
Keep in mind that when you update Magento, the opcheckout.js file may be different in the new version, so you may have to do this change again.
</p>




]]></description>
      <dc:subject>Magento, Problems and Solutions, Code Snippits</dc:subject>


      <dc:date>2010-09-10T05:16:00+00:00</dc:date>

    </item>

    <item>
      <title>Edit Magento CMS Page Breadcrumbs</title>
      <link>http://icebergcommerce.com/software/blog/iss/article/edit&#45;magento&#45;cms&#45;page&#45;breadcrumbs/</link>
<image></image>
      <description><![CDATA[<p>
Have you ever wanted to edit the breadcrumbs on a CMS Page in Magento?
</p>

<p>
We have built a simple extension that has made it easier to edit breadcrumbs.&nbsp; It makes it easy to remove breadcrumbs on some CMS pages and add multi-level breadcrumbs as well.
</p>

<p>Here is the link with more information: <a href="http://icebergcommerce.com/software/magento-cms-breadcrumbs-extension.html" title="Custom CMS Breadcrumbs for Magento">Custom CMS Breadcrumbs for Magento</a>
</p>

<p>
Here is a screenshot of the interface that the extension adds to the CMS edit page:
<img src="http://icebergcommerce.com/software/images/ee/03-custom.png" style="border: 0;" width="693" height="522" />
</p>

<p>
If you only have a small number of CMS pages, then you may just want to edit the layout xml to achieve the same result. To edit the Layout xml, go to a CMS Page then  &#8220;Design > Layout Update XML&#8221; and paste in the following code (you can edit the link,title,name,label of each breadcrumb):
</p>

<p><pre class="php" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&lt;</span>reference name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;root&quot;</span><span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #339933;">&lt;</span>action method<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;unsetChild&quot;</span><span style="color: #339933;">&gt;&lt;</span>alias<span style="color: #339933;">&gt;</span>breadcrumbs<span style="color: #339933;">&lt;/</span>alias<span style="color: #339933;">&gt;&lt;/</span>action<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #339933;">&lt;</span>block type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;page/html_breadcrumbs&quot;</span> name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;breadcrumbs&quot;</span> <span style="color: #b1b100;">as</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;breadcrumbs&quot;</span><span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #339933;">&lt;</span>action method<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;addCrumb&quot;</span><span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">			<span style="color: #339933;">&lt;</span>crumbName<span style="color: #339933;">&gt;</span>Home<span style="color: #339933;">&lt;/</span>crumbName<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">			<span style="color: #339933;">&lt;</span>crumbInfo<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">				<span style="color: #339933;">&lt;</span>label<span style="color: #339933;">&gt;</span>Home<span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">				<span style="color: #339933;">&lt;</span>title<span style="color: #339933;">&gt;</span>Home<span style="color: #339933;">&lt;/</span>title<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">				<span style="color: #339933;">&lt;</span>link<span style="color: #339933;">&gt;/&lt;/</span>link<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">			<span style="color: #339933;">&lt;/</span>crumbInfo<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #339933;">&lt;/</span>action<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #339933;">&lt;</span>action method<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;addCrumb&quot;</span><span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">			<span style="color: #339933;">&lt;</span>crumbName<span style="color: #339933;">&gt;</span>Crumb <span style="color: #cc66cc;">1</span><span style="color: #339933;">&lt;/</span>crumbName<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">			<span style="color: #339933;">&lt;</span>crumbInfo<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">				<span style="color: #339933;">&lt;</span>label<span style="color: #339933;">&gt;</span>Crumb <span style="color: #cc66cc;">1</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">				<span style="color: #339933;">&lt;</span>title<span style="color: #339933;">&gt;</span>Crumb <span style="color: #cc66cc;">1</span><span style="color: #339933;">&lt;/</span>title<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">				<span style="color: #339933;">&lt;</span>link<span style="color: #339933;">&gt;/</span>crumb1<span style="color: #339933;">&lt;/</span>link<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">			<span style="color: #339933;">&lt;/</span>crumbInfo<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #339933;">&lt;/</span>action<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #339933;">&lt;</span>action method<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;addCrumb&quot;</span><span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">			<span style="color: #339933;">&lt;</span>crumbName<span style="color: #339933;">&gt;</span>Crumb <span style="color: #cc66cc;">2</span><span style="color: #339933;">&lt;/</span>crumbName<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">			<span style="color: #339933;">&lt;</span>crumbInfo<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">				<span style="color: #339933;">&lt;</span>label<span style="color: #339933;">&gt;</span>Crumb <span style="color: #cc66cc;">2</span><span style="color: #339933;">&lt;/</span>label<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">				<span style="color: #339933;">&lt;</span>title<span style="color: #339933;">&gt;</span>Crumb <span style="color: #cc66cc;">2</span><span style="color: #339933;">&lt;/</span>title<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">			<span style="color: #339933;">&lt;/</span>crumbInfo<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #339933;">&lt;/</span>action<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #339933;">&lt;/</span>block<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&lt;/</span>reference<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li></ol></pre></p>

<p>
</p>]]></description>
      <dc:subject>Magento, Extensions, SEO, Problems and Solutions, Code Snippits</dc:subject>


      <dc:date>2010-08-20T22:33:17+00:00</dc:date>

    </item>

    <item>
      <title>Magento Configurable Products &#45; Setting Default Value for Options</title>
      <link>http://icebergcommerce.com/software/blog/iss/article/magento&#45;configurable&#45;products&#45;setting&#45;default&#45;value&#45;for&#45;options/</link>
<image></image>
      <description><![CDATA[<p>
Have you ever wanted to be able to set the default value for options on configurable products?&nbsp; We did!&nbsp; So we decided to build this into our stores.
</p>

<p>
We use this feature for:
<ul class="disc">
	<li>Allowing us to default options to the most popular options to save customers those extra few clicks</li>
	<li>Lets us display search and category listings with all our available color options - just like Zappos!</li>
</ul>
</p>

<p>&nbsp;</p><br/>

<h2>Our Solution</h2>

<p>
To add this feature to our stores, we developed an extension that we are currently using internally. It adds radio buttons on the product edit page beside configurable options, allowing you to specify a default value.&nbsp; Then on the frontend, there is logic to set the correct values in the product option dropdowns.&nbsp; We were able to do this without any modification to core code.
</p>

<p>
</p><p>
The default behavior in Magento for configurable products is for the options to default to &#8220;Choose an option&#8221;.&nbsp;  There is no way to specify a default value to automatically be selected.
<p> This extra feature we added lets us default options to any value we want.
Another added benefit is that we can list products like popular online sites like Zappos.&nbsp; We wanted the ability to list products on category and search grids in all available colors.&nbsp; To do this, we create a configurable product for each color.&nbsp; Then for each of the configurable products, we set a different default color. This way, a customer has the ability to see all colors on the product page, and they can still switch to any other color they desire.&nbsp; Check it out <a href="http://helmetsandarmor.com/poc-helmets.html" target="_blank">here</a>.
</p>

<p style="padding"10px" class="yellow-highlight"><strong>
Update August 24 / 2010 - We have made this into an extension <br/>
<a href="http://icebergcommerce.com/software/magento-configurable-product-default-options-extension.html">Available Here</a>.</strong>
<br/>
The extension does not modify any core code, is very high quality code, and tested thoroughly.
</p>

<p>&nbsp;</p>

<h2><p>
Here are some screenshots:
</p></h2>

<p>
<h4>1. Editing a configurable product, we can set the default value for an option by clicking a radio button:</h4>
<br/>
<img src="http://icebergcommerce.com/software/images/ee/configurable-options-default-value-admin.jpg" style="border: 0;" width="690" height="385" />
</p>

<p>&nbsp;</p><br/>

<p>
<h4>2. When a customer goes to a product, they see this default option selected for them:</h4>
<br/>
<img src="http://icebergcommerce.com/software/images/ee/configurable-options-default-value-frontend.jpg" style="border: 0;" width="690" height="368" />
</p>

<p>
</p><br/>

<p>
</p><h2>An Alternative Javascript Method</h2>

<p>
If you don&#8217;t have many products, there is a way to get the same type of behavior using a javascript &#8220;hack&#8221;.
</p>

<p>
This snippet of code, can be placed on a product page and it will select the first value for each configurable option.
With a little modification, you can modify it so that it selects a specific option.
</p>

<p><pre class="php" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">function</span> fireEvent<span style="color: #009900;">&#40;</span>element<span style="color: #339933;">,</span>event<span style="color: #009900;">&#41;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>document<span style="color: #339933;">.</span>createEventObject<span style="color: #009900;">&#41;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #666666; font-style: italic;">// dispatch for IE</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #000000; font-weight: bold;">var</span> evt <span style="color: #339933;">=</span> document<span style="color: #339933;">.</span>createEventObject<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #b1b100;">return</span> element<span style="color: #339933;">.</span>fireEvent<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'on'</span><span style="color: #339933;">+</span>event<span style="color: #339933;">,</span>evt<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #009900;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #b1b100;">else</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #666666; font-style: italic;">// dispatch for firefox + others</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #000000; font-weight: bold;">var</span> evt <span style="color: #339933;">=</span> document<span style="color: #339933;">.</span>createEvent<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;HTMLEvents&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		evt<span style="color: #339933;">.</span>initEvent<span style="color: #009900;">&#40;</span>event<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// event type,bubbling,cancelable</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #b1b100;">return</span> <span style="color: #339933;">!</span>element<span style="color: #339933;">.</span>dispatchEvent<span style="color: #009900;">&#40;</span>evt<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #009900;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Event<span style="color: #339933;">.</span>observe<span style="color: #009900;">&#40;</span>window<span style="color: #339933;">,</span> <span style="color: #0000ff;">'load'</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #000000; font-weight: bold;">var</span> spConfigIndex <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span>spConfigIndex<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> spConfigIndex<span style="color: #339933;">&lt;</span>spConfig<span style="color: #339933;">.</span>settings<span style="color: #339933;">.</span>length<span style="color: #339933;">;</span> <span style="color: #339933;">++</span>spConfigIndex<span style="color: #009900;">&#41;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		spConfig<span style="color: #339933;">.</span>settings<span style="color: #009900;">&#91;</span>spConfigIndex<span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span>selectedIndex <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	    obj <span style="color: #339933;">=</span> spConfig<span style="color: #339933;">.</span>settings<span style="color: #009900;">&#91;</span>spConfigIndex<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// this grabs the first select item</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	    Event<span style="color: #339933;">.</span>observe<span style="color: #009900;">&#40;</span>obj<span style="color: #339933;">,</span><span style="color: #0000ff;">'change'</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	    fireEvent<span style="color: #009900;">&#40;</span>obj<span style="color: #339933;">,</span><span style="color: #0000ff;">'change'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// this simulates selecting the first option, which triggers</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #009900;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li></ol></pre></p>

<div  style="padding"10px" class="yellow-highlight">
<h6>UPDATE - August 11 / 2010</h6>
<p> Here is an updated version of the code above.&nbsp; It adds a small delay in between selecting each configurable option.&nbsp; This allows just enough time for the next select box to load up.</p>
</div>

<p><pre class="php" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">function</span> fireEvent<span style="color: #009900;">&#40;</span>element<span style="color: #339933;">,</span>event<span style="color: #009900;">&#41;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>document<span style="color: #339933;">.</span>createEventObject<span style="color: #009900;">&#41;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #666666; font-style: italic;">// dispatch for IE</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #000000; font-weight: bold;">var</span> evt <span style="color: #339933;">=</span> document<span style="color: #339933;">.</span>createEventObject<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #b1b100;">return</span> element<span style="color: #339933;">.</span>fireEvent<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'on'</span><span style="color: #339933;">+</span>event<span style="color: #339933;">,</span>evt<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #009900;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #b1b100;">else</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #666666; font-style: italic;">// dispatch for firefox + others</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #000000; font-weight: bold;">var</span> evt <span style="color: #339933;">=</span> document<span style="color: #339933;">.</span>createEvent<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;HTMLEvents&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		evt<span style="color: #339933;">.</span>initEvent<span style="color: #009900;">&#40;</span>event<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #b1b100;">return</span> <span style="color: #339933;">!</span>element<span style="color: #339933;">.</span>dispatchEvent<span style="color: #009900;">&#40;</span>evt<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #009900;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">function</span> setDefaultConfigOptions<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>spConfigIndex <span style="color: #339933;">&gt;=</span> spConfig<span style="color: #339933;">.</span>settings<span style="color: #339933;">.</span>length<span style="color: #009900;">&#41;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">		<span style="color: #b1b100;">return</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// stop</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #009900;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	spConfig<span style="color: #339933;">.</span>settings<span style="color: #009900;">&#91;</span>spConfigIndex<span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span>selectedIndex <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #000000; font-weight: bold;">var</span> obj <span style="color: #339933;">=</span> spConfig<span style="color: #339933;">.</span>settings<span style="color: #009900;">&#91;</span>spConfigIndex<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	<span style="color: #339933;">++</span>spConfigIndex<span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	Event<span style="color: #339933;">.</span>observe<span style="color: #009900;">&#40;</span>obj<span style="color: #339933;">,</span><span style="color: #0000ff;">'change'</span><span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	fireEvent<span style="color: #009900;">&#40;</span>obj<span style="color: #339933;">,</span><span style="color: #0000ff;">'change'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	window<span style="color: #339933;">.</span>setTimeout<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;setDefaultConfigOptions()&quot;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Add a small delay before moving onto the next option</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">var</span> spConfigIndex <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Event<span style="color: #339933;">.</span>observe<span style="color: #009900;">&#40;</span>window<span style="color: #339933;">,</span> <span style="color: #0000ff;">'load'</span><span style="color: #339933;">,</span> <span style="color: #000000; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">	setDefaultConfigOptions<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> </div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li></ol></pre></p>

<p>
</p><p>
The javascript hack above would have been too time consuming for us to use on a live store (too many products and too many options being changed over time).&nbsp; That is why we decided to add this extra feature to our stores. Our store managers love it.
</p>

<p>&nbsp;</p>

<p>
</p>]]></description>
      <dc:subject>Magento, Problems and Solutions, Code Snippits</dc:subject>


      <dc:date>2010-07-21T20:37:28+00:00</dc:date>

    </item>

    <item>
      <title>Remove Checkout Buttons from top of Cart page</title>
      <link>http://icebergcommerce.com/software/blog/iss/article/rmagento&#45;remove&#45;checkout&#45;buttons&#45;from&#45;top&#45;of&#45;cart&#45;page/</link>
<image></image>
      <description><![CDATA[<img style="float:right" src="http://icebergcommerce.com/software/images/ee/magento-cart-checkout-buttons.png" style="border: 0;" width="219" height="152" />

<p>
If you want to remove the Checkout buttons from the top of your Magento Cart page, here are 2 ways to do this .
</p>

<p>
<h3>(1)  Remove the checkout buttons using Layout XML.  </h3>

Add this to a layout XML file:
</p>

<pre class="php" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&lt;</span>checkout_cart_index<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #339933;">&lt;</span>remove name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checkout.cart.top_methods&quot;</span> <span style="color: #339933;">/&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&lt;/</span>checkout_cart_index<span style="color: #339933;">&gt;</span></div></li></ol></pre>

<p>
<h3>(2) Just hide the buttons using CSS</h3>
Add this to your Magento store css style sheet:
</p>

<pre class="php" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">.</span>checkout<span style="color: #339933;">-</span>cart<span style="color: #339933;">-</span>index <span style="color: #339933;">.</span>title<span style="color: #339933;">-</span>buttons <span style="color: #339933;">.</span>checkout<span style="color: #339933;">-</span>types <span style="color: #009900;">&#123;</span>display<span style="color: #339933;">:</span>none<span style="color: #009900;">&#125;</span></div></li></ol></pre>


<br/>
<br/>

<p>
If you want to remove only Google Checkout and/or Paypal Express buttons from the top of the Magento Cart Page,
you can use the following Layout XML
</p>


<pre class="php" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&lt;</span>checkout_cart_index<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #339933;">&lt;</span>reference name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;checkout.cart.top_methods&quot;</span><span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #339933;">&lt;</span>action method<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;unsetChild&quot;</span><span style="color: #339933;">&gt;&lt;</span>name<span style="color: #339933;">&gt;</span>checkout<span style="color: #339933;">.</span>cart<span style="color: #339933;">.</span>methods<span style="color: #339933;">.</span>googlecheckout<span style="color: #339933;">&lt;/</span>name<span style="color: #339933;">&gt;&lt;/</span>action<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #339933;">&lt;</span>action method<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;unsetChild&quot;</span><span style="color: #339933;">&gt;&lt;</span>name<span style="color: #339933;">&gt;</span>checkout<span style="color: #339933;">.</span>cart<span style="color: #339933;">.</span>methods<span style="color: #339933;">.</span>paypal_express<span style="color: #339933;">&lt;/</span>name<span style="color: #339933;">&gt;&lt;/</span>action<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #339933;">&lt;/</span>reference<span style="color: #339933;">&gt;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #339933;">&lt;/</span>checkout_cart_index<span style="color: #339933;">&gt;</span></div></li></ol></pre>

]]></description>
      <dc:subject>Magento, Problems and Solutions, Code Snippits</dc:subject>


      <dc:date>2010-05-18T22:13:53+00:00</dc:date>

    </item>

    <item>
      <title>Magento Paypal Express Bug</title>
      <link>http://icebergcommerce.com/software/blog/iss/article/magento&#45;paypal&#45;express&#45;bug/</link>
<image></image>
      <description><![CDATA[<p>
This post details how to fix a bug in Magento 1.4.* processing payments using PayPal Express.&nbsp; 
</p>

<p>
The problem occurs when a customer selects PayPal Express, makes payment on the PayPal site, and then completes the transaction on your Magento store.
The error the customer sees is &#8220;This payment cannot be processed using your PayPal account at this time.&#8221;, however the payment is processed successfully and shows up in your PayPal account.
</p>

<p>
To fix this, open up app/code/core/Mage/Paypal/Controller/Express/Abstract.php  and comment out some code in the placeOrderAction function
</p>

<p>
(For a cleaner fix, copy the file to app/code/local/Mage/Paypal/Controller/Express/Abstract.php and then make changes to the new file)
</p>

<p><pre class="php" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> placeOrderAction<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    try <span style="color: #009900;">&#123;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #339933;">....</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">//        if ($url = $this-&gt;_checkout-&gt;getRedirectUrl()) {</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">//            $this-&gt;getResponse()-&gt;setRedirect($url);</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">//            return;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">//        }</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">        <span style="color: #339933;">...</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">    <span style="color: #009900;">&#125;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span></div></li></ol></pre></p>

<p>
</p><p>
The response object from PayPal is returning this on the final placeOrder step:
</p>

<p><pre class="php" style="font-family:monospace;"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#91;</span>SUCCESSPAGEREDIRECTREQUESTED<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span></div></li></ol></pre></p>

<p>
This means that the Magento store thinks it should redirect back to PayPal to finalize the order, however it does not need to redirect.
</p>

<p>
</p><p>
This fix has been tested on Magento 1.4.0.1, Magento 1.4.1.1
</p>

<p>
It has also been confirmed to work with PayPal Pro accounts (Both PayPal USA and PayPal Canada Pro Accounts)
</p>

<p>
</p>]]></description>
      <dc:subject>Magento, Problems and Solutions, Payment Gateways, Code Snippits</dc:subject>


      <dc:date>2010-03-17T21:29:05+00:00</dc:date>

    </item>

    
    </channel>
</rss>