941-685-8851

‘Ecommerce Shopping Carts’

Magento 1.6 category thumbnails on home page

It is often desirable to display categories on the home page opposed to products, then display the products on the respective category page. To add categories along with thumbnaile images on the homepage paste the following code into your homepage from the Magento Admin: CMS > Pages > Home.
{{block type=”catalog/navigation” name=”catalog.category” template=”catalog/category/list.phtml”}}

Create a list.phtml file in your Magento template files at: /app/design/frontend/default/default/template/catalog/category/list.phtml .
Paste the following code into this new list.phtml page:

<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php $open = $this->isCategoryActive($_category); ?>
<?php
$cur_category=Mage::getModel('catalog/category')->load($_category->getId());
$layer = Mage::getSingleton('catalog/layer');
$layer->setCurrentCategory($cur_category);
if ($immagine = $this->getCurrentCategory()->
getThumbnailUrl()):
?> <div style="float: left; padding-right: 30px; text-align: center;">
<div class="linkimage">
<p>
<a href="<?php echo $this->getCategoryUrl($_category)?>">
<img src="<?php echo $immagine ?>" alt="<?php echo $this->htmlEscape($this->getCurrentCategory()->getName()) ?>" width="135" height="135" />
<?php echo $_category->getName()?>
</a>
</p>
</div>
</div> <?php endif; ?>
<?php endforeach; ?>
Now create a getThumbnailUrl function at App/Code/Core/Mage/Catalog/Model/category.php line 490, after getImageUrl() :

public function getThumbnailUrl()
{
$url = false;
if ($image = $this->getThumbnail()) {
$url = Mage::getBaseUrl('media').'catalog/category/.$image;
}
return $url;
}

Then upload a thumbnail image at Catalog > Manage Categories >
Share
 

Magento sidebar category navigation 1 level reversed order

I needed to create a left sidebar category navigation which display only the top level categories. The category display order in this navigation needed to be reverse that of the default category display order. For example, here is a screen capture of the Manage Categories interface in the Magento administration.

Magento Ecommerce web design

Below is a screen capture of the Magento shopping cart website frontend. Sorting the category order in the Manage Categories administration (shown above) will determine how the categories are sorted on the frontend.

Magento Ecommerce shopping cart website design

The code to create this Magento vertical category navigation is:

<ul id=”category-nav”>
<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php if($_category->name!=””):  ?>
<ul id=”category-nav”><?php foreach ($this->getStoreCategories() as $_category): ?><?php if($_category->name!=””):  ?><li><?php echo $this->drawItem($_category) ?></li><?php endif?><?php endforeach ?></ul>
<?php endif?>
<?php endforeach ?>
</ul>

But in the case of this particular ecommerce shopping cart web design, I need the top horizontal navigation to retain the sort order defined in Manage Categories, and the left sidebar vertical navigation to display a reverse order of that defined in Manage categories.

Magento Ecommerce shopping cart website development

The code to create this Magento vertical category navigation with a reverse sort order is:

<ul id=”category-nav”>
<?php $helper = Mage::helper(‘catalog/category’);
$categoryCollection = $helper->getStoreCategories(false,true,false);
$categoryCollection->addAttributeToSort(‘level’, ‘asc’)
->addAttributeToSort(‘position’, ‘desc’)
->addAttributeToFIlter(‘level’, array(‘eq’ => ’2′));  //Added to limit to only level 1 categories.; ?>

<?php foreach ($categoryCollection as $_category): ?>
<?php if($_category->name!=”"):  ?>
<li><a href=”<?php echo $this->getCategoryUrl($_category); ?>”title=”<?php echo $this->htmlEscape($_category->getName(‘position’, ‘desc’)); ?>”>
<?php echo $this->htmlEscape($_category->getName()); ?></a></li>
<?php endif?><?php endforeach ?>
</ul>

Share
 

Magento Category navigation top level only

Sometimes ecommerce websites can have a lot of sub-categories. The Magento shopping cart provides an extremely flexible and powerful toolset to organize ecommerce shopping cart products and their respective category and sub-category parent child assignments.

But sometimes numerous sub-category levels can be overwhelming for the average shopping cart website consumer. There is a method in the Magento shopping cart administration to limit category levels globally for the whole ecommerce website. But what if you want to limit category levels for just one custom navigation menu. Here is how to do it.

Edit the template file, usually located in: app > design > frontend > default > your_theme > template > catalog > navigation >

The Magento category navigation code looks like this:

<ul id=”category-nav”>
<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php if($_category->name!=”"):  ?>
<li><?php echo $this->drawItem($_category) ?></li>
<?php endif?>
<?php endforeach ?>
</ul>
Replace the following line:
<li><?php echo $this->drawItem($_category) ?></li>
with this line:

<ul id=”category-nav”><?php foreach ($this->getStoreCategories() as $_category): ?><?php if($_category->name!=”"):  ?><li><?php echo $this->drawItem($_category) ?></li><?php endif?><?php endforeach ?></ul>

Your Magento category navigation will now display only the top level category.

Share
 

Magento remove discount coupon code

Magento offers a built in coupon code feature to provide shopping cart customers with discounts when shopping on their ecommerce website. You can post discount codes in emails, blogs and social networks to generate more traffic and entice paying customers to your ecommerce website. But often, website owners don’t want to offer discount codes on their shopping cart.  Fortunately for ecommerce web designers, it is quite easy to disable the discount coupon code function on a Magento shopping cart website.

Edit your checkout.xml layout file. The default file in Magento 1.6 would be located in app/design/frontend/base/default/layout/checkout.xml

Remove the following block:

<block type=”checkout/cart_coupon” name=”checkout.cart.coupon” as=”coupon” template=”checkout/cart/coupon.phtml”/>

This block can be found within <reference name=”content”>

Refresh the Magento cache and the discount coupon code menu will be removed.

Share
 

Magento remove Try Magento Go for Free

In the Magento admin to the right of the top navigation menu bar, there is a “Try Magento Go for Free” link, which links to the magentocommerce website. This is great for someone who is installing, developing and administrating a Magento ecommerce website themselves. However, what if you are a Magento shopping cart web designer developing an ecommerce website for a client. When the client tries to administer the shopping cart website,  such a link can prove to be quite confusing. To avoid this client confusion, it is best to simply remove the link. Here is how to  remove the “Try Magento Go for Free” link in the Magento admin.

Edit the following file:

/app/design/adminhtml/default/default/template/page/header.phtml

Delete the following:

<a href=”http://golinks.magento.com/CE15″ onclick=”this.target=’_blank’” class=”go-try”><?php echo $this->__(‘Try Magento Go for Free’) ?></a><span class=”separator”>|</span>

The ”Try Magento Go for Free” link will now be removed from the Magento admin.

Share
 

Magento remove Get help for this page

In the Magento admin to the right of the top navigation menu bar, there is a “Get help for this page” link, which links to the magentocommerce website. This is great for someone who is installing, developing and administrating a Magento ecommerce website themselves. However, what if you are a Magento shopping cart web designer developing an ecommerce website for a client. When the client tries to administer the shopping cart website,  such a link can prove to be quite confusing. To avoid this client confusion, it is best to simply remove the link. Here is how to  remove the “Get help for this page” link in the Magento admin.

Edit the following file:

/app/design/adminhtml/default/default/template/page/menu.phtml

Delete the following:

<a id=”page-help-link” href=”<?php echo Mage::helper(‘adminhtml’)->getPageHelpUrl() ?>”><?php echo $this->__(‘Get help for this page’) ?></a>
<script type=”text/javascript”>$(‘page-help-link’).target = ‘magento_page_help’</script>

<a id=”page-help-link” href=”<?php echo Mage::helper(‘adminhtml’)->getPageHelpUrl() ?>”><?php echo $this->__(‘Get help for this page’) ?></a>    <script type=”text/javascript”>$(‘page-help-link’).target = ‘magento_page_help’</script>

The ”Get help for this page” link will now be removed from the Magento admin.

Share
 

Florida tax rates for ecommerce shopping cart websites

When you sell products via an ecommerce shopping cart website, tax laws are similar to that of mail order. Tax is only required if the purchaser resides in the same state as the seller. Many states have a single, flat tax rate. For example, Connecticut has one 6% tax rate for the entire state. Other states allow counties to levy an additional local tax ontop of the state tax rate. For example, Florida law mandates a minimum sales tax rate of 6%, however, the law also provides for an optional local sales tax that allows each county to set its own local tax that is collected on top of the general state rate.

This means that a Florida resident will often pay a different sales tax rate from one Florida county another.  If theFlorida resident purchases a product from Connecticut, they pay no sales tax because they are not a resident of Connecticut. The same rule applies to ecommerce shopping cart websites. If the person purchasing from you shopping cart website resides in the same state as you, you must collect sales tax. If they reside in a different state from you, you do not collect sales tax. When configuring an ecommerce website, not only must we configure the base state tax, but the county state taxes must also be accommodated. This is determined by zipcode.

Below is a list of the current rates for each county in the Florida.

Alachua     6.25%
Baker     7.00%
Bay     6.50%
Bradford     7.00%
Brevard     6.00%
Broward     6.00%
Calhoun     7.50%
Charlotte     7.00%
Citrus     6.00%
Clay     7.00%
Collier     6.00%
Columbia     7.00%
De Soto     7.00%
Dixie     7.00%
Duval     7.00%
Escambia     7.50%
Flagler     7.00%
Franklin     7.00%
Gadsden     7.50%
Gilchrist     7.00%
Glades     7.00%
Gulf     7.00%
Hamilton     7.00%
Hardee     7.00%
Hendry     7.00%
Hernando     6.50%
Highlands     7.00%
Hillsborough     7.00%
Holmes     7.00%
Indian River     7.00%
Jackson     7.50%
Jefferson     7.00%
Lafayette     7.00%
Lake     7.00%
Lee     6.00%
Leon     7.50%
Levy     7.00%
Liberty     7.00%
Madison     7.50%
Manatee     6.50%
Marion     6.00%
Martin     6.50%
Miami-Dade     7.00%
Monroe     7.50%
Nassau     7.00%
Okaloosa     6.00%
Okeechobee     7.00%
Orange     6.50%
Osceola     7.00%
Palm Beach     6.00%
Pasco     7.00%
Pinellas     7.00%
Polk     7.00%
Putnam     7.00%
St. Johns     6.00%
St. Lucie     6.50%
Santa Rosa     6.50%
Sarasota     7.00%
Seminole     7.00%
Sumter     7.00%
Suwannee     7.00%
Taylor     7.00%
Union     7.00%
Volusia     6.50%
Wakulla     7.00%
Walton     7.00%
Washington     7.00%

Share
 

Magento remove Estimate Shipping and Tax

Magento offers a built in Estimate Shipping and Tax feature to provide shopping cart customers with realtime feedback of tax and shipping estimation when shopping on an ecommerce website. But often, website owners don’t want to display the Estimate Shipping and Tax function on their shopping cart website. For example, some shopping cart website owners will offer free shipping or flat rate shipping, which makes shipping estimation irrelevant, not to mention confusing and distracting to ecommerce customers.  Fortunately for ecommerce web designers, it is quite easy to disable the Estimate Shipping and Tax function on a Magento shopping cart website.

Edit your checkout.xml layout file. The default file in Magento 1.6 would be located in app/design/frontend/base/default/layout/checkout.xml

Remove the following block:

<block type=”checkout/cart_shipping” name=”checkout.cart.shipping” as=”shipping” template=”checkout/cart/shipping.phtml”/>

This block can be found within <reference name=”content”>

Refresh the Magento cache and the Estimate Shipping and Tax menu will be removed.

Share
 

Manually Change Base URL

When moving a Magento ecommerce website to a new server, you may need to access the shopping cart website and backend administration on a temporary development url. To manually change the Magento Commerce base url to the new development url:

  • open the magento ecommerce database in PHPMyAdmin
  • browse the database table ‘core_config_data’
  • locate the field ‘web/unsecure/base_url’ and click ‘Edit’ to open it for editing
  • change the ‘value’ field to the new development domain url
  • click ‘Go’
  • Close PHPMyAdmin
  • Open the ‘Var>Cache’ with FTP, file manager or SSH
  • Delete all the content

Your Magento ecommerce website will now work on the new development url.

Share
 

Magento Tax per state

Internet Ecommerce shipping transactions typically require tax only if the product sold is being shipped to the merchant’s state of residence. Here is how to set up tax by state in Magento.

System>Configuration>Sales>Tax>Tax Classes> Tax Class for Shipping> select ‘Taxable Goods’ from dropdown menu

- Default Tax Destination Calculation>Default State> select the Merchant’s state of residence from dropdown menu
- Default Tax Destination Calculation>Default Post Code> wildcard asterisk will include all postal codes in the state

- Shopping Cart Display settings>Display Prices> set to Excluding Tax
- Shopping Cart Display settings>Display Subtotal> set to Excluding Tax
- Shopping Cart Display settings>Display Shipping Amount> set to Excluding Tax
- Shopping Cart Display settings>Include Tax In Grand Total> set to No
- Shopping Cart Display settings>Display full tax summary> set to No
- Shopping Cart Display settings>Display Zero Tax Subtotal> set to Yes

- Orders, Invoices, Creditmemos Display Settings> same as Shopping Cart Display Settings

- Sales>Tax>Manage Tax Zones & Rates> add new tax rate or edit the current tax rate>Tax Rate information> set to the Merchant’s state criteria, use wildcard asterisk for Zip/Post Code

- Catalog>Manage Products>[edit product]>Prices>Tax Class> set to Taxable Goods

Share