Sunday, 9 September 2012

How Do I Set Up Table Rate Shipping

Table Rates can be set up in 3 different ways; Weight and Destination, Price and Destination and the Number of Items and Destination. To set up Table Rates go to System -> Configuration and Select Shipping Methods from the Left Navigation. You will be able to set up your default values for the Table Rates here, but the rates themselves are entered on the Website level.
Let’s first set up our default configuration for the Table Rates.
image
First we enable Table Rates by selecting yes from the Enabled dropdown. You are then able to edit the Title and Method names. In this case we have the Title set to Standard Shipping and the Method set to Standard.
You then select the way you want the Table Rates calculated. In this case we are going to calculate the rates based on the Price and Destination.
Select the Save Config button and then move to the Website level to enter the rates.
Using the Current Configuration Scope dropdown in the left navigation select the website you want to enter rates for. In this case we will enter rates for the Main Website.
Once you select the site you will view the Shipping Carriers in this way:
image
In this case we will use the default values, but by deselecting the checkboxes you can edit the values for the website.
The table rates are entered by importing a CSV file. First export the file by selecting the Export CSV button. Save the file to your computer and open it in Excel.
Once the CSV file is open in Excel you can enter your rates.
image
We are going to have 3 rates in this case, $15 for orders $0 - $49.99, $10 for orders $50 - $99.99, and $5 for orders $100 and up. As it says in the CSV, the rates are calculated on the order sub-total. As with all order sub-totals this is the sub-total AFTER other discounts are added. So if a customer applies a coupon, the sub-total after the coupon is applied is the rate we calculate against.
In the case of price and destination the first rate you will need to enter is for the order sub-total of $0 and above. In this example we are going to set up a single rate for every region in the USA. First we enter the Country as USA. If we don’t want to specify a rate for each individual region/state we enter a * in the field. This applies the rate to all regions in the country. We will do the same for all ZIP codes in this case as well.
You then save the file and upload it back to the site using the Import tool for the Table Rates in the admin panel. We now have a simple table rate set up for all orders to the USA. However, let’s say you find you are shipping to customers in Hawaii and Alaska frequently and are losing money each time you do so. We can set up different rates just for those 2 states. Export the file back out of the site and you will be able to view the current rates for the site. Now we can enter higher rates for Alaska and Hawaii by entering them in the CSV file.
image
By entering the states in the CSV the site will now look for these rates anytime a customer enters a shipping address in either of these states. The states must be entered using the 2-digit Postal Abbreviation. In this case we still have the * for the first 3 rates. Instead of meaning all states, the * now means all states EXCEPT for HI and AK.
Save the file and import it back to the site, select the Save config button and you have your new table rates.
The other 2 options, Weight and Destination and # of Items and Destination, function in the same way, but instead of looking at the Sub-total they will calculate the rates based on either the total weight of all items in the cart or the total number of items in the cart.
Table Rates can be set up in 3 different ways; Weight and Destination, Price and Destination and the Number of Items and Destination. To set up Table Rates go to System -> Configuration and Select Shipping Methods from the Left Navigation. You will be able to set up your default values for the Table Rates here, but the rates themselves are entered on the Website level.
Let’s first set up our default configuration for the Table Rates.
image
First we enable Table Rates by selecting yes from the Enabled dropdown. You are then able to edit the Title and Method names. In this case we have the Title set to Standard Shipping and the Method set to Standard.
You then select the way you want the Table Rates calculated. In this case we are going to calculate the rates based on the Price and Destination.
Select the Save Config button and then move to the Website level to enter the rates.
Using the Current Configuration Scope dropdown in the left navigation select the website you want to enter rates for. In this case we will enter rates for the Main Website.
Once you select the site you will view the Shipping Carriers in this way:
image
In this case we will use the default values, but by deselecting the checkboxes you can edit the values for the website.
The table rates are entered by importing a CSV file. First export the file by selecting the Export CSV button. Save the file to your computer and open it in Excel.
Once the CSV file is open in Excel you can enter your rates.
image
We are going to have 3 rates in this case, $15 for orders $0 - $49.99, $10 for orders $50 - $99.99, and $5 for orders $100 and up. As it says in the CSV, the rates are calculated on the order sub-total. As with all order sub-totals this is the sub-total AFTER other discounts are added. So if a customer applies a coupon, the sub-total after the coupon is applied is the rate we calculate against.
In the case of price and destination the first rate you will need to enter is for the order sub-total of $0 and above. In this example we are going to set up a single rate for every region in the USA. First we enter the Country as USA. If we don’t want to specify a rate for each individual region/state we enter a * in the field. This applies the rate to all regions in the country. We will do the same for all ZIP codes in this case as well.
You then save the file and upload it back to the site using the Import tool for the Table Rates in the admin panel. We now have a simple table rate set up for all orders to the USA. However, let’s say you find you are shipping to customers in Hawaii and Alaska frequently and are losing money each time you do so. We can set up different rates just for those 2 states. Export the file back out of the site and you will be able to view the current rates for the site. Now we can enter higher rates for Alaska and Hawaii by entering them in the CSV file.
image
By entering the states in the CSV the site will now look for these rates anytime a customer enters a shipping address in either of these states. The states must be entered using the 2-digit Postal Abbreviation. In this case we still have the * for the first 3 rates. Instead of meaning all states, the * now means all states EXCEPT for HI and AK.
Save the file and import it back to the site, select the Save config button and you have your new table rates.
The other 2 options, Weight and Destination and # of Items and Destination, function in the same way, but instead of looking at the Sub-total they will calculate the rates based on either the total weight of all items in the cart or the total number of items in the cart.
Table Rates can be set up in 3 different ways; Weight and Destination, Price and Destination and the Number of Items and Destination. To set up Table Rates go to System -> Configuration and Select Shipping Methods from the Left Navigation. You will be able to set up your default values for the Table Rates here, but the rates themselves are entered on the Website level.
Let’s first set up our default configuration for the Table Rates.
image
First we enable Table Rates by selecting yes from the Enabled dropdown. You are then able to edit the Title and Method names. In this case we have the Title set to Standard Shipping and the Method set to Standard.
You then select the way you want the Table Rates calculated. In this case we are going to calculate the rates based on the Price and Destination.
Select the Save Config button and then move to the Website level to enter the rates.
Using the Current Configuration Scope dropdown in the left navigation select the website you want to enter rates for. In this case we will enter rates for the Main Website.
Once you select the site you will view the Shipping Carriers in this way:
image
In this case we will use the default values, but by deselecting the checkboxes you can edit the values for the website.
The table rates are entered by importing a CSV file. First export the file by selecting the Export CSV button. Save the file to your computer and open it in Excel.
Once the CSV file is open in Excel you can enter your rates.
image
We are going to have 3 rates in this case, $15 for orders $0 - $49.99, $10 for orders $50 - $99.99, and $5 for orders $100 and up. As it says in the CSV, the rates are calculated on the order sub-total. As with all order sub-totals this is the sub-total AFTER other discounts are added. So if a customer applies a coupon, the sub-total after the coupon is applied is the rate we calculate against.
In the case of price and destination the first rate you will need to enter is for the order sub-total of $0 and above. In this example we are going to set up a single rate for every region in the USA. First we enter the Country as USA. If we don’t want to specify a rate for each individual region/state we enter a * in the field. This applies the rate to all regions in the country. We will do the same for all ZIP codes in this case as well.
You then save the file and upload it back to the site using the Import tool for the Table Rates in the admin panel. We now have a simple table rate set up for all orders to the USA. However, let’s say you find you are shipping to customers in Hawaii and Alaska frequently and are losing money each time you do so. We can set up different rates just for those 2 states. Export the file back out of the site and you will be able to view the current rates for the site. Now we can enter higher rates for Alaska and Hawaii by entering them in the CSV file.
image
By entering the states in the CSV the site will now look for these rates anytime a customer enters a shipping address in either of these states. The states must be entered using the 2-digit Postal Abbreviation. In this case we still have the * for the first 3 rates. Instead of meaning all states, the * now means all states EXCEPT for HI and AK.
Save the file and import it back to the site, select the Save config button and you have your new table rates.
The other 2 options, Weight and Destination and # of Items and Destination, function in the same way, but instead of looking at the Sub-total they will calculate the rates based on either the total weight of all items in the cart or the total number of items in the cart.
Table Rates can be set up in 3 different ways; Weight and Destination, Price and Destination and the Number of Items and Destination. To set up Table Rates go to System -> Configuration and Select Shipping Methods from the Left Navigation. You will be able to set up your default values for the Table Rates here, but the rates themselves are entered on the Website level.
Let’s first set up our default configuration for the Table Rates.
image
First we enable Table Rates by selecting yes from the Enabled dropdown. You are then able to edit the Title and Method names. In this case we have the Title set to Standard Shipping and the Method set to Standard.
You then select the way you want the Table Rates calculated. In this case we are going to calculate the rates based on the Price and Destination.
Select the Save Config button and then move to the Website level to enter the rates.
Using the Current Configuration Scope dropdown in the left navigation select the website you want to enter rates for. In this case we will enter rates for the Main Website.
Once you select the site you will view the Shipping Carriers in this way:
image
In this case we will use the default values, but by deselecting the checkboxes you can edit the values for the website.
The table rates are entered by importing a CSV file. First export the file by selecting the Export CSV button. Save the file to your computer and open it in Excel.
Once the CSV file is open in Excel you can enter your rates.
image
We are going to have 3 rates in this case, $15 for orders $0 - $49.99, $10 for orders $50 - $99.99, and $5 for orders $100 and up. As it says in the CSV, the rates are calculated on the order sub-total. As with all order sub-totals this is the sub-total AFTER other discounts are added. So if a customer applies a coupon, the sub-total after the coupon is applied is the rate we calculate against.
In the case of price and destination the first rate you will need to enter is for the order sub-total of $0 and above. In this example we are going to set up a single rate for every region in the USA. First we enter the Country as USA. If we don’t want to specify a rate for each individual region/state we enter a * in the field. This applies the rate to all regions in the country. We will do the same for all ZIP codes in this case as well.
You then save the file and upload it back to the site using the Import tool for the Table Rates in the admin panel. We now have a simple table rate set up for all orders to the USA. However, let’s say you find you are shipping to customers in Hawaii and Alaska frequently and are losing money each time you do so. We can set up different rates just for those 2 states. Export the file back out of the site and you will be able to view the current rates for the site. Now we can enter higher rates for Alaska and Hawaii by entering them in the CSV file.
image
By entering the states in the CSV the site will now look for these rates anytime a customer enters a shipping address in either of these states. The states must be entered using the 2-digit Postal Abbreviation. In this case we still have the * for the first 3 rates. Instead of meaning all states, the * now means all states EXCEPT for HI and AK.
Save the file and import it back to the site, select the Save config button and you have your new table rates.
The other 2 options, Weight and Destination and # of Items and Destination, function in the same way, but instead of looking at the Sub-total they will calculate the rates based on either the total weight of all items in the cart or the total number of items in the cart.
Table Rates can be set up in 3 different ways; Weight and Destination, Price and Destination and the Number of Items and Destination. To set up Table Rates go to System -> Configuration and Select Shipping Methods from the Left Navigation. You will be able to set up your default values for the Table Rates here, but the rates themselves are entered on the Website level.
Let’s first set up our default configuration for the Table Rates.
image
First we enable Table Rates by selecting yes from the Enabled dropdown. You are then able to edit the Title and Method names. In this case we have the Title set to Standard Shipping and the Method set to Standard.
You then select the way you want the Table Rates calculated. In this case we are going to calculate the rates based on the Price and Destination.
Select the Save Config button and then move to the Website level to enter the rates.
Using the Current Configuration Scope dropdown in the left navigation select the website you want to enter rates for. In this case we will enter rates for the Main Website.
Once you select the site you will view the Shipping Carriers in this way:
image
In this case we will use the default values, but by deselecting the checkboxes you can edit the values for the website.
The table rates are entered by importing a CSV file. First export the file by selecting the Export CSV button. Save the file to your computer and open it in Excel.
Once the CSV file is open in Excel you can enter your rates.
image
We are going to have 3 rates in this case, $15 for orders $0 - $49.99, $10 for orders $50 - $99.99, and $5 for orders $100 and up. As it says in the CSV, the rates are calculated on the order sub-total. As with all order sub-totals this is the sub-total AFTER other discounts are added. So if a customer applies a coupon, the sub-total after the coupon is applied is the rate we calculate against.
In the case of price and destination the first rate you will need to enter is for the order sub-total of $0 and above. In this example we are going to set up a single rate for every region in the USA. First we enter the Country as USA. If we don’t want to specify a rate for each individual region/state we enter a * in the field. This applies the rate to all regions in the country. We will do the same for all ZIP codes in this case as well.
You then save the file and upload it back to the site using the Import tool for the Table Rates in the admin panel. We now have a simple table rate set up for all orders to the USA. However, let’s say you find you are shipping to customers in Hawaii and Alaska frequently and are losing money each time you do so. We can set up different rates just for those 2 states. Export the file back out of the site and you will be able to view the current rates for the site. Now we can enter higher rates for Alaska and Hawaii by entering them in the CSV file.
image
By entering the states in the CSV the site will now look for these rates anytime a customer enters a shipping address in either of these states. The states must be entered using the 2-digit Postal Abbreviation. In this case we still have the * for the first 3 rates. Instead of meaning all states, the * now means all states EXCEPT for HI and AK.
Save the file and import it back to the site, select the Save config button and you have your new table rates.
The other 2 options, Weight and Destination and # of Items and Destination, function in the same way, but instead of looking at the Sub-total they will calculate the rates based on either the total weight of all items in the cart or the total number of items in the cart.

