Hi you say in usage tab:
To add the ‘Add to Cart’ button on you theme’s template files, use
<?php echo print_wp_cart_button_for_product(‘PRODUCT-NAME’, PRODUCT-PRICE); ?> . Replace PRODUCT-NAME and PRODUCT-PRICE with the actual name and price.
ok ,i try it with this code
$title=the_title(); echo $title; //i see correct product name $price=$day; echo $price; //i see correct product price //now how use this variables in your function ? // like this it doesn't works echo print_wp_cart_button_for_product('$title', $price); ?>
how can i pass these two variable to your function?
- The topic ‘dinamic PRODUCT-NAME and PRODUCT-PRICE’ is closed to new replies.