Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've setup a post type-Product with custom fields containing price and other attributes.

I'm reading Paypal Documentation right now,
What i've read till now is "HTML-Buttons" can be pasted from Paypal, but i can't tell my client to copy and paste the "Add to Cart" button from Paypal every time he creates a new product.

Even the plugins tagged with "Paypal" seem manual. I wanted something that would take price and other attributes programmatically from custom fields.
I don't want my client to do any thing regarding Paypal.

So my question:

Should i ditch my almost-complete theme and build everything from ground up with Woocommerce? Or is there still a way to integrate Paypal into this theme.

Thankyou for your time and thoughts.

share|improve this question
anyone please? i'm really lost in this step. – NestedWeb Aug 28 '12 at 4:27

1 Answer

up vote 1 down vote accepted

You can create a custom template in the theme that displays the 'products' custom post types (see the section on Template Files here - http://codex.wordpress.org/Post_Types#Custom_Types)

Then code the HTML for the Paypal button in to your specific single-{posttype}.php and have the attributes such as price etc. come from custom fields.

e.g. - http://pastebin.com/BtHrKha0

(I think that is correct but it's been a while since I've played with custom fields so apologies if it needs further tweaking)

P.S - Although, are you sure you want to use Paypal's own cart? It would be more graceful to use a shopping cart plugin for Wordpress (which you can use with your own theme) then have the total value go through to Paypal when the customer is ready to pay (probably an obvious thing to say but just thought I'd mention it in case :))

share|improve this answer
Thanks, all products didn't have price, they're to be enquired, so i employed buy now buttons. – NestedWeb Oct 10 '12 at 8:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.