Code School: Woo Shipping Per Product Count Script

Here’s a little snippet that has been useful for woocommerce development. This regulates shipping charges from a simple fee based system to a fee per quantity output. We modified this to allow for a couple of different shipping charge options based on quantity – first by three’s and then free shipping if over 9 are purchased.

cart->get_cart_contents_count();

// if we have items that need shipping, round the quantity / 2 to the nearest whole number

// this produces tiered cost increases for every 2 items

if ( $cart_item_count > 1 ) {

$cost = ceil( $cart_item_count / 3 ) * $cost;

}
return $cost;

}

add_filter( ‘woocommerce_shipping_rate_cost’, ‘njengah_wc_shipping_cost_tiers’, 10, 2 );

More Web Design Blog Content

Why is WordPress our Go-To CMS?

Easy. It’s easy. Easy to use, operate and teach. We have dealt with virtually every blogging and Content Management Software out there, in existence, forever. Seen them all. Virtually all of them have their individual issues, yes, even WordPress. But few are as intuitive and easy to learn.

New apps coming down the pipe

We have 6 new apps coming out over the next few months. Very excited to roll these out – unfortunately we can’t give you too many details but we have a couple apps geared toward attorneys and the legal industry, one that deals with product shipping and another

WordPress Email Issues

Every now and again we run into issues with WordPress where the email functionality has stopped working. This is usually the result of corrupted core files and/or plugin conflicts. Easy enough to fix: disable plugins or upload a fresh copy of the software and you’re good to go.

Moving Day

Moving day, er, week, here at Livewire. New offices located at 2606 NW 6th Street are being filled in with all of our useful junk. Very exciting to be in a premium location with large signage and great new neighbors. Livewire has teamed up with Gnosys Networks to

Hey, Look What We Did…

Our programmers are the best in the business. We just finished a great new project at referralfeelawyers.com. This service connects lawyers with lawyers that pay referral fees for, you guessed it, referrals. The website features custom attorney profiles, administrative control over practice areas and geographical data….all kinds of

Why are most government websites so terrible?

The recent debacle with the Affordable Care Act has made headlines but those of us in the development world are just seeing more of the same old thing. Government websites stink! Why is that? I can assure you that their cost structure is very similar to the outrageous