Richard Castera

Application Developer/Designer
  • Home
  • About
  • Projects
Apache, Drupal, PHP, Web Resources | No Comments | August 28, 2010

Drupal – How to install Drush

Drush Logo

What is Drush?

It’s a command line shell and scripting interface for Drupal. The Drush Package Manager allows you to download, enable, disable, uninstall, update modules/themes/profiles/translations from the command line in a very simple way (apt-get style) – just type,
drush dl views
and
drush pm-enable views
in a Drupal directory to install the Views project! Additionally, the Drush Package Manager also allows you to update all your modules and even Drupal core with just one command,
drush pm-update

Read the rest of this entry »
Ecommerce, Marketing, Web Resources | 1 Comment | August 21, 2010

5 ways to test the Usability of your E-commerce Site

Usability testing is a technique used to evaluate a product by testing it on users. It’s good practice to perform tests in combination with Split testing.

FiveSecondTest.com

Fivesecondtest helps you fine tune your landing pages and calls to action by analyzing the most prominent elements of your design. Here’s how it works:

  1. Upload a screenshot or mockup, set some questions you want answered and wait for the feedback to roll in!
  2. Testers have five seconds to view your image and must then answer the questions you have set.
  3. We collect all of the responses for you, extract the frequent keywords and then present the data with beautiful graphs.

Read the rest of this entry »
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"}}
MySQL, PHP, Web Resources | No Comments | June 15, 2010

MySQL – Using a Column Name Inside the LIKE Keyword

When using the LIKE keyword in a MySQL query, I use it the most typical way, LIKE ‘%STRING%’. One day, I was in need to use a column name instead and could not figure out how to do it! At first, I tried to just replace the string value with the column name like this, LIKE (%t.column%). The end-result was not good as the LIKE keyword expects a string.

So, I thought of trying the CONCAT() function since that returns a string. And it worked!

LIKE CONCAT('%', t.column)

Hope this helps someone!

MySQL, News, Web Resources | No Comments | June 14, 2010

MySQL – How to Export and Import tables with the Command Line

2 commands I use often throughout the day is importing and exporting large databases into MySQL VIA the command line. Here is how I do it where “USERNAME” is your username, “PASSWORD” is your password and “DATABASE” is your database name.

To Export:

mysqldump -uUSERNAME -pPASSWORD DATABASE | gzip -c > ~/dump_2010-06-14.sql.gz

To Import:

mysql -uUSERNAME -pPASSWORD DATABASE < database.sql

Also, you may have a large database that may give you errors while importing. You can use this command to force the import without warnings or errors:

mysql -f -uUSERNAME -pPASSWORD DATABASE < database.sql
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;" />
  • Page 1 of 14
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • ...
  • 14
  • >
  • 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