Home » Ecommerce » Code School: Woo Shipping Per Product Count Script

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

Search Engine Optimization

More important than ever and we’re at the leading edge. One of our best success stories is Rose Petals Nursery. We’ve been doing optimization for them for some time now with some great results. We’re dominating from top to bottom. Just check out this high level, competitive keyword: Old Garden

Review: WordPress Business Directory ★ ★ ★

[vc_row][vc_column width=”1/3″][vc_button title=”Where it’s at” target=”_blank” color=”btn-inverse” icon=”wpb_arrow” size=”wpb_regularsize” href=”http://codecanyon.net/item/wp-business-directory/2203258″][vc_column_text] ★ ★ ★ Features V1.8 Premium Membership (Paypal) Location Based Search Internationalization CSV Import with auto map location finder[/vc_column_text][/vc_column][vc_column width=”1/3″][vc_column_text] 3 Stars out of 5 This is a wordpress plugin We took off one point for poor style

The problems with Wix

Wix is a do-it-yourself website builder. While this may seem to be in direct competition with Gainesville Web Design companies, they fill an important niche; mainly, those customers that cannot afford a professional website but still desire to have a nice looking design for their business. The templates

Raven Tools

Took a look at Raven SEO tools today. Really, not all that impressed. They have a good price but it mostly looks like you’re just hooking up other services to be managed in one location. That’s valuable in and of itself, but not really what we’re looking for

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,