2004 Posts in 533 Topics by 435 members
E-Commerce Modules
SilverStripe Forums » E-Commerce Modules » Swipestripe questions
Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.
Moderators: martimiz, Nicolaas, Howard, Sean, Ryan M., biapar, Willr, Ingo, Jedateach, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 293 Views |
-
Swipestripe questions

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
This line
<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?
Thanks!
-
Re: Swipestripe questions

27 February 2013 at 2:19pm
Hi Wilsonstaff,
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:
http://swipestripe.com/dev/docs/swipestripe/en/Extensions/Currency
http://en.wikipedia.org/wiki/ISO_4217#Active_codesthanks,
-helenclarko -
Re: Swipestripe questions

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..
1)
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.<ul class="shop-links">
<% 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 %><li><a href="$CartLink">
<i class="icon-shopping-cart icon-white"></i>
$Cart.Products.Count
</a></li>
</ul>2)
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.The $CurrencyForm uses a select field that submits the form using javascript when the selected option changes.
| 293 Views | ||
|
Page:
1
|
Go to Top |



