Cubecart custom category order

So I developed another new mod for cubecart, this one allows you to sort out your categories in cubecart the way you want without staying with the normal sort by name or id as seen in other mods. This mod only modifies 3 files and installs one column “pos” to your database to do the ordering. Remember to back up your database and files before attempting any modification on your original files. To download this file click on the link below.

Custom category ordering 1.0

custom_category_order_1.3 (updated for manual ordering)

Cubecart multiple delete and re categorize admin hack

I am developing a new shopping cart using the cubecart system, the client has about 2500 parts in the database. After importing these products into the database I noticed that a good 500 were mis categorized and about 100 were out of date and had to be removed. Cubecart didnt have any support for multi re-categorize or multiple deletes so I created the following hack. This hack will allow you to check off all the products on the product view page and do 2 different things. Either delete the selected products or move the selected products to a different category. To enable this hack in your cubecart admin panel paste the code in the following areas .

Due to people not being able to copy the code correctly I have pasted it in a text file which can be viewed here

You can also download my own index.php with the mod already installed, this will work perfect for you if you havent already modded your admin/products/index.php. Download that file here:

mysql update from another table

Recently I needed to update a bunch of rows in mysql with information from another table. I will explain how to do this simple process.

  1. Open up phpmyadmin or similar database editor
  2. view the sql query below
UPDATE updatefrom p, updateto pp 
SET pp.last_name = p.last_name 
WHERE pp.visid =

Lets say we have 2 tables one named main and one named updateto and one named updatefrom, In the first line we assign variables to these t tables (p and pp) from there we can call column names using this format table.columname. If we had first_name and last_name in both tables and wanted to update the “updateto” table with the info from “updatefrom” this is how you would write it.

Jquery Wizard Plugin

After looking for a jquery plugin that will emulate a windows wizard I decided to make my own (with the help of cody lindley’s css step menu). I am using Jquery which can be found here and css step menu found here.

The code:

First we need a simple javascript function will hide and display a div, this method is used with jquery and you can learn how to use this here

function loadnext(divout,divin){$("." + divout).hide();$("." + divin).fadeIn("slow");}

Next the html code, notice how each step is wrapped in the ID wizardwrapper and each div is assigned a class for the corresponding step number.



Step 1




Step 2




Step 3




Step 4




Step 5



A Demo of the wizard

Create Custom google maps

I was browsing the google maps API the other day and came up on something pretty cool, google now allows you to make custom maps right on their website. Previously only the tech savvy knew how to accomplish through server side scripts such as PHP, not anymore! I played around with it a bit making a map for a website I’m working WCMP. You can draw lines, squares and circles and put markers wherever you want on the map. Google also boasts a rich editor to format the description of your marker even going as far as putting in pictures. This is a great tool for your clients website or even document a recent vacation you went one. Check it out, heres the one I made. If you make a cool map feel free to post it here so I can take a look.

Dynamic PHP Email Forms without massive amounts of code

Ever had a HUGE form that just emails basic information and just thought to yourself, damn there has to be an easier way to do this! I’ve got a solution that will work, basicly what it does is takes the form loops all the input fields and sends them through email (or proccess them any way you would like) I’ll go over the basics here.

First we need a form Lets start with something simple

Name: Email: Address:

Now to process it, first we will import all variables and send them through a loop


$server = $_SERVER['HTTP_HOST'];      

foreach($_POST as $key => $data) { 
  if($key != 'required') { 
      if($data !='') { 
          $message .= ''.$key.': '.$data.''; 


Now you can display your information if you wish or go further to send it with an email, im using a email class i built which you can download here.

echo '


Your forum Has been sucessfully sent with the following information

'.$message.' '; $m = new Mail(); // create the mail $m->From( "" ); $m->To( "" ); $m->Subject( 'New forum submission from '.$server.' Contact Page' ); $m->Body( $message); $m->Priority(4); $m->Send(); // send the mail

This method is very easy for sending simple forms where serverside validation is not needed. Check it out play with it and post if you have any questions ill be happy to help!

Worcester Wide Web gets new website

I started development on this new website you are currently viewing, this website is going to be a little bit different then the previous website I had up. I am going to focus on posting design code and snippets from php to ajax. This site is now sort of a side project as one of my contractors (one of the largest growing design firms in Worcester) opened up into what seems to becoming a full time employment position.  Dont get me wrong I am still taking projects on any scale but my time is just limited as of lately. I will be posting some new work as well as all my old work in the category “portfolio” and I will have a new get a quote section coming up very soon. So make sure you bookmark this website and check back soon.