PHP issue in template with wp e-commerce
-
Hi ! Happy new year !
I have a litle PHP issue, i think a lot of people can solve it so please help me !
This is a template tags of wp-ecommerce to insert a button (add to cart):
<?php echo wpsc_add_to_cart_button(1); ?>
If i put it in my category.php i retrieve the button (add to cart) for my product with the ID 1. All is ok but i want to print the button to corresponding ID (product)I have created a custom field for each post:
key : addcart
value : <?php echo wpsc_add_to_cart_button(1); ?>I retrieve it with :
<?php echo get_post_meta($post->ID, "addcart", true);?>
But nothing is print !I have tried to modify my custom field like this :
key : addcart
value : 1And to retrieve it with :
<?php echo wpsc_add_to_cart_button(echo get_post_meta($post->ID, "addcart", true);); ?>
But it’s a PHP error….
It’s maybe more complicated to understand me than to solve the problem…Thanks in advance for those who stay on this
- The topic ‘PHP issue in template with wp e-commerce’ is closed to new replies.