Custom Registration form

Permalink
OK so I need to build a registration form. This will be for an event and payments made to paypal. What is the direction i need to go in. Would i want to create a single page? Then have the paypal callback scripts stored some where? has anyone done this before?


Please let me know what other info i can provide.
thanks all.

elygen
 
andrew replied on at Permalink Reply
andrew
I would create a single page, and a corresponding controller that handles the submit... So if you named your single page "event_payment.php" it'd be accessible from

http://www.yoursite.com/event_payment/... (once you added it through the single pages section of the dashboard)

<form method="post" action="<?=$this->url('/event_pament', 'submit')?>">
...
</form>

Then you'd make controllers/event_payment.php

<?php
class EventPaymentController extends Controller {
    public function submit() {
    }
}
?>


That method will automatically be run in the post. Then any other scripts provided by paypal, etc... I would stick in your webroot's "libraries/" folder...and load them via the Loader::library() method. For example, if you have a "paypal.php" in your libraries folder, you'd load it via:

Loader::library('paypal');
pboucher replied on at Permalink Reply
Hi, I needed to add a new function to the model/user class and I did it through heritage (extends). I am not sure where to put the code that load my new class.

In your answer, where would you put the Loader::library('paypal') line?

Thanks.
marnipk replied on at Permalink Reply
Can someone please tell me how this works? I don't know if this is an installation question or a paypal question, but I don't see any eCommerse option in my dashboard and I need to do the same this elygen did, only with a lot less know how. Can anyone help me out?