/ Published in: HTML
CREATE A HEADER MINI-CART IN WP E-COMMERCE - Part 1
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!--start header-cart--> <!-- name the class anything you like --> <span class="ge-count"> <? if (function_exists('wpsc_cart_item_count')) { // checks to see if this function exists if (wpsc_cart_item_count() == 0 || isset($_GET['sessionid'])) { // checks if count is zero or sessionid is set echo "Shopping cart is empty"; } elseif (wpsc_cart_item_count() == 1 || isset($_GET['sessionid'])) { // checks if count is one or sessionid is set echo wpsc_cart_item_count(); // this is the function that checks the item count in your cart ?> item in cart <? } else { echo wpsc_cart_item_count(); ?> items in cart <? } } ?> </div><!--close header-cart-->
URL: http://eckstein.id.au/11946/wordpress/wp-e-commerce-shop-cart/