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

Conversion Optimization

So many people have a myopic outlook on SEO and SEM. They tend to focus on optimization as strawberry field, where you can just pick a little fruit from here or there and fill up your basket. Not so fast. It’s not just about having a full basket,

Our New Look

Take a peak at our main website’s new look! We’re proud to present a brand new layout and style for Livewire Web Design. We work hard on your websites, so we took a few days to upgrade ours – we added a new optimization center that gives prices

What is in a name? SEO strategies for Facebook

Establishing Connections. Social media represents a critical marketing opportunity for small business in creating connections with potential clients through shares and referrals. There are certain marketing and SEO strategies that standout in creating value for your business. We all have that friend that excusably shares information just to

Fraternity Management Has a New Website

Fraternity management needed something up quickly and something that was affordable. Glad to know that they chose us as their Gainesville Web Design team.  Additional to the website they requested a simple program that managed their payment modules. As experienced PHP developers, we were able to quickly put

Leverage Browser Caching

When a webpage loads on your screen there are a lot of little pieces that have come together to create what you’re seeing. Your logo, other images, style sheets, javascript files are among some of the external resources a webpage might use to render itself on your screen.

The Flour Pot Bakery has a new website.

NEW!! Sally is one of a kind and so is her business. She really takes the time to put out a quality product and we wanted to give her that same high quality standard with her website that she is used to. FPB has some fantastic bread –