Wednesday, July 29, 2009

OSCommerce hack to faciliate drop shipping

Today I did a little hack job on one of my OSCommerce store fronts.

See, the problem was that I wanted to offer t-shirts on one of my client's sites, but they didn't want to carry inventory off the go. As I'm sure you realize, this is why sites like CafePress and SpreadShirt were created.

Small problem - these sites make you maintain a separate cart. So, if you're selling stuff on your site with full e-commerce capability, then it's bad form to direct the consumer to ANOTHER site to buy another one of your products.

That said, if you're going to take this back-door approach until volume increases, how do you do it and still cover shipping for these products that are shipped separately?

Well, the way I solved it, using an OSCommerce cart, was to modify the flat rate shipping module as follows:


// class constructor
function flat() {
global $order, $cart;

$this->code = 'flat';
$this->title = MODULE_SHIPPING_FLAT_TEXT_TITLE;
$this->description = MODULE_SHIPPING_FLAT_TEXT_DESCRIPTION;
$this->sort_order = MODULE_SHIPPING_FLAT_SORT_ORDER;
$this->icon = '';
$this->tax_class = MODULE_SHIPPING_FLAT_TAX_CLASS;
$this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);

$spreadshirtActive = 0;
foreach ($cart->get_products() as $this_product) {
if ( ($this_product['model'] == 'Spreadshirt') && ($spreadshirtActive == 0) ) {
$this->shippingCost = MODULE_SHIPPING_FLAT_COST + 6;
$spreadshirtActive = 1;
} else {
$this->shippingCost = MODULE_SHIPPING_FLAT_COST;
}
}

if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FLAT_ZONE > 0) ) {
$check_flag = false;
$check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_FLAT_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
while ($check = tep_db_fetch_array($check_query)) {
if ($check['zone_id'] < check_flag =" true;">delivery['zone_id']) {
$check_flag = true;
break;
}
}

if ($check_flag == false) {
$this->enabled = false;
}
}
}

// class methods
function quote($method = '') {
global $order;

$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_FLAT_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_FLAT_TEXT_WAY,
'cost' => $this->shippingCost)));

The magic here happens with the 'cost' => portion of the $this->quotes array. $this->shippingCost is set above that to be a function of the products model. This works because I puth the $cart object into this class using the global $cart;...

Now, if some one orders my base product, it's a flat shipping cost. For any other drop shippers which add additional cost to me, I can pass that cost on to the consumer.

I also modified product_info.php to remove the model if statement so the field doesn't get displayed to consumers.

Just a quick little hack that might be useful to you...

Friday, July 10, 2009

Share what?

We just launched a new blog for a client at JustMonkeyingAround.com. Part of that blog, was a custom ShareThis.com execution. As is typical, we saundered around the web to find good examples where people have used ShareThis.com in a similar fashion.

Our search yielded three pretty cool examples. The first is Kelsey & Trask, P.C. They are attorneys. Their execution is very simple and lend itself well to our discussion.

The next, and probably most creative execution is at Daryl Cagle's cartoon blog. I like the drawing style and some of the subtle animations he puts on his icons. My only piece of feedback would be that he discarded the well known branding of the ShareThis.com logo. In my opinion, he should have made a cartoon rendition of their logo rather than the balloon comment that he uses for his logo. None the less, nice execution!

The final, and probably nicest example, comes from Mashable (this particular post is actually about social posting systems... Go figure.). Another neat feature on their site is the "Follow Mashable" section. This section has links to Twitter, RSS, FeedBurner and Facebook. Another site they use is AddToAny.com. AddToAny.com is similar, but different, than ShareThis.com.

Think of it this way... ShareThis.com is all about you pushing content out TO OTHERS whereas AddToAny.com seems to focus more on social media options that are utilized for you to store the bookmark breadcrumbs of your own online exploits and explorations for future use.

AddToAny.com is about what I want to save and how I want to save it. ShareThis.com is about what I want to share with others.

These are good things to levarage. Do it and revel in the higher traffic you'll receive.

- Ray

Friday, March 20, 2009

Facebook February Changes... OMG!!!

In February, Facebook made some stunning changes to how it leverages Pages...

For those not in the loop, "Profiles" are for people. For businesses and organizations, Facebook created "Groups" and "Pages". Of the two, Pages are specifically oriented toward businesses and marketable entities (mascots, products and businesses).

For the past few months, I've had the general impression that Pages were nice... Now I think they are powerful.

What makes them so much better is that they are dumping Page's activities into the streams of individuals profiles. Before, they were going to a very obscure "Notifications" tab in your inbox. This one fact makes all of the difference in the world... assuming they stop causing usability problems by constantly changing the user interface... Ugh...

I have another theory which has to do with... Shhh... I'll tell you more early next week. This weekend a buddy of mine and I are going to play with something to see if an idea works. If it does, it might just be a whole new Facebook marketing strategy...

'till then, make it a great day!!!

- Ray