paypal button linked to the author

1 week 2 days ago #77177 by 2CPRESTA
Hello,

Is it possible to include a paypal button, that would have as parameters the e-mail account from author + price to pay ?

How can i do that ? Thanks

i'd like the author to enter paypal datas in his profile
Price would be a classic flexicontent field.

Thanks for your help.

Please Log in or Create an account to join the conversation.

1 week 2 days ago #77178 by ggppdk
Hello

1. create a text field

2. hide it in item form (via field configuration),
and set a default value for the field, and configure the default value to be "used instead of empty"

3. create a custom layout
(make a copy of /flexicontent_fields/text/tmpl/value_default.php)
value_paypal.php)
4. select the new layout in field configuration inside the viewing TAB

5. customize the PHP code of the layout
e.g. you can use
$item->createdby
$item->fields['FIELDNAME']->value
etc


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

1 week 2 days ago #77180 by 2CPRESTA
Wow , so fast ! Thanks

I will try ..; i'm not such a good developer as you... for sure i will come back to you.

Please Log in or Create an account to join the conversation.

1 week 2 days ago - 1 week 2 days ago #77181 by ggppdk
Hello

i can give you code on how to get email of author (email of Joomla user account)
but how will you get the price ? to use for the URL ?

Is the price inside a field of current flexicontent item ?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

1 week 2 days ago #77182 by 2CPRESTA
Each item would be a course, so the price would be entered in a flexicontent field.

You mean it is possible to custom paypal link ?
Thanks

Please Log in or Create an account to join the conversation.

1 week 1 day ago #77186 by micker
hello you can di it more easly without too much code
set s a default value for the field, and configure the default value to be "used instead of empty"
use prefix and suffix of value
prefix
<a href="THELINKFORMAT+USERVARIABLE
suffix
" >Pay via paypal</a> that it ... you just need to decompose paypal menu link and adapt to you case[code]" >Pay via paypal</a>
that it ...
you just need to decompose paypal menu link and adapt to you case

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

1 week 1 day ago #77187 by 2CPRESTA

micker wrote: hello you can di it more easly without too much code
set s a default value for the field, and configure the default value to be "used instead of empty"
use prefix and suffix of value
prefix

<a href="THELINKFORMAT+USERVARIABLE
suffix
" >Pay via paypal</a> that it ... you just need to decompose paypal menu link and adapt to you case[/quote] You exactly know how good i'm with coding ... but how will i "mix" the link with authors email ( = paypal account email) ? Any idea ? I know i have always strange cases :)[code]" >Pay via paypal</a>
that it ...
you just need to decompose paypal menu link and adapt to you case


You exactly know how good i'm with coding ... but how will i "mix" the link with authors email ( = paypal account email) ? Any idea ?

I know i have always strange cases :)

Please Log in or Create an account to join the conversation.

1 week 1 day ago #77188 by micker
ah ... you need to create a select field with a default value and use sql reqest inside to find email of author ...
think about this, if user email in joomla isn't same than paypal ..;
i think its better to create a field like Payapal email, => user set his email and you can use {{fieldname##0}} inside prefix
like
<a href="THELINKFORMAT+{{fieldname##0}}

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.