Page 1 of 1

PayPalButtonMaker and calender

Posted: Fri Jun 24, 2011 12:53 am
by sam_m
Hello, Just wondering if this is something I could do with these modules... Basically I need to create an event calender and then have the ability for someone to choose an event, and then a date which is then paid for via Paypal.

I was thinking if I created a button using the paypalbuttonmaker, then created the options of the event, and its price/s, and then possibly a date dropdown option to be linked via a smarty tag to the calender which automatic adds new dates to the paypalbutton when new event is added to the calender?

Hope that makes sense, any thoughts or advise on this would be great :)
Thank you
Sam

Re: PayPalButtonMaker and calender

Posted: Fri Jun 24, 2011 10:40 am
by markS
[edit: Just noticed that you asked a slightly different question, but I hope this may help a bit in your search for an answer.]

Hello,

I've just done this using PPBM & CGCalendar and it works very well indeed.

Here's a quick overview:

I created a custom field in the calendar called 'price' and then added some code to the calendar template I'm using to check for a value in that field.

If so, it displays the paypal button using PPBM, that way you can have events which have a cost and those that don't.

Something like:

Code: Select all

 {if $event.fields.price !=""}
        <div class="pay"><p>Pay for this event with PayPal</p>
        {cms_module module=PayPalButtonMaker Mode="default" Btn="diary"}
        </div>
    {/if}
I then created the button in PPBM, specifying an amount of

{$event.fields.price|string_format:"%.2f"}

and the item name something like:

Fee for {$event.event_title}

Just make sure you turn on "Process Smarty data in button fields" in the button defaults options and you should be golden!

Hope this gets you some way towards making it work.

Thanks to both of the authors for these great modules.

Cheers,
Mark.

Re: PayPalButtonMaker and calender

Posted: Sun Jun 26, 2011 9:28 pm
by sam_m
Mark, thanks for taking the time to post that, looks very helpful, much appreciated :)
markS wrote:[edit: Just noticed that you asked a slightly different question, but I hope this may help a bit in your search for an answer.]

Hello,

I've just done this using PPBM & CGCalendar and it works very well indeed.

Here's a quick overview:

I created a custom field in the calendar called 'price' and then added some code to the calendar template I'm using to check for a value in that field.

If so, it displays the paypal button using PPBM, that way you can have events which have a cost and those that don't.

Something like:

Code: Select all

 {if $event.fields.price !=""}
        <div class="pay"><p>Pay for this event with PayPal</p>
        {cms_module module=PayPalButtonMaker Mode="default" Btn="diary"}
        </div>
    {/if}
I then created the button in PPBM, specifying an amount of

{$event.fields.price|string_format:"%.2f"}

and the item name something like:

Fee for {$event.event_title}

Just make sure you turn on "Process Smarty data in button fields" in the button defaults options and you should be golden!

Hope this gets you some way towards making it work.

Thanks to both of the authors for these great modules.

Cheers,
Mark.