1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Adding a PayPal button

Discussion in 'Styling and Customization Questions' started by WhiteTiger, Mar 20, 2011.

  1. WhiteTiger

    WhiteTiger Member

    When adding the Paypal button- can this be customized to where people can choose how much he/she wants to donate?
     
  2. masterchief

    masterchief Well-Known Member

    yes, you configure the buttons at your paypal acct. my button has empty field and it gets filled in..

    check it out... www.masterchief.com/community

    click on paypal button and see where it gpes.. you will not be obligated at all. just close the browser window when you are finished
     
    WhiteTiger likes this.
  3. WhiteTiger

    WhiteTiger Member

    Thanks Masterchief, That's precisely what I think we'd want for our website.
     
  4. masterchief

    masterchief Well-Known Member

    glad to be of any help .. have fun with XenForo. I find this to be wonderful community of sharing. peace
     
  5. WhiteTiger

    WhiteTiger Member

    Hi, when I checked Paypal website- it said that this option is for non-profit or charity organizations.
     
  6. masterchief

    masterchief Well-Known Member

    I will revisit that .. as I have merchant account ALL options are available to me. thanx for pointing this out.

    UPDATE - As I have a PayPal merchant account, there is are multiple options available to me as for selection of types of payment buttons, accepting donations being one of those.

    @WhiteTiger Do you have merchant account at PayPal?
     
  7. WhiteTiger

    WhiteTiger Member

    masterchief ....not me personally. I will check with my "boss" and see if he does.

    Altho I do send billing invoices and receive my paycheck via Paypal.
     
  8. rumel

    rumel Member

    In order to make it possible for users of a forum to make contributions/gifts/donations of money through a PayPal account, is it possible and easily accomplished to insert a small icon link like this [​IMG] between the "Like" and "Reply" buttons? If so, where and how would one accomplish this task?
     
  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Edit this template:

    Admin CP -> Appearance -> Templates -> post

    Add this code:

    Code:
    				<a href="https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=marketing_us/send_money" class="item" target="_blank">
    					<span></span>
    					<img src="http://i1117.photobucket.com/albums/k599/rumel2/KSMO_Gift.gif" border="0" />
    				</a>
    
    like so:

    Code:
    			<div class="publicControls">
    				<a href="{xen:link threads/post-permalink, $thread, 'post={$post}'}" class="item muted postNumber hashPermalink" title="{xen:phrase permalink}">#{xen:calc '{$post.position} + 1'}</a>
    				<xen:if is="{$post.canLike}">
    					<a href="{xen:link posts/like, $post}" class="LikeLink item control {xen:if $post.like_date, unlike, like}" data-container="#likes-post-{$post.post_id}"><span></span><span class="LikeLabel">{xen:if $post.like_date, {xen:phrase unlike}, {xen:phrase like}}</span></a>
    				</xen:if>
    
    				<a href="https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=marketing_us/send_money" class="item" target="_blank">
    					<span></span>
    					<img src="http://i1117.photobucket.com/albums/k599/rumel2/KSMO_Gift.gif" border="0" />
    				</a>
    
    				<xen:if is="{$canReply}">
    					<a href="{xen:link threads/reply, $thread, 'quote={$post.post_id}'}" data-postUrl="{xen:link posts/quote, $post}" class="ReplyQuote item control reply" title="{xen:phrase reply_quoting_this_message}"><span></span>{xen:phrase reply}</a>
    				</xen:if>
    			</div>
    
    The result:

    Screen shot 2011-03-27 at 11.52.56 AM.png
     
    creativeforge and rumel like this.
  10. rumel

    rumel Member

    Thank You very much Jake for your prompt and detailed reply. We will give that code a try. Your continuing contributions really help maintain the supportive atmosphere of this wonderful community.

    A couple of follow up questions :
    1. Will this edit be preserved through future upgrades or will it revert back to default code on subsequent releases?
    2. If it is not preserved, is there a method to make it permanent or will this edit need to be done for each new release?
    3. If there is a method, could you please describe it for me?
     
    Peggy likes this.
  11. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Yes it's preserved. Custom templates are not overwritten during an upgrade. Though sometimes you have manually revert and recustomize templates after an upgrade to incorporate required changes in the new version.
     
  12. rumel

    rumel Member

    Jake, Thank you for responding to this amateurs questions.
     
  13. Simon R

    Simon R Member

    Is it possible to display a paypal button in a certain thread ?
     
  14. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You could edit this template:

    Admin CP -> Appearance -> Templates -> thread_view

    Use this code:

    Code:
    <xen:if is="{$thread.thread_id} == 1">
    	PAYPAL CODE HERE
    </xen:if>
    
    You need to specify the thread_id.

    If you want to add a paypal link inside of a post then you need to use a regular URL. The standard Paypal "form buttons" won't work inside of posts.
     
  15. Simon R

    Simon R Member

    Thanks ! that explains it

    Really appreciate the help :)
     
  16. creativeforge

    creativeforge Active Member

    That was brilliant, Jake... You should write a book on Xenforo hacks and tips, seriously! People do it all the time.

    As for me, I tried to use the Paypal code you posted, but it's not working, maybe due to being very old. You can't use <href="email address"> with Paypal. Any suggestion?
     
    rafass likes this.

Share This Page