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

Not All Backlinks Are Created Equal

Improving SEO Results with Link Building. Still trying to get higher SERP (Search Engine Results Page) placement? After months of trying is your company no higher on Google or Bing than before you concentrated on SEO keywords? The lack of results from your efforts may leave you confused

african american man using computer

How to Reset the SMC on Your Mac: A Step-by-Step Guide

How to Reset the SMC on Your Mac: A Step-by-Step Guide If your Mac is acting up—battery issues, overheating, or problems with sleep mode—it may be time to reset the System Management Controller (SMC). The SMC controls essential hardware functions like power management, battery charging, and thermal regulation.

Responsive Design and Why it is important for your Small Business Website

Responsive design provides users with quick seamless access to the same content regardless if they are using a smartphone, a tablet, or a laptop/desktop. “Web Design is responsive design, Responsive Wed Design is web design, done right.” – Andy Clarke A responsive design website responds to the device

Small Business Sees A Rise In Cyber Threats

Come on, let’s all live in the real world: we’re all vulnerable. Really the only chance you have these days is to make it as difficult as possible for any potential hacker to get to your valuable data. First and foremost this means protecting your data in transit.

Project Gutenburg

Every heard of it? If not, make sure to check it out. They have tons of books online, free for anybody. Our favorite? A Connecticut Yankee in King Arthur’s Court by Mark Twain http://www.gutenberg.org/ebooks/86 Got a smartphone? Just download a free e-reader and you’re all set. Download the

Phase 2 of Little Diamond Models is Complete

Phew! It took about 4 months of hard work but we finally finished phase 2 of one of our favorite client’s websites: Little Diamond Models. This is a huge website with a ton of great features. We started this project not even a year ago and it already