whyisjake

Jake Spurlock

Jun 16th, 2010
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.81 KB | None | 0 0
  1. function add_some_stuff($content) {
  2.     global $shortname;
  3.     if (get_post_type() == 'the_store' ) {
  4.         $display = get_post_custom_values('thestore_display');
  5.         if($display[0]){
  6.             $item_name = the_title('', '', false);
  7.             $shopping_url = get_permalink();
  8.             $item_number = get_the_ID();
  9.             $amount = get_post_custom_values('thestore_price');
  10.             $amount = $amount[0];
  11.             $shipping = get_post_custom_values('thestore_shipping');
  12.             $shipping = $shipping[0];
  13.             $shipping2 = get_post_custom_values('thestore_shipping2');
  14.             $shipping2 = $shipping2[0];
  15.             $business = get_option($shortname.'_paypal');
  16.             $handling = get_post_custom_values($shortname.'_handling');
  17.             $handling = $handling[0];
  18.             $currency = get_post_custom_values('thestore_currency');
  19.             $currency = $currency[0];
  20.            
  21.             $paypal = <<<PAYPAL
  22.                     <form method="post" action="https://www.paypal.com/cgi-bin/webscr" target="paypal">
  23.                     <input type="hidden" name="cmd" value="_cart">
  24.                     <input type="hidden" name="business" value="$business">
  25.                     <input type="hidden" name="item_name" value="$item_name">
  26.                     <input type="hidden" name="shopping_url" value="$shopping_url">
  27.                     <input type="hidden" name="item_number" value="$item_number">
  28.                     <input type="hidden" name="amount" value="$amount">
  29.                     <input type="hidden" name="currency_code" value="$currency">
  30.                     <input type="hidden" name="shipping" value="$shipping">
  31.                     <input type="hidden" name="shipping2" value="$shipping2">
  32.                     <input type="hidden" name="handling_cart" value="$handling">
  33.                     <input type="hidden" name="bn"  value="ButtonFactory.PayPal.001">
  34.                     <input type="image" name="add" src="http://www.powersellersunite.com/buttonfactory/sc-but-01.gif">
  35.                     </form>
  36. PAYPAL;
  37.            
  38.            
  39.            
  40.             return $content.$paypal;
  41.         }
  42.     }
  43. }
  44.  
  45. //add_action('the_content', 'add_some_stuff');
Add Comment
Please, Sign In to add comment