Advertisement
tribulant

Check if there are items in the cart

Mar 26th, 2014
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.20 KB | None | 0 0
  1. <?php
  2.  
  3. global $Item, $Order;
  4. $co_id = $Order -> cart_order();
  5. $item_count = $Item -> item_count($co_id, 'items');
  6.  
  7. if (!empty($item_count) && $item_count > 0) {
  8.     //there are items in the cart
  9. }
  10.  
  11. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement