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 );

The Brief Business Guide To Instagram

Instagram is a misunderstood product for most business owners. Isn’t facebook enough? No. Unfortunately you must not only adapt to the changing social media platforms but you have to keep adapting to all the various forms of networkings online. For some it’s fun, for others it’s a necessary

Preloading Images with Jquery

There are times when preloading images is an important step in keeping your site/page/program running smoothly. This is especially true in the era of mobile. Here’s a cute little snippet that does just that. function preload(yourarrayOfImages) { $(yourarrayOfImages).each(function(){ $(‘<img/>’)[0].src = this; }); } preload([ ‘img/image1.jpg’, ‘img/image2.jpg’, ‘img/image3.jpg’ ]);

How Your Company Can Benefit from SEO Analysis.

You know that it is essential to your business that it has a high ranking with search engines such as Google and Bing, but how do you achieve it? SEO analysis is the device, you need to know how well your strategy is working, and if it is

Updating WordPress Database After Website Move

Boy life sure would be easy if WordPress used relative URL’s throughout the menu and post content but that simply isn’t going to happen, they’ve made that clear. Changing the URL in the admin Settings would then be all you need to do, making moving installations a breeze.

New Web Program: Brain Development Maps

Creating braindevelopmentmaps.org was a great opportunity to work on a very interesting site; Shirley came to Livewire with very specific needs. There is nothing ‘typical’ or ‘standard’ about this website, it is in a word, unique. Braindevelopmentmaps.org allows users to view highly detailed brain mapped images online. These