Return to Snippet

Revision: 59288
at August 30, 2012 13:48 by ecksteing


Updated Code
<!--start header-cart-->
 <div id=""><a href="http://example.com/products-page/checkout/">
   <!-- 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
 <?    } 
              } ?> 
          </span></a>
    
</div><!--close header-cart-->

Revision: 59287
at August 30, 2012 13:46 by ecksteing


Initial Code
<!--start header-cart--> <div id=""><a href="http://example.com/products-page/checkout/"> <!-- 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 <? } } ?> </span></a> </div><!--close header-cart-->

Initial URL
http://eckstein.id.au/11946/wordpress/wp-e-commerce-shop-cart/

Initial Description
CREATE A HEADER MINI-CART IN WP E-COMMERCE - Part 1

Initial Title
CREATE A HEADER MINI-CART IN WP E-COMMERCE - Part 1

Initial Tags
php, html, wordpress

Initial Language
HTML