Jump to:

2084 Posts in 1005 Topics by 453 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » Referencing Country Code instead of Country

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
Go to End
Author Topic: 1692 Views
  • mschiefmaker
    Avatar
    Community Member
    187 Posts

    Referencing Country Code instead of Country Link to this post

    Hi

    I am writing an payment method for Paymate but the country field is not populating when I pass through the country, if I was to pass the country code instead it would work. I just need to work out how to. To reference country I use "pmt_country" => $m->Country, I have tried "pmt_country" => $m->Country.Value and "pmt_country" => $m->Country->Value

    As always thanks

    MM

  • mschiefmaker
    Avatar
    Community Member
    187 Posts

    Re: Referencing Country Code instead of Country Link to this post

    Have just realised the country is stored as the code not the name (should have checked the database originally) so the problem is not where I thought is was. Passing the country you need to place it in "" so the entry in the info array becomes "pmt_country" => "$m->Country"

    MM

  • boombox
    Avatar
    Community Member
    44 Posts

    Re: Referencing Country Code instead of Country Link to this post

    Greetings
    Do you have a working verison of the Paymate method that I can try out please? I am using the eCommerce 0.6 and Payment modules and PaymateExpressPayment method supplied by RICP but can't get this to work - getting a single error on Checkout page
    Bad class to singleton() - PaymateExpressPayment

    Thanks for your assistance

  • mschiefmaker
    Avatar
    Community Member
    187 Posts

    Re: Referencing Country Code instead of Country Link to this post

    Hey

    Sorry so slow to respond. Have a look at attached. It was built for 0.52 (I think) but might help esp. the comments. Paymate has a few 'features' that had me stumped for a bit.

    There are couple of issues with the code that are still to be ironed out. See http://www.silverstripe.org/e-commerce-module-forum/show/274386#post274386#post274386 for details.

    Would be interested in any feedback or improvements you have to add.

    Cheers

    Catherine

    Attached Files
    1692 Views
Page: 1
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.