Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Plugin:
WordPress Simple Paypal Shopping Cart

Implementation Used:
HTML in theme page template (page.php)

Example: echo print_wp_cart_button_for_product('Product Name',Price);

So if I wanted to sell a blue widget for $9.99 the code would be:

echo print_wp_cart_button_for_product('Blue Widget',9.99);

Problem:
When using the code above the plugin works fine... however, when I try to populate the product name and price it does not work. I am using the WP custom field for the price as such:

$price=get_post_meta($post->ID, 'Price', true);

Then I populate the shopping cart code as such:

echo print_wp_cart_button_for_product('the_title()',$price);

When products are added to the cart it shows the product name as "the_title()" and the price as "$0.00"

The title and price display anywhere on the page I place them accept for in the cart code for some reason.

share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.