Quantcast
Channel: WordPress.org Forums » [WooCommerce] Support
Viewing all articles
Browse latest Browse all 104029

Double-A-Ron on "[Plugin: WooCommerce - excelling eCommerce] Total number of items in cart"

$
0
0

Hi,

What I'm looking to do is get the total number of items in the cart with a certain product attribute to stop people proceeding to checkout.

So far I've managed to find out how to pull the total number of products in the cart and use this to hide the proceed to checkout button with the following code which works fine:

$bottlesTotal = sprintf(_n('%d bottle', '%d bottles', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count);

But I now need to work out how to pull the total for items in the cart with the attribute of 'singleBottle' , this is the part which has got me totally stumped.

Any help would be greatly appreciated .......... Aaron

http://wordpress.org/extend/plugins/woocommerce/


Viewing all articles
Browse latest Browse all 104029

Trending Articles