Thursday, 6 September 2012

Best PHP E-Commerce Application

1. Open Cart

Open cart
OpenCart is an open source PHP-based online shopping cart system. A robust e-commerce solution for Internet merchants with the ability to create their own online business and participate in e-commerce at a minimal cost.
OpenCart is designed feature rich, easy to use, search engine friendly and with a visually appealing interface.

2. Magento

Magento
Magento is a feature-rich eCommerce solution offering complete flexibility and control over the look, content, and functionality of an online store.
Magento Features:
Site Management
  • Control multiple websites and stores from one Administration Panel with ability to share as much or as little information as needed
  • Multi-Lingual
  • Support for localization
  • Support for multiple currencies
  • Administration Permission System Roles and Users
  • Web Services API for easy integration between Magento and any third-party application
  • Flexible tax rate management with support for US and International markets
  • Fully 100% customizable design using templates
  • Customer Groups
  • One-Click Upgrades
  • Content Management System for Informational Pages

3. osCommerce

oscommerce
osCommerce is an online shop e-commerce solution that offers a wide range of out-of-the-box features that allows online stores to be setup fairly quickly with ease, and is available for free as an Open Source based solution released under the GNU General Public License.
osCommerce was started in March 2000 and has since matured to a solution that is currently powering 14,055 registered live shops around the world.
Today, osCommerce has been taken to the next level, moving towards an e-commerce framework solution that not only remains easy to setup and maintain, but also making it easier for store administrators to present their stores to their customers with their own unique requirements.

4. PrestaShop

prestashop
PrestaShop™ is professional e-Commerce shopping cart software that you can download and use for free
The big advantage of open-source software: you’re never ‘locked’ to expensive commercial software.
Our dedicated team and growing user community join forces to fix bugs and add new functionality at a rate proprietary software companies can rarely claim. Join the Open Source revolution!

5. Agora Cart

Agora
AgoraCart – The powerful “Free” Open Source ecommerce shopping cart software solution that offers a very wide range of “out-of-the-box” features that allow you to setup an online ecommerce solution ranging from a simple template based store to the integration of a complex visual design concept containing all the creative magic of your web designer.
Ecommerce Shopping Cart Software with limitless flexibility in many areas including full design controls through Cascading Style Sheets (css), template systems, customizable layouts, custom individual product category layouts and templates, customization of nearly all cart features for the code hobbyist, modular “drop in and go” code as well as AgoraScript, our own scripting language inside parsed HTML pages, that experienced programmers can appreciate.

6. StoreSprite

storesprite
StoreSprite is ecommerce for web designers a powerful, free php/mysql shopping cart easy to install, customise and maintain, no complex scripting to negotiate design and deploy a top rate store that your
client can manage with little or no training.

7. FreeWay

freeway
Freeway is an advanced Open Source eCommerce platform which can sell using methods only previously available in enterprise class or niche bespoke systems. Without having to purchase a commercial system and then paying a developer to build a custom installation, Freeway does what you need out of the box. Of course Freeway is great for selling products but it also sells events AND services AND subscriptions. From appointments and time based bookings to event ticketing and subscriptions Freeway is the eCommerce platform for how we want to sell.

8. UberCart

UberCart
Ubercart is an exciting open source e-commerce package that fully integrates your online store with Drupal, the leading open source content management system. This is a killer combination for anyone looking to build a community around a product, sell access to premium content, offer paid file downloads, and much much more!
Ubercart was designed to take advantage of Drupal’s major core and contributed systems, providing our users with shopping cart functionality that seamlessly integrates with other parts of your company or community website.

9. phpShop

phpShop
phpShop is a PHP-powered shopping cart application. It is released under the GNU General Public License. The primary purpose of phpShop is to provide a simple shopping cart solution that is easy to customize to suit any purpose. phpShop has less features that many other shopping cart applications, but is generally easier to customize. All that is required to effectively customize phpShop is a basic knowledge of HTML, PHP, and SQL.

10. VirtueMart

virtueMart
Free Shopping Cart Software for Joomla! & Mambo
VirtueMart is an Open Source E-Commerce solution to be used together with a Content Management System (CMS) called Joomla! (and Mambo). Joomla! and VirtueMart are written in PHP and made easy for use in a PHP/MySQL environment.
Learn more about Ecommerce Software

20 Great PHP frameworks

A good PHP framework can help you develop a PHP application quickly, with more simplicity and with a vision "best-practices-oriented".

Take a look at this list with 20 great PHP frameworks and suggest that you prefer or a new link to a framework not included into this list.


1. CodeIgniter
CodeIgniter is a powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications.
Read more...


2. CakePHP
CakePHP is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications.
Read more...


3. Symfony
Symfony is a full-stack framework, a library of cohesive classes written in PHP5. It provides an architecture, components and tools for developers to build complex web applications faster. Choosing symfony allows you to release your applications earlier, host and scale them without problem, and maintain them over time with no surprise.
Read more...

4. Prado
PRADOTM is a component-based and event-driven programming framework for developing Web applications in PHP 5. PRADO stands for PHP Rapid Application Development Object-oriented.
Read more...


5. Qcodo
It is a completely object-oriented framework that takes the best of PHP and provides a truly rapid application development platform. Initial prototypes roll out in minutes instead of hours. Iterations come around in hours instead of days (or even weeks). As projects iterate into more cohesive solutions, the framework allows developers to take prototypes to the next level by providing the capability of bringing the application maturity.
Read more...


6. Zend Framework
Zend Framework is focused on building more secure, reliable, and modern Web 2.0 applications & web services, and consuming widely available APIs from leading vendors like Google, Amazon, Yahoo!, Flickr, as well as API providers and catalogers like StrikeIron and ProgrammableWeb.
Read more...


7. Akelos
The Akelos PHP Framework is a web application development platform based on the MVC (Model View Controller) design pattern. Based on good practices, it allows you to:
Write views using Ajax easily, Control requests and responses through a controller, Manage internationalized applications, Communicate models and the database using simple conventions.
Read more...


8. Maintainable
The Maintainable PHP Framework was originally built only for our own projects, then released to open source at the request of our customers. Like any framework, it's certainly not appropriate for every application. It's designed primarily for use with small- to mid- sized applications.
Read more...


9. evoCore
evoCore is the framework at the heart of the b2evolution blogging application. It is freely available for anyone to use. It is dual licensed so you can choose to use it either under the GNU GPL or the Mozilla MPL license. (b2evo for example is using it under the GPL).
Read more...

10. Stratos
The Stratos Framework is an open-source, object-oriented web application framework that facilitates the rapid development of well-organized, secure, and maintainable PHP web applications. Stratos frees you from working on tedious, routine tasks, and allows you to focus on specific software requirements.
Read more...

11. Seagull
Seagull is a mature OOP framework for building web, command line and GUI applications. Licensed under BSD, the project allows PHP developers to easily integrate and manage code resources, and build complex applications quickly.
Read more...


12. Zoop
The Zoop Framework is inclusive, cooperating with and containing components integrated from some existing projects including Smarty, the Prototype JS Framework, and a number of Pear Modules.
Read more...


13. php.MVC
php.MVC implements the Model-View-Controller (MVC) design pattern, and encourages application design based on the Model 2 paradigm. This design model allows the Web page or other contents (View) to be mostly separated from the internal application code (Controller/Model), making it easier for designers and programmers to focus on their respective areas of expertise.
Read more...


14. AjaxAC
AjaxAC is an open-source framework written in PHP, used to develop/create/generate AJAX applications. The fundamental idea behind AJAX (Asynchronous JavaScript And XML) is to use the XMLHttpRequest object to change a web page state using background HTTP sub-requests without reloading the entire page. It is released under the terms of the Apache License v2.0.
Read More...


15. xAjax
xAjax is an open source PHP class library that allows to create quickly Ajax applications using HTML, CSS, JavaScript, and PHP.
Read more...


16. PHOCOA
PHOCOA (pronounced faux-ko) is PHP framework for developing web applications. PHOCOA's primary intent is to make web application development in PHP easier, faster, and higher-quality.
Read more...


17. Kohana
Kohana is a PHP 5 framework that uses the model view controller architectural pattern. It aims to be secure, lightweight, and easy to use.
Read more...


18. Limb
Limb is an OpenSource(LGPL) PHP framework mostly aimed for rapid web application prototyping and development. The current actively developed branch of framework is Limb3(there is also Limb2 but it's not maintained anymore).
Read more...


19. Solar
Solar is a PHP 5 framework for rapid application development. It is fully name-spaced and uses enterprise application design patterns, with built-in support for localization and configuration at all levels.
Read more...



20. BlueShoes
BlueShoes is a comprehensive application framework and content management system. It is written in the widely used web-scripting language PHP. BlueShoes offers excellent support for the popular MySQL database as well as support for Oracle and MSSQL.
Read more...

Monday, 3 September 2012

Create Magento Featured Products

n this article, I will guide you how to display the featured products on frontent Home Page

Step1:  Create attribute "featured".


Go to admin-> Catalog-> Attributes-> Manage Attributes-> add new attribute:

Attribute Properties

Attribute Identifier: featured

Scope: Store View

Catalog Input Type for Store Owner: Yes/No

Unique Value (not shared with other products): No

Values Required: No

Input Validation for Store Owner: None

Apply To: All Product Types

Front End Properties

Use in quick search: No

Use in advanced search: Yes

Comparable on Front-end: No

Use In Layered Navigation (Can be used only with catalog input type ‘Dropdown’): No

Manage Label/Options

Default: Featured Product

English: Featured Product

Step2:  Adding these attributes to attribute set.

After creating attributes, you need to add them into attribute sets, if you use default attribute set (or any attribute set you define), please add these attributes into the attribute set you used. (Below is example for Default Attribute Set).

Step 3:

Go to folder: …\app\design\frontend\default\your theme\template\catalog\product

Create file featured.phtml and add the following code into this file

<?php

//{{block type="core/template" show_total="4" name="product_featured" as="product_featured" template="catalog/product/featured.phtml}}

$totalPerPage = ($this->show_total) ? $this->show_total : 12;

$visibility = array(

                      Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,

                      Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG

                  );

$storeId = Mage::app()->getStore()->getId();

$_productCollection = Mage::getResourceModel('reports/product_collection')

                        ->addAttributeToSelect('*')   

                        ->setStoreId($storeId)

                        ->addStoreFilter($storeId)  

                        ->addAttributeToFilter('visibility', $visibility)

                        ->addAttributeToFilter('featured', true)

                        ->setOrder('created_at', 'desc')

                        ->addAttributeToSelect('status')

                        ->setPageSize($totalPerPage);

Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($_productCollection);

Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($_productCollection);

Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($_productCollection);

?>

<h1>Featured product (test module)</h1>

<br><br>

<div style="width:95%; text-align:center;">

<?php $_collectionSize = $_productCollection->count() ?>

    <table cellspacing="0" class="generic-product-grid" id="product-list-table">

    <?php $i=0; foreach ($_productCollection as $_product): ?>

    <?php if ($i++%4==0): ?>

    <tr>

    <?php endif ?>

        <td>

            <p class="product-image">

                <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>">

                    <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(170, 170); ?>" alt="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" title="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" />

                </a>

            </p>

            <h5><a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></h5>

            <div>

            <?php if ($_product->getSpecialPrice()>0):?>

                <span class="old"><?php echo $this->helper('checkout')->formatPrice($_product->getPrice()) ?></span>&nbsp;

                <span class="new"><?php echo $this->helper('checkout')->formatPrice($_product->getSpecialPrice()) ?></span>

            <?php else: ?>

                <span class="new"><?php echo $this->helper('checkout')->formatPrice($_product->getPrice()) ?></span>

            <?php endif; ?>

            </div>

            <?php echo $_product->getShortDescription() ?>

            <div class="clear"></div>

          

        </td>

    <?php if ($i%4==0 && $i!=$_collectionSize): ?>

    </tr>

    <?php endif ?>

    <?php endforeach ?>

    <?php for($i;$i%4!=0;$i++): ?>

          <td class="empty-product">&nbsp;</td>

    <?php endfor ?>

    <?php if ($i%4==0): ?>

    </tr>

    <?php endif ?>

    </table>

    <script type="text/javascript">decorateTable('product-list-table')</script>

</div>

Step 4: Display the featured products on frontent Home Page:

You copy and Paste the following code into CMS home page

{{block type="core/template"  name="product_featured" as="product_featured" template="catalog/product/featured.phtml}}

Step 5:

Go to admin-> Catalog-> Manage Products-> add new Products:

Input full information for product.

You will see Featured Products on left side: choose Yes. And Save Products.

Now go back to Homepage and refresh. You should see the attribute product you’ve created.

Adding a Static Block to your .phtml files in Magento

Adding a Static Block to your .phtml files in Magento
 
There are various ways to call your static blocks to your Magento frontend out there but if you are working in the .phtml and .xml files then you’d have some reading to do just to get it to work. Let’s go step by step:

1. Create 1 CMS Static Block at CMS/Static Block /Add new Block

2. Call a Static Block to your .xml files in Magento: Go to your .xml file in your Magento template’s LAYOUT folder. Just paste this code:
<block type="cms/block" name="cms_test_block" before="-">
    <action method="setBlockId"><block_id>cms_test_block</block_id></action>
</block>

You can call it by it’s name in file .phtml
<?php echo $this->getChildHtml('cms_test_block') ?>

3. Call a Static Block to your .phtml files in Magento: Go to your .phtml file, where you would like that static block to appear, then paste this code:
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId(cms_test_block)->toHtml() ?>

Disable all Local Modules at Once

         While going through the study guide for the Magento Developer Exam, I’ve been learning a few interesting details that are squirreled away in the Magento code, but can be useful in day to day Magento development.
For example, while going through the section on Module loading, it is revealed that we can easily disable all modules living in the local (app/code/local) namespace by editing app/etc/local.xml and setting the disable_local_modules node to true:


<config>
    <global>
        ...
        <disable_local_modules>true</disable_local_modules>
        ...
    </global>
    ...
</config>
 
 
 
Of course, if you have cache enable, clear or disable it to see the effects.
This will immediately prevent Magento from loading any code from your local code pool. You could use this to troubleshoot issues with custom modules or local Mage overrides. Of course, to find the exact culprit would require disabling individual modules one by one but at least you can narrow down your area of search quickly this way.
Note that this will not affect the community modules.
 

Best Free Online Resources for Learning PHP



PHP is an powerful server-side scripting language designed to help Web developers write dynamically generated pages quickly. PHP can be run from the command line, but the most usual place for PHP is within a web page where it can add dynamic content. PHP code is executed on the server, and the plain HTML result is sent to the browser. PHP is now a widely used scripting language on the Web. Perhaps the most important reason for its success is the support of a wide range of databases. Want to learn PHP but don’t know where to start? Below are list of the best online resources for learning PHP programming from scratch.

PHP Server-side scripting language

01. The official PHP website – PHP Manual

The official PHP website

02. W3 Schools PHP Tutorial

W3 Schools PHP Tutorial

03. Tizag.com – PHP Tutorial Learn PHP

Tizag Learn PHP

04. Webmonkey’s PHP Tutorial for Beginners

Webmonkey PHP Tutorial for Beginners

05. W3reference.com

W3reference

06. LearnPHPOnline.com

LearnPHPOnline

07. Webucator.com – PHP Tutorial

Webucator

08. Practical PHP Programming

Practical PHP Programming

09. PHPBuddy.com – PHP Quick Start

PHPBuddy PHP Quick Start

10. Getting Started with PHP Programming

Getting Started with PHP Programming

11. PHP 101: Down the Rabbit Hole

PHP 101

12. PHPKnowHow.com – Basics of PHP

PHPKnowHow Basics of PHP

13. About.com – Learn PHP

About Learn PHP

14. WikiBooks.org – PHP Programming

WikiBooks PHP Programming

15. FreeTechBook’s – PHP books

FreeTechBooks PHP books