Jump to:

2084 Posts in 1005 Topics by 453 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » getting URL parameters

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: 2921 Views
  • wildflower1975
    Community Member
    59 Posts

    getting URL parameters Link to this post

    I've got the eWay payment gateway returing to my site on the URL http://silverstripe/ewayctl/success/00073?debug_request=1

    I'm trying to get the $ID value of 00073 so I can edit that record on the Database, but it looks like the values are NULL by the time it gets to my controller

    Debug (line 155 of RequestHandler.php): Testing '$Action//$ID/$OtherID' with '' on eWay_Controller
    Debug (line 163 of RequestHandler.php): Rule '$Action//$ID/$OtherID' matched to action 'handleAction' on eWay_Controller. Latest request params: array ( 'Action' => NULL, 'ID' => NULL, 'OtherID' => NULL, )

    I'm trying to do this in the class eWay_Controller extends Controller - (I'm guessing the $this is wrong)

    if($id = $this->param('ID')){
             $p = DataObject::get_one('eWay',"\"ID\" = '$id'");
             $this->payment = $p;
             return $p;

    this is on SS 3.0.3

    this is my routes.yml

    Name: paymentroutes
    After: framework/routes#coreroutes
    'ewayctl/$Action/$ID/$OtherID' : 'eWay_Controller'


    I can do it using


    in the controller but I get a deprecation notice:

    Director::urlParam is deprecated. Use SS_HTTPRequest->param() instead.

    I'm not sure what the SS_HTTPRequest object/variable name is from within the Controller to call it properly


  • wildflower1975
    Community Member
    59 Posts

    Re: getting URL parameters Link to this post

    this is what i needed


    just gotta ask Google the right question to find the right answer "Director::urlParam is deprecated"

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.