tribulant

Shopping Cart link

May 24th, 2011
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.31 KB | None | 0 0
  1. <?php
  2.  
  3. if (class_exists('wpCheckout')) {
  4.     $wpCheckout = new wpCheckout();
  5.     global $Item, $wpcoHtml, $Order;
  6.     $order_id = $Order -> current_order_id();
  7.     $items_count = $Item -> item_count($order_id, 'items');
  8.  
  9.     echo '<a href="' . $wpcoHtml -> cart_url() . '">Shopping Cart (' . $items_count . ')</a>';
  10. }
  11.  
  12. ?>
Advertisement
Add Comment
Please, Sign In to add comment