Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function add_some_stuff($content) {
- if (is_post_type('the_store')) {
- $item_name = the_title('', '', false);
- $shopping_url = get_permalink();
- $item_number = get_the_ID();
- $amount = get_post_custom_values('thestore_price');
- $amount = $amount[0];
- $shipping = get_post_custom_values('thestore_shipping');
- $shipping = $shipping[0];
- $shipping2 = get_post_custom_values('thestore_shipping2');
- $shipping2 = $shipping2[0];
- $whateveryouwanttoadd = <<<PAYPAL
- <form method="post" action="https://www.paypal.com/cgi-bin/webscr" target="paypal">
- <input type="hidden" name="cmd" value="_cart">
- <input type="hidden" name="business" value="$mama_paypal">
- <input type="hidden" name="item_name" value="$item_name">
- <input type="hidden" name="shopping_url" value="$shopping_url">
- <input type="hidden" name="item_number" value="$item_number">
- <input type="hidden" name="amount" value="$amount">
- <input type="hidden" name="currency_code" value="USD">
- <input type="hidden" name="shipping" value="$shipping">
- <input type="hidden" name="shipping2" value="$shipping2">
- <input type="hidden" name="handling_cart" value="">
- <input type="hidden" name="bn" value="ButtonFactory.PayPal.001">
- <input type="image" name="add" src="http://www.powersellersunite.com/buttonfactory/sc-but-01.gif">
- </form>
- PAYPAL;
- $content = preg_replace('/<\/p>/', '</p><p>'. $whateveryouwanttoadd.'</p>', $content, 1);
- return $content;
- }
- }
- add_action('the_content', 'add_some_stuff');
Add Comment
Please, Sign In to add comment