<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tridian Developer Blog</title>
	<atom:link href="http://www.tridian.com/developer-blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tridian.com/developer-blog</link>
	<description>Development tips from Tridian.  Los Angeles Web Design development tips.</description>
	<lastBuildDate>Thu, 09 Jun 2011 21:56:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Tier Pricing in Magento</title>
		<link>http://www.tridian.com/developer-blog/tier-pricing-in-magento/</link>
		<comments>http://www.tridian.com/developer-blog/tier-pricing-in-magento/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 23:17:08 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ecommerce]]></category>

		<guid isPermaLink="false">http://www.tridian.com/developer-blog/?p=29</guid>
		<description><![CDATA[So, Magento is a really great piece of software, but like any relatively new product, it&#8217;s missing some things that people think are important. One thing in particular that&#8217;s missing is a major aspect of tier pricing pertaining to configurable products. For example, if someone were to buy 4 red shirts and 6 blue shirts [...]]]></description>
			<content:encoded><![CDATA[<p>So, Magento is a really great piece of software, but like any relatively new product, it&#8217;s missing some things that people think are important.  One thing in particular that&#8217;s missing is a major aspect of tier pricing pertaining to configurable products.  For example, if someone were to buy 4 red shirts and 6 blue shirts all from the same product, then they should still receive the discount for 10 shirts of that product.Â  Currently Magento only applies the tier pricing if they bought say 10 red shirts (all the same color, instead of a mix of colors).Â  This is a big problem when involving colors and sizes &#8211; if your customer orders 5 smalls and 5 mediums, and they expect a discount at 10 items, they will be upset that they do not receive the tier pricing discount. <span id="more-29"></span></p>
<p>Luckily, I have a solution for you to try out.Â  Seems to work pretty good for one of Tridian&#8217;s Magento clients.  Are you curious?  Good.  Then let&#8217;s dive right in.</p>
<p>The goal for this module is to accommodate the following requirement:  If you have a tier price discount at 10 and add 5 of one color and 5 of another, the cart will adjust the price for the 2 cart items to the 10 qty price. </p>
<p>I installed it as a module that extends Mage_Catalog_Model_Product_Type_Configurable_Price.Â </p>
<p>1. Create your module.Â  I created mine in app/code/local/Tridian/Catalog.Â  Use your own namespace instead of Tridian, if you prefer.Â  Create Model and etc sub folders in Catalog.<br />
2. Add xml to Tridian_All.xml in app/etc/modules/Tridian_All.xml<br />
3. Set up rewrite in app/code/local/Tridian/Catalog/etc/config.xml<br />
4. Extend the class and save to app/code/local/Tridian/Catalog/Model/Product/Type/Configurable/Price.php </p>
<p>Hereâ€™s my app/etc/modules/Tridian_All.xml </p>
<pre>[code lang="xml"]
<?xmlÂ version="1.0"?>
<config>
Â Â Â Â <modules>
Â Â Â Â Â Â Â Â <Tridian_Catalog>
Â Â Â Â Â Â Â Â Â Â Â Â <active>true</active>
Â Â Â Â Â Â Â Â Â Â Â Â <codePool>local</codePool>
Â Â Â Â Â Â Â Â </Tridian_Catalog>
Â Â Â Â </modules>
</config>[/code]</pre>
<p>Hereâ€™s my app/code/local/Tridian/Catalog/etc/config.xml </p>
<pre>[code lang="xml"]
<?xmlÂ version="1.0"?>

<config>
Â Â Â Â <modules>
Â Â Â Â Â Â Â Â <Tridian_Catalog>
Â Â Â Â Â Â Â Â Â Â Â Â <version>0.1.0</version>
Â Â Â Â Â Â Â Â </Tridian_Catalog>
Â Â Â Â </modules>
Â Â Â Â <global>
Â Â Â Â Â Â Â Â <models>
Â Â Â Â Â Â Â Â Â Â Â Â <catalog>
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â <rewrite>
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 
<product_type_configurable_price>Tridian_Catalog_Model_Product_Type_Configurable_Price</product_type_configurable_price>
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â </rewrite>
Â Â Â Â Â Â Â Â Â Â Â Â </catalog>
Â Â Â Â Â Â Â Â </models>
Â Â Â Â </global>
</config>[/code]</pre>
<p>And lastly hereâ€™s the extended class </p>
<pre>[code lang="php"]
classÂ Tridian_Catalog_Model_Product_Type_Configurable_PriceÂ extendsÂ Mage_Catalog_Model_Product_Type_Configurable_Price
{
Â Â Â Â /**
Â Â Â Â Â *Â GetÂ productÂ finalÂ price
Â Â Â Â Â *
Â Â Â Â Â *Â @paramÂ Â Â doubleÂ $qty
Â Â Â Â Â *Â @paramÂ Â Â Mage_Catalog_Model_ProductÂ $product
Â Â Â Â Â *Â @returnÂ Â double
Â Â Â Â Â */
Â Â Â Â publicÂ functionÂ getFinalPrice($qty=null,Â $product)
Â Â Â Â {
Â Â Â Â Â Â Â Â ifÂ (is_null($qty)Â &#038;&#038;Â !is_null($product->getCalculatedFinalPrice()))Â {
Â Â Â Â Â Â Â Â Â Â Â Â returnÂ $product->getCalculatedFinalPrice();
Â Â Â Â Â Â Â Â }

Â Â Â Â Â Â Â Â $finalPriceÂ =Â parent::getFinalPrice($qty,Â $product);

Â Â Â Â Â Â Â Â //Â CallÂ configÂ productÂ tierÂ pricingÂ functionÂ -Â ChrisÂ LohmanÂ 1/6/2009
Â Â Â Â Â Â Â Â /*Â ThisÂ allowsÂ forÂ tierÂ priceÂ toÂ affectÂ configurableÂ itemsÂ ofÂ differentÂ sizes,Â colors,Â etc.
Â Â Â Â Â Â Â Â Â *Â soÂ thatÂ whenÂ youÂ haveÂ someÂ qtyÂ ofÂ each,Â theÂ totalÂ willÂ beÂ countedÂ towardsÂ theÂ tierÂ pricingÂ matrix.
Â Â Â Â Â Â Â Â Â */
Â Â Â Â Â Â Â Â $tierPriceÂ =Â $this->calcConfigProductTierPricing($product);
Â Â Â Â Â Â Â Â if($tierPriceÂ >Â 0)
Â Â Â Â Â Â Â Â Â Â Â Â $finalPriceÂ =Â $tierPrice;
	  $finalPriceÂ =Â $this->_applySpecialPrice($product,Â $finalPrice);
Â Â Â Â Â Â Â Â 
        $product->getTypeInstance()->setStoreFilter($product->getStore());
Â Â Â Â Â Â Â Â $attributesÂ =Â $product->getTypeInstance()->getConfigurableAttributes();

Â Â Â Â Â Â Â Â $selectedAttributesÂ =Â array();
Â Â Â Â Â Â Â Â ifÂ ($product->getCustomOption('attributes'))Â {
Â Â Â Â Â Â Â Â Â Â Â Â $selectedAttributesÂ =Â unserialize($product->getCustomOption('attributes')->getValue());
Â Â Â Â Â Â Â Â }
Â Â Â Â Â Â Â Â 
Â Â Â Â Â Â Â Â $basePriceÂ =Â $finalPrice;
Â Â Â Â Â Â Â Â foreachÂ ($attributesÂ asÂ $attribute)Â {
Â Â Â Â Â Â Â Â Â Â Â Â $attributeIdÂ =Â $attribute->getProductAttribute()->getId();
Â Â Â Â Â Â Â Â Â Â Â Â $valueÂ =Â $this->_getValueByIndex(
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â $attribute->getPrices()Â ?Â $attribute->getPrices()Â :Â array(),
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â isset($selectedAttributes[$attributeId])Â ?Â $selectedAttributes[$attributeId]Â :Â null
Â Â Â Â Â Â Â Â Â Â Â Â );
Â Â Â Â Â Â Â Â Â Â Â Â if($value)Â {
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â if($value['pricing_value']Â !=Â 0)Â {
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â $finalPriceÂ +=Â $this->_calcSelectionPrice($value,Â $basePrice);
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â }
Â Â Â Â Â Â Â Â Â Â Â Â }
Â Â Â Â Â Â Â Â }
Â Â Â Â Â Â Â Â $product->setFinalPrice($finalPrice);
Â Â Â Â Â Â Â Â returnÂ max(0,Â $product->getData('final_price'));
Â Â Â Â }

Â Â Â Â /**
Â Â Â Â Â *Â GetÂ productÂ finalÂ priceÂ viaÂ configurableÂ product'sÂ tierÂ pricingÂ structure.Â Â UsesÂ qtyÂ ofÂ parentÂ itemÂ toÂ determineÂ price.
Â Â Â Â Â *
Â Â Â Â Â *Â @paramÂ Â Â floatÂ $price
Â Â Â Â Â *Â @paramÂ Â Â Mage_Catalog_Model_ProductÂ $product
Â Â Â Â Â *Â @returnÂ Â float
Â Â Â Â Â */
Â Â Â Â publicÂ functionÂ calcConfigProductTierPricing($product)
Â Â Â Â {
Â Â Â Â Â Â Â Â $tierPriceÂ =Â 0;
Â Â Â Â Â Â Â Â if($itemsÂ =Â Mage::getSingleton('checkout/session')->getQuote()->getItemsCollection())
Â Â Â Â Â Â Â Â {
Â Â Â Â Â Â Â Â Â Â Â Â //TheÂ itemsÂ collectionÂ hasÂ instancesÂ ofÂ theÂ parentÂ andÂ simpleÂ product.Â Â TheÂ correctÂ quantityÂ valueÂ isÂ relatedÂ toÂ theÂ parent
Â Â Â Â Â Â Â Â Â Â Â Â //soÂ ifÂ weÂ loopÂ throughÂ andÂ createÂ anÂ arrayÂ ofÂ skusÂ w/quantities,Â theÂ quantitiesÂ willÂ fallÂ intoÂ arrayÂ itemsÂ underÂ theÂ parentÂ skuÂ (arrayÂ key).
Â Â Â Â Â Â Â Â Â Â Â Â $cfg_quantitiesÂ =Â array();
Â Â Â Â Â Â Â Â Â Â Â Â foreachÂ ($itemsÂ asÂ $item)
Â Â Â Â Â Â Â Â Â Â Â Â {
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â $skuÂ =Â $item->getSku();
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â $qtyÂ =Â $item->getQty();
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â $cfg_quantities[$sku][]Â =Â $qty;
Â Â Â Â Â Â Â Â Â Â Â Â }

Â Â Â Â Â Â Â Â Â Â Â Â if(array_key_exists($product->getSku(),Â $cfg_quantities))
Â Â Â Â Â Â Â Â Â Â Â Â {
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â $cfg_qtyÂ =Â array_sum($cfg_quantities[$product->getSku()]);
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â $tierPriceÂ =Â $this->getTierPrice($cfg_qty,Â $product);
Â Â Â Â Â Â Â Â Â Â Â Â }
Â Â Â Â Â Â Â Â }
Â Â Â Â Â Â Â Â returnÂ $tierPrice;
Â Â Â Â }
} [/code]</pre>
<p>I know &#8211; that&#8217;s a lot of code, right?  Well, let me explain how it works and you&#8217;ll see that it&#8217;s not all that bad, ok?  The theory is to use the relationship that already exists between the configurable product and its child simple products.  The function getTierPrice takes a quantity and a product as parameters, so all we need to do is figure out the total number of items in the cart that share the same parent configurable item and then pass that new total to the getTierPrice function.  This is exactly what our  calcConfigProductTierPricing function does.  Counting up the products is accomplished by taking advantage of the structure of the products collection that&#8217;s returned from the cart.  The product collection has entries for the parent and simple version of each product in the cart.  The quantity of that item in the cart is assigned to the parent member of the collection.  So when we have 2 items in the cart that share the same parent, as a red shirt and black shirt of the same product, we can loop through the collection and take the sku value from the parent and then create a secondary array of the quantity of each item.  That way, quantities for different child products will all become secondary arrays under the same key (which happens to be the sku of the parent).  Once we&#8217;ve looped through the entire cart collection, we check if the current product&#8217;s sku is in the configurable products array using the array_key_exists function, and if so, we sum the quantities of the array and then use that new total to submit to our getTierPrice function.  Now, if you offer a price break at ten items and someone buys 5 red and 5 black, they&#8217;ll get the pricing discount!  </p>
<p>Keep in mind, that if you are using a different version of Magento, like 1.1.7 or 1.1.8, etc. you should extend *YOUR* version of Mage_Catalog_Model_Product_Type_Configurable_Price, instead of copying my code from this post.Â  Most of the code of the function getFinalPrice in my extended class is copied directly from my 1.1.6 version of Mage_Catalog_Model_Product_Type_Configurable_Price.Â  The only lines I added to getFinalPrice() are the 4 lines that call my calcConfigProductTierPricing() function, then check to see if the price is greater than 0, and then apply the special price if it&#8217;s lower than the tier price.  Everything else in the function is existing code from the core class.</p>
<pre>[code lang="php"]
//Â CallÂ configÂ productÂ tierÂ pricingÂ functionÂ -Â ChrisÂ LohmanÂ 1/6/2009
Â Â Â Â Â Â Â Â /*Â ThisÂ allowsÂ forÂ tierÂ priceÂ toÂ affectÂ configurableÂ itemsÂ ofÂ differentÂ sizes,Â colors,Â etc.
Â Â Â Â Â Â Â Â Â *Â soÂ thatÂ whenÂ youÂ haveÂ someÂ qtyÂ ofÂ each,Â theÂ totalÂ willÂ beÂ countedÂ towardsÂ theÂ tierÂ pricingÂ matrix.
Â Â Â Â Â Â Â Â Â */
Â Â Â Â Â Â Â Â $tierPriceÂ =Â $this->calcConfigProductTierPricing($product);
Â Â Â Â Â Â Â Â if($tierPriceÂ >Â 0)
Â Â Â Â Â Â Â Â Â Â Â Â $finalPriceÂ =Â $tierPrice;
	$finalPriceÂ =Â $this->_applySpecialPrice($product,Â $finalPrice);
[/code]</pre>
<p>So, use the getFinalPrice function from *YOUR* Magento versionâ€™s Mage_Catalog_Model_Product_Type_Configurable_Price class as your starting point, and then insert those 4 additional lines to call calcConfigProductTierPricing, and then your version of Tridian_Catalog_Model_Product_Type_Configurable_Price will be good to go. </p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tridian.com/developer-blog/tier-pricing-in-magento/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Adding New Arrivals to Magento</title>
		<link>http://www.tridian.com/developer-blog/adding-new-arrivals-to-magento/</link>
		<comments>http://www.tridian.com/developer-blog/adding-new-arrivals-to-magento/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 23:50:55 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ecommerce]]></category>

		<guid isPermaLink="false">http://www.tridian.com/developer-blog/?p=23</guid>
		<description><![CDATA[Hey Everyone &#8211; So, Tridian has been doing quite a bit of Magento development work lately, and in keeping with the spirit of â€œopen sourceâ€ software, we thought we&#8217;d share a module that we recently developed that addresses a very common need when creating an e-store with Magento. The requirements are to get the X [...]]]></description>
			<content:encoded><![CDATA[<p>Hey Everyone &#8211; </p>
<p>So, Tridian has been doing quite a bit of Magento development work lately, and in keeping with the spirit of â€œopen sourceâ€ software, we thought we&#8217;d share a module that we recently developed that addresses a very common need when creating an e-store with Magento.  The requirements are to get the X most recently products added to the store (108 in this case) and display them in their own â€œNew Arrivalsâ€ category, but make it so that the cart will automatically display the newest products based on the product&#8217;s creation date, without the site admin having to manually assigned them into and out of a â€œNew Arrivalsâ€ category.</p>
<p>In order to create â€œNew Arrivalsâ€ functionality on my clientâ€™s Magento store (which is 1.1.6, but this code also works for all versions of Magento through the current 1.2.0.1), I created the following module.  My approach was to override the normal category behavior for my â€œNew Arrivalsâ€ category and display a custom product collection instead. </p>
<p>Hereâ€™s how it went downâ€¦ <span id="more-23"></span></p>
<p>Step 1: In the admin, create a category called â€œNew Arrivalsâ€ and leave it empty. </p>
<p>Step 2: Find the code that generates the product listings on the Category pages.  Turns out the code that does this is in the class Mage_Catalog_Block_Product_List.  Great.  But now, in order to get the cart to do what we want, we have to override this class and add my own custom code to handle the creation of the product collection for the empty category â€œNew Arrivalsâ€.  To do this, I created a new block file called Tridian_Newarrivals_Block_Newarrivals, which extends the original, and saved it here: app/code/local/Tridian/Newarrivals/Block/Newarrivals.php. </p>
<pre>[code lang="php"]
class Tridian_Newarrivals_Block_Newarrivals extends Mage_Catalog_Block_Product_List
{

     protected function _getProductCollection()
     {
        if (is_null($this->_productCollection)) {
            $curr_category = Mage::registry('current_category')->getName();
            $curr_categoryid = Mage::registry('current_category')->getId();
            $curr_category = strtolower($curr_category);
            if($curr_category == 'new arrivals')
            {
                $storeId    = Mage::app()->getStore()->getId();
                $product    = Mage::getModel('catalog/product');  

                $this->_productCollection = Mage::getModel('catalog/resource_eav_mysql4_product_collection')
                    ->setStoreId($storeId)
                    ->addAttributeToSelect(array('name', 'price', 'small_image'), 'inner')
                    ->addAttributeToSelect(array('special_price'), 'left')
                    ->addAttributeToSelect('status')
                    ->setOrder('created_at', 'desc')
                    ->setPageSize(12)
                    ->addUrlRewrite($curr_categoryid)
                    ;//->load(true);  // passing true to load will echo the sql to the browser.

                    Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($this->_productCollection);
                    // add InStock filter to prevent out of stock stuff from showing up.  Chris Lohman 1/29/2009
                    Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($this->_productCollection);
                    Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($this->_productCollection);
            }
            else
            {
                $this->_productCollection = parent::_getProductCollection();
            }
        }
        return $this->_productCollection;  

     }
} [/code]</pre>
<p>As you can see in the code above, when the category name equals â€œnew arrivalsâ€, we implement the custom product collection.  If not, then the class calls the parent function, which is just the _getProductCollection() function in the Mage_Catalog_Block_Product_List class.  The key things to notice here are the page size (12), which should be chosen to match your default page size for your store (our client&#8217;s store defaults to 12 items per page), and the setOrder(â€™created_atâ€™, â€˜descâ€™) call, which sorts the results in descending order by when the product was created/added to the Magento admin.  You can also see that we&#8217;ve added some filters to the collection to keep unwanted products from showing up in the results (out of stock items, etc).</p>
<p>Great!  Sounds like we&#8217;re done, right?  Not so fast.  Turns out that the toolbar that handles the category pagination uses the size of the product collection (which in this case is the entire catalog, sorted from most recently added to least recently added).  Doh.  We only want to show the most recent 108.  In order for our result set to actually be limited to 108 products, it turns out that we also need to change the behavior of the Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection class to use our new limit instead of using the size of the returned product collection.  That leads us to&#8230;</p>
<p>Step 3: Create the following model class: app/code/local/Tridian/Newarrivals/Model/Newarrivals.php </p>
<pre>[code lang="php"]
class Tridian_Newarrivals_Model_Newarrivals extends Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection
{
    /**
     * Render SQL for retrieve product count
     */
    public function getSelectCountSql()
    {
        $curr_category = Mage::registry('current_category')->getName();
        $curr_category = strtolower($curr_category);
        if($curr_category == 'new arrivals')
        {
            $sql = "select 108";
        }
        else
        {
            $sql = parent::getSelectCountSql();
        }
        return $sql;
    }

} [/code]</pre>
<p>Youâ€™re probably wondering why I picked 108, right?  Well to make a long story short &#8211; my catalog pages display either 12, 24, or 36 items.  If I didnâ€™t use a multiple of all of those values, then the toolbar would display the pagination links incorrectly.  If you don&#8217;t believe me, try it out for yourself.  As before, you see that if the category isn&#8217;t â€œnew arrivalsâ€, then the class falls back to its original behavior by calling the parent function.  </p>
<p>Well done!  The hard part is over.  Now all we need to do is activate our module in Magento and then set up our rewrite xml in our config.xml file to get Magento to use our new classes instead of the originals.</p>
<p>Hereâ€™s the code to tell the cart to override the original block and model classes.  Save it as config.xml and put it here app/code/local/Tridian/Newarrivals/etc/config.xml: </p>
<pre>[code lang="xml"]
<?xml version="1.0"?>

<config>
    <modules>
        <Tridian_Newarrivals>
            <version>0.1.0</version>
        </Tridian_Newarrivals>
    </modules>
    <global>
        <blocks>
            <catalog>
                <rewrite>
<product_list>Tridian_Newarrivals_Block_Newarrivals</product_list>
                </rewrite>
            </catalog>
        </blocks>
        <models>
            <catalog>
                <rewrite>
                    <resource_eav_mysql4_product_collection>Tridian_Newarrivals_Model_Newarrivals</resource_eav_mysql4_product_collection>
                </rewrite>
            </catalog>
        </models>
    </global>
</config>[/code]</pre>
<p>You need to activate your module in app/etc/modules.  We created a file named Tridian_All.xml for this. </p>
<pre>[code lang="xml"]
<?xml version="1.0"?>
<config>
    <modules>
        <Tridian_Newarrivals>
            <active>true</active>
            <codePool>local</codePool>
        </Tridian_Newarrivals>
    </modules>
</config>
[/code]</pre>
<p>Just to be crystal clear, since this is where a lot of slip ups occur with Magento â€“ make sure you follow the naming conventions and file locations to a â€œTâ€.  They are very specific and case sensitive.  </p>
<p>As a recap, hereâ€™s where your files should go: </p>
<p>Tridian_All.xml (turns on module) goes -> app/etc/modules/Tridian_All.xml<br />
Module code (3 components) goes -> app/code/local/Tridian/Newarrivals<br />
Block class Tridian_Newarrivals_Block_Newarrivals goes -> app/code/local/Tridian/Newarrivals/Block/Newarrivals.php<br />
Model class Tridian_Newarrivals_Model_Newarrivals goes -> app/code/local/Tridian/Newarrivals/Model/Newarrivals.php<br />
config.xml (xml config file for module) goes -> app/code/local/Tridian/Newarrivals/etc/config.xml </p>
<p>And there you have it.  The front end will now display your most recent products in their own â€œNew Arrivalsâ€ category and it will always be the most recently added. </p>
<p>Feel free to post any questions or comments.</p>
<p>Cheers! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.tridian.com/developer-blog/adding-new-arrivals-to-magento/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
	</channel>
</rss>

