Help With A WordPress Plugin

dreamscape

Pedaling Down The Road
Dec 21, 2012
539
6
0
Capac, MI
I'm using the Simple Paypal Shopping Cart Plugin for one of my websites.

The plugin itself works and I like it...

Format for the Add To Cart button (place in page template of theme)
PHP:
<?php echo print_wp_cart_button_for_product('Product Name',Price); ?>

When I manually enter a product name and price like below it works
PHP:
<?php echo print_wp_cart_button_for_product('Widget',9.56); ?>
(product is added to the cart and displayed correctly)

But when I try to populate it with the actual product name and price it will not work
PHP:
<?php echo print_wp_cart_button_for_product('the_title()',$price); ?>
(product is added to the cart but the name is "the_title()" and the price show as "$0.00")

For the product price I am trying to pull it out of the custom field that I use when adding the product page:
PHP:
$price=get_post_meta($post->ID, 'Price', true);

The title and price show everywhere on the page except for the plugin function... can anyone tell me why?
 


remove the quotes around the_title().

Double check that $price is actually being set as you think it is. (print it out somewhere)
 
remove the quotes around the_title()
That throws an internal server error

Double check that $price is actually being set as you think it is. (print it out somewhere)
Yes the price variable is working. No matter where on the page template I place it it shows the price... accept for when it's in the plugin code.