Richard Castera

Application Developer/Designer
  • Home
  • About
  • Projects

Archive for the ‘Magento’ Category

Magento, News, PHP, Web Resources | 1 Comment | July 30, 2010

Magento – Add Static Block to CMS Page

Static blocks are a great way to add sections of HTML to your CMS or Catalog pages. I’m going to show you how to add a static block to a CMS page.

It’s a 2 step process and a very simple one. First, create your static block by going to CMS->Static Blocks. You will use the identifier of your static block to reference it on the CMS page. Edit the CMS page you would like this block to appear in, and add this code in the location where you would like it to show up:

{{block type="cms/block" block_id="home-page-promo"}}
Magento, PHP | 2 Comments | June 11, 2010

Magento – Get the Total Price of items currently in the Cart

Ever wanted to get the total price of items in your Magento cart? Here you go:

<?php echo $this->helper('checkout')->formatPrice(Mage::getSingleton('checkout/cart')->getQuote()->getGrandTotal()); ?>
Magento, PHP | 3 Comments | June 8, 2010

Magento – Contact Form Not Submitting Bug

Since the new release of Magento, people have been encountering a lot of problems. One of them in particular, seem to be the contact form. The error is, “Unable to submit your request. Please, try again later.” If you’re on Magento 1.4 and get this error when submitting the contact form, that’s because your template (theme) is not fully compatible with 1.4. Your Magento theme is overriding the form.phtml file with its own version, which doesn’t have the new line in it. Here’s what you’ll need to do to quickly fix this error:

Open this file in your theme folder:
app/design/frontend/default/YOUR_THEME/template/contacts/form.phtml

And add the following hidden field somewhere before the submit button:

<input type="text" name="hideit" id="hideit" value="" style="display:none !important;" />
Magento, My Thoughts, News, PHP, Web Resources | No Comments | May 17, 2010

Magento extensions and modern e-commerce

For an online retailer, choosing an e-commerce software platform is one of the most important decisions. Depending on the size of the business, the key requirements could vary from robustness and scalability critical for large retailers to the need for simplicity and flexibility for small store owners. Perhaps it is the ability to effortlessly meet the diverse needs of disparate audiences that has made Magento one of the fastest growing e-commerce applications globally. Already, the Magento e-commerce suite has carried out over US$25 billion in transactions via the 30,000+ merchants who rely on this platform, including some from the Internet Retailer Top 500 list. No wonder then that the platform continues to receive international acclaim, most recently from well known research organization Forrester Research which highlighted Magento as ‘unique’ among various e-commerce technology providers.

One of the key contributors to Magento’s rising popularity as the platform of choice is its ‘flexibility’ and the control that it puts in the hands of the online merchant. Unlike some of the other ‘closed’ or even open source e-commerce platforms, Magento does not place restrictions on business flows and processes. With over 1700 Magento extensions already available (and counting..), technology complements the business rather than business being shaped by the limits posed by technology.

Possibilities galore with Magento extensions

As the e-commerce and online marketing landscape evolves at frenetic pace, resulting in newer business models and novel marketing opportunities, online store owners need their technology to be as dynamic or risk being left behind. This is where the continuously expanding range of Magento extensions becomes invaluable.

Developers continue to enrich the application with powerful add-ons to fulfill even the not-so-obvious requirements of store owners. Presenting irrefutable proof of the value of the open source paradigm in e-commerce, these extensions help automate and optimize different business processes.

Characteristics of truly valuable Magento extensions

While new add-ons for the different Magento modules become available very regularly, some fundamental and seemingly obvious characteristics differentiate the really valuable extensions from the just OK ones. If you are looking for extensions for your business, run this simple 4-factor test.

  • Usefulness: An extension has to either help contribute to greater sales (revenues), build long-term customer engagement or improve operational efficiencies and effectiveness. Does the extension offer the features and functionality that will help you address your unique business needs or problems?
  • Cost-effectiveness: Is the price you pay for the add-on worth the value you expect to generate from using the extension?
  • Customizability: Can you customize your extension easily both in terms of front-end design as well as functionality to suit your specific needs?
  • User-friendliness: Is the extension easy to configure and use so that a store owner can focus on the business side of things? It should ultimately help save time, not add more work.

Epitomizing the above characteristics is the portfolio of extensions from aheadWorks, one of the largest Magento extensions development companies. The company’s range of free and paid-for add-ons, covers every aspect of the e-commerce process – back-end store administration, user experience, marketing and other operational aspects of the business.

Below, we briefly touch upon some of the most well-received Magento add-ons developed by the company:

(more…)
Magento, PHP | No Comments | February 24, 2010

Magento – Check if a User is logged in

You may want to check if a user is logged in with Magento, possibly to display a link or promotional item. Here’s how to do it:

<?php
if ($this->helper('customer')->isLoggedIn()) {
    echo("Anonymous user");
}
else {
    echo("Authenticated user");
}
?>
Magento, PHP | 1 Comment | February 24, 2010

Magento – How to Display the Product SKU

Sometime you may need to display the product Sku on the category page. This is easily achieved:

<?php echo($_product->getSku()); ?>
Magento, PHP, Web Resources | 5 Comments | August 24, 2009

Magento – How to run a SQL query against the database

In order to run a SQL query against the Magento database, you first need a resource model then a database connection.

$db = Mage::getResourceSingleton('core/resource')->getConnection('core_write');
$result = $db->query('SELECT 'entity_id' FROM 'catalog_product_entity');
if(!$result) {
    return FALSE;
}
$rows = $result->fetch(PDO::FETCH_ASSOC);
if(!$rows) {
    return FALSE;
}
print_r($rows);
  • Page 1 of 4
  • 1
  • 2
  • 3
  • 4
  • >
  • Premium Email Templates

    Social Profiles

  • Twitter
  • Facebook
  • LinkedIn
  • Digg
  • Google
  • GitHub

    Last Tweet

  • Beware the heat-seeking Nerf machine-gun coming to a cubicle near you http://om.ly/svHF #fb
  • Follow me
  • Archives

    • August 2010
    • July 2010
    • June 2010
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • October 2009
    • September 2009
    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • September 2008
    • August 2008
    • July 2008
    • June 2008
  • Categories

    • AJAX
    • Apache
    • Books
    • Drupal
    • Ecommerce
    • Flash
    • Google
    • Javascript
    • jQuery
    • Magento
    • Marketing
    • Mootools
    • My Thoughts
    • MySQL
    • News
    • Photoshop
    • PHP
    • Prototype
    • SEO
    • Web Resources
    • Wordpress
  • My Favorites

    • 37 Signals
    • Andrew Warner
    • Chris Coyier
    • Chris Shiflett
    • Collis Ta'eed
    • Development Seed
    • Drupal
    • HubSpot
    • James Padolsey
    • Joel On Software
    • John Resig
    • jQuery
    • Kevin Rose
    • Life Hacker
    • Magento
    • Mashable
    • Matt Cutts
    • Matt Ryan
    • MySQL
    • NetTuts
    • Noupe
    • Photoshop Tutorials
    • PHP
    • Smashing Magazine
    • Tech Crunch
    • WoorkUp
    • Wordpress

2010 © Copyright. Richard Castera - All Rights Reserved.

Top