Bring Your Business to Life › Support › Image Store › Adding items in cart to page
- AuthorPosts
- March 11, 2015 at 10:04 pm #256957
Xpark Media
Keymasteryou 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
March 12, 2015 at 6:29 am #257209totallytech
ParticipantThank 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?
March 12, 2015 at 7:01 am #257219totallytech
ParticipantIs 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?March 13, 2015 at 12:15 am #257599Xpark Media
KeymasterThe “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;
- AuthorPosts
- You must be logged in to reply to this topic.