2004 Posts in 533 Topics by 435 members
|Go to End|
22 February 2013 at 4:44pm Last edited: 22 February 2013 4:48pm
Hi to all, i am building a site using SS 3.0.3 along Swipestripe. I have two questions. Ive serached to no avail.
1) HOW TO RETRIEVE THE NUMBER OF ITEMS IN CART
<a href="cart" title="Cart | Panier d'chat"/>CART | PANIER D'ACHAT | <span>$WhichVariable????</span> ITEMS</a>
sits right corner of site. All i want to do is show the number of items in cart. If none, display 0 (zero).
2) HOW TO HAVE USER SWAP CURRENCY
Demo shows a pop-up menu where users can swap currency. Any recipie somewhere?
27 February 2013 at 2:19pm
I'll try and get the ball rolling on this discussion.
Hopefully I can help to push you in the right direction.
I'm not sure there is a direct answer for question number 1, as I don't think there is a total items variable available for you to use.
you may need to write something that takes advantage of the quantity variable, adding them together to give you a total.
to answer question 2, you will need to open the CMS and use the shop tab.
here's a few link to help you out:
5 March 2013 at 10:26am
Sorry I missed this question although I think we've sorted it out via email, for anyone else searching..
The Cart extension class is applied to Page_Controller so you should be able to access $Cart on all your pages (in this case some pages were directly inheriting from MultiLingualPage iirc which meant $Cart was not accessible on those page types). $Cart returns an object of type Order so $Cart.Items and $Cart.Products can be used in the template.
<% if CurrentMember %>
<li><a href="$CartLink(Logout)" class="rev">log out</a></li>
<li><a href="$CartLink(Account)" class="rev">your account</a></li>
<% else %>
<li><a href="$CartLink(Login)" class="rev">log in</a></li>
<% end_if %>
<i class="icon-shopping-cart icon-white"></i>
Multiple currency support is a seperate module/extension for SwipeStripe: http://swipestripe.com/products/extensions/currency/. There is an extension class that is also applied to Page_Controller so to get the currency select form you just need to add: $CurrencyForm to a template.
|Go to Top|