Engine23

Magento Ecommerce Strategy, Design & Development

Search Front and Center

We recently looked at the numbers to identify quick ways to improve a customer's conversion rates.  We saw that three times as many visitors were making purchases if they used the search bar than if they didn't.   Some of this can probably be associated to the fact that visitors who already know what they want are more likely to do a direct search for it.   However, we hypothisized it was also the difference between having exactly what a customer wanted right inside the door vs making them find it in the aisle.  The more work to find the product they want, the less likely they are to stick around long enough to find it. Thus we decided to to change around the header to encourage visitors to use the search bar.

 

Before:

Header Before

After:

YourPoolHQ Header After

Read more

Why Magento has become one of the best development platforms

Several years ago, I had heard that a new E-Commerce platform was growing in popularity.  Varien's Magento.  At the time it was community edition 1.3.  I was not impressed to say the least.  Things were awkward, it did not make a lot of sense on why there was SO much abstraction of files and folders.  I found it frustrating that even the original developers did not use their own standards!  What a train wreck!

Fastforward a few months:

I was asked by a local marketing firm to help them with some PHP and without asking too many questions, I said "Yes". It turns out that they had started to build a new commerce site and was sold on Magento by their original developer.  He had quit, and left them high and dry.  This was a huge problem because they were literally weeks from completion and they had no-one on staff who could understand what the heck was going on.  After some Q and A I found they had built their site on Magento 1.3 and could not find ANYONE in Omaha who has experience with it.  I reluctantly said I had poked around with it and found it very complicated (understatement of the year).

I decided that I knew enough to help and this began my quest to fix their issues.  

It turns out that they just needed some cleanup on the checkout, and some basic adjustments to the existing functions.  I was so releaved they did not need some custom extension, because I was NOT able to do much at that point in my Magento career.  

Read more

Magento: Install/Upgrade script setting timestamp

If you need to create a custom table and have a "created at" or perhaps an "updated at" column on your custom table.  That is typically something you want.

In order to get this accomplished you need to have one extra parameter.

<?php
/* @var $installer Mage_Core_Model_Resource_Setup */
$installer = $this;

$installer->startSetup();

Read more

Laravel Workbench Migrations & Seeds

Having some fun learning the Laravel framework and was trying to figure out how to do migrations and seeds for workbench packages. In general these are the commands, but read the rest for the particulars.

php artisan migrate --bench="Upshot/Poll"
php artisan migrate:rollback
php artisan db:seed --class="UpshotPollDatabaseSeeder"

Read more

Composer and Magento PSR-0 PSR-4 Autoloading

Alright, so your a modern PHP developer and know that most framework updates are adding composer support out of the box, or are already using it.  Sadly every time you develop in Magento you miss it and Magento’s 2.0 release with composer support is still a ways off. Well you’re in luck! Everyone give Mr. Damian Luszczymak a big hug for making an extension that adds composer support to Magento 1.0.  It adds the composer autoloader prior to Magento’s, so if there are ever any conflicts Magento’s should overwrite them.  Also, he did a great job of implementing it via an observer, so we shouldn’t have upgrade issues.

 

Alright, lets get down to it.  

1) Download the extension at https://github.com/magento-hackathon/Magento-PSR-0-Autoloader and install the files.

2) Add  <composer_vendor_path><![CDATA[{{root_dir}}/vendor]]></composer_vendor_path> to your main local.xml under global

3) Create a vendor folder in the Magento root folder

4) Install composer if you haven’t: https://getcomposer.org/

5) If you have composer installed as a global you can now go to the root Magento folder via command line and run "composer init" with defaults and "composer update".

 

That was very simple, and it works great!

Moving Mac public key to Linux ( CentOS )

Step 1: Find your Mac public key change into your ssh directory in terminal

cd ~/.ssh/

View your public key

cat id_rsa.pub 

Log into your CentOS via ssh and change into your ssh directory

cd ~/.ssh/

Create a id_rsa.pub

vim id_rsa.pub

You can truncate the entire known_hosts file, or just remove the same IP/URL that your trying to connect to, for us, to keep it simple we are just going to truncate the entire file

Read more

Shell script to create multiple versions of current project

I was asked to take a Magento codebase, split it off into 2 different exact copies.

They also wanted each to have updated local.xml with updated database credentials.

Furthermore, they wanted the databases replicated into 2 new ones, that the local.xml would be able to connect to.

#!/bin/bash

ok=0;

while ((ok==0))
    do
    echo "Choose your installation Type:"
    echo -e "\t(p) Probes"
    echo -e "\t(e) Education"
    echo -e "\t(b) Both"
    echo -e "\t(x) Exit"
    echo -n "Please enter your choice:"
    read choice
    case $choice in
        "p"|"P")

Read more

GIT - Checkout remote branch

If you know the branch you want, all you have to do is the following in a console:

git fetch && git checkout remoteBranchName

If you don't know for sure the branch you want, we can easily list all options. Issue the first part of the command

git fetch

This will update your computer with all the code and branches that are on the remote repository. Now we can type the following to get all available options

git branch --all

Or alternately

git branch -a

Now you finish the checkout with

git checkout remoteBranchName

You should see some output that looks similar to Branch remoteBranchName set up to track remote branch remoteBranchName from origin. Switched to a new branch 'remoteBranchName'

Now you're all set to develop on a branch that was created remotely. Don't forget you will have to commit and push (or create a pull request) any changes you make before your teammates can see them, and always remember to pull before you push!