Adding simple values from cart?

General ShopSite user discussion

Adding simple values from cart?

Postby 8900200 » Sat Nov 03, 2007 3:57 pm

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
8900200
 
Posts: 47
Joined: Tue Oct 23, 2007 2:12 pm

Postby Jim » Sat Nov 03, 2007 4:20 pm

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

Postby Jim » Sat Nov 03, 2007 5:03 pm

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.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby 8900200 » Sun Nov 04, 2007 7:24 am

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
8900200
 
Posts: 47
Joined: Tue Oct 23, 2007 2:12 pm


Return to User Forum

Who is online

Users browsing this forum: No registered users and 87 guests

cron