Adding simple values from cart?

General ShopSite user discussion
Post Reply
8900200
Posts: 47
Joined: Tue Oct 23, 2007 2:12 pm

Adding simple values from cart?

Post by 8900200 »

Ok, I think I understand how page and product templates work from developers standpoint. Now I'd like to add things like - cart total, and links to view cart. Can I simply add this to a page?

[-- IF STORE.Subtotal --]
[-- STORE.Subtotal --]
[-- END_IF --]

I tried to do this, but it returns "subtotal" where I have this code. I did have two products in the cart at the time.

Thanks
Rich
Jim
Site Admin
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Post by Jim »

I think what you are talking about doing is done with the minicart javascript. Go to the ShopSite help and search for "minicart" to see the documentation on how to do this. You could also look at one of the ShopSite templates that uses the minicart to see how it is done.

You can get a View Cart link by going to Merchandising > OrderAnywhere Select a product and click the Show Selected Html button. The View Cart will be the html at the bottom of the field. Just copy and paste it into your page where you want it to be. Note that the encrypted storeid value will change everytime you do this but any of them will work. (You could also copy the code from any ShopSite generated page that is displaying the View cart )
Jim
Site Admin
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Post by Jim »

Also note that on the MiniCart you need to enable it under Commerce Setup > Order System > Layout Info before it will show the cart subtotal on store pages using the minicart javascript.
8900200
Posts: 47
Joined: Tue Oct 23, 2007 2:12 pm

Post by 8900200 »

excellent. This looks like it will work well and it may solve the need I have on my other non-store pages where I'd like to display this type of info. Thanks

Rich
Post Reply