You are here: Home
Support site for Tips and Tricks HQ premium products
Problem! Refreshing the page adds an item to the cart every time you refresh.
Any clues as to how this is happening?
Thanks! I finally got it to work!
1. I added the line you suggested to the wp_shopping_cart.php file.
2. In each post I added custom fields with the key/name Price & Shipping
3. In my sidebar template I established the 3 following variables
<?php
$prodname = $post->post_title ;
$prodprice = get_post_meta($post->ID, 'Price', true);
$prodshipping = get_post_meta($post->ID, 'Shipping', true);
?>
4. Then added this line where I wanted to put the button in that same template file
<?php echo print_wp_cart_button_for_product($prodname, $prodprice, $prodshipping); ?>
This worked for me – I seriously doubt its totally correct by php or wordpress standards, so admin, feel free to correct.
Thanks again for a great and simple plugin.
KLM