Adding items in cart to page

Bring Your Business to LifeSupportImage StoreAdding items in cart to page

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #256957
    Xpark Media
    Keymaster

    @totallytech,

    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

    #257209
    totallytech
    Participant

    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?

    #257219
    totallytech
    Participant

    Is there a list of variables that we can call?

    For example I have changed the single photo page layout slightly – http://goo.gl/MLgo1j

    It shows the Gallery Name -> Photo Name

    [Image] [Sidebar]
    [products]

    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?

    #257599
    Xpark Media
    Keymaster

    @totallytech,

    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 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.