Adding to page

HomeSupportImage StoreAdding to page

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #256388


    I’ve been rrying to get a section on my site showing either: Items in basket: XX or Your basket is empty.

    I’ve found this but its showing Your cart is empty no matter how much is in the cart…

    Any ideas how to pull this info out?

    echo "<header class='clearfix art-header-image-store'>";
    			$cart = $_SESSION['wfcart'];
    			foreach($cart->items as $item){
    				$count+= $cart->itemqtys[$item];
    			if ($count != '0') {
    			echo "<a href='' title='View Shopping Basket' alt='View Shopping Basket' />" . "Items in Basket: ". $count ."</a>";
    			} else { echo "Your shopping basket is empty."; }
    		echo "</header>"; 

    I’m assuming that $cart = $_SESSION[‘wfcart’]; is not correct, but I cannot find out where it is storing the number of items in the cart?

    Xpark Media


    you can access the entire cart data using the global $variable $ImStoreCart (object);

    To check if there is items in the cart use:

    if( !empty( $ImStoreCart->cart->items ){
       // do something here

    to display the number of items in the cart:
    echo $ImStoreCart->cart->items


    Thank you 🙂

    I’ve added this code

    if (!empty($ImStoreCart->cart->items)) {
    			$count = $ImStoreCart->cart->items;
    			echo "Items in Basket: ". $count;
    		} else { 
    			echo "Your shopping basket is empty."; 

    however it always shows the shopping basket is empty even if it isnt.

    any ideas?


    Is there a list of variables that we can call?

    For example I have changed the single photo page layout slightly –

    It shows the Gallery Name -> Photo Name

    [Image] [Sidebar]

    but I cannot work out how to find out the hyperlink for the gallery name.

    Plus, the link for [photos] [slideshow] [prices] [checkout] will all need adding.
    Is there a simple ‘$ImStoreCart->cart->checkout’ type code for each section?

    Xpark Media


    The “tools widget” removed the regular navigation and gives you a widget wit all tools that you can use in the sidebar.

    You can also create a page that you can use as a checkout page. using the shortcode

    [image-store car=true]

    for the car all you have to do is include the global object into scope just before your code use: global $ImStoreCart;

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.