Wordpress simple paypal cart shopping cart shortcode in custom fields

advertisements

i”m using wordpress simple paypal shopping cart and i want to parse the shortcode into custom field, i”ve found an example but it”s not working
above the loop i”ve put this
<?php $price = get_post_meta( $post->ID, ‘price’, true ); ?>
and where i want to display the add to cart button i have this
<?php echo print_wp_cart_button_for_product($name, $price); ?>

it”s not working right

the add to cart button apear on every post, when u press it it add product in cart with no name and no price when i add key=price and value= 25 it add to cart same noname and noprice product :(

btw the shortcode i want to parse it”s looks like this [wp_cart:PRODUCT NAME:price:PRODUCT PRICE:end]


this is how u do it <?php $price = get_post_meta( $post->ID, 'price', true ); ?>
<?php $name = get_the_title(); ?> <?php echo print_wp_cart_button_for_product($name, $price); ?>

that code display the add to cart button

Price: <?php echo get_post_meta($post->ID, 'price', true); ?> $

and that”s for the price to be displayed

have fun