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)
When I manually enter a product name and price like below it works
(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
(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:
The title and price show everywhere on the page except for the plugin function... can anyone tell me why?
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); ?>
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); ?>
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?