Jump to:

2076 Posts in 857 Topics by 449 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » E-Commerce 0.6 beta 1 released

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Go to End
Author Topic: 18389 Views
  • Digital-Punk.co.uk
    Avatar
    Community Member
    51 Posts

    Re: E-Commerce 0.6 beta 1 released Link to this post

    Hi,

    add this in your mysite/_config.php file:

    // Set the currency of the site to be in NZD (New Zealand Dollars).
    Payment::set_site_currency('GBP');
    Currency::setCurrencySymbol('£ ');

    best regards
    digital punk

  • eskimo
    Avatar
    Community Member
    30 Posts

    Re: E-Commerce 0.6 beta 1 released Link to this post

    That is there, but I'm still getting the error message:

    "Fatal error: Call to undefined method Currency::getcurrencysymbol() in /home/wwdncouk/public_html/ecommerce/code/forms/OrderForm.php on line 70"

  • eskimo
    Avatar
    Community Member
    30 Posts

    Re: E-Commerce 0.6 beta 1 released Link to this post

    Also how do you set up the page PayPal redirects to? It is currently going to "Paypal/complete/" Which doesn't exist. Any ideas ?

  • TotalNet
    Avatar
    Community Member
    181 Posts

    Re: E-Commerce 0.6 beta 1 released Link to this post

    my bad.

    I assumed there would be a get method as well as the set method, I discovered this yesterday.

    change the code in orderform.php to:

    $total = new Currency('Amount');
    $total->setValue($currentOrder->Total());
    $paymentFields = Payment::combined_form_fields($total->Nice()." ".$currentOrder->Currency(), $currentOrder->Total());


    watch out for the line wrap on that last line

    If you don't want GBP showing try removing:
    ." ".$currentOrder->Currency()

  • eskimo
    Avatar
    Community Member
    30 Posts

    Re: E-Commerce 0.6 beta 1 released Link to this post

    I've done that and now it displays as:" £ " Which I think is nearly there.

    Also - I've added a Shipping Modifier and it works completely up to the point of going to PayPal - anyone know what that is?

    Cheers for all the help

  • TotalNet
    Avatar
    Community Member
    181 Posts

    Re: E-Commerce 0.6 beta 1 released Link to this post

    yep, it tries to encode the ampersand!
    try this in your config instead:
    Currency::setCurrencySymbol("£");

    works when I tested it, perhaps not ideal but it works.

    Don't use PayPal so can't help there sorry.

    Cheers,

    Rich

  • eskimo
    Avatar
    Community Member
    30 Posts

    Re: E-Commerce 0.6 beta 1 released Link to this post

    Nope that didn't work - just get a lot of ? in diamonds.

    Which payment provider do you use? PayPal is driving me nuts.

  • TotalNet
    Avatar
    Community Member
    181 Posts

    Re: E-Commerce 0.6 beta 1 released Link to this post

    I use Paymate, not sure it'll do UK banks though.

    Are your templates and other pages all saved as UTF-8? when the encoding is off that's when you get the diamonds etc.

    Rich

    18389 Views
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.