Current location: Hot Scripts Forums » Programming Languages » PHP » PHP Itemisation of order

PHP Itemisation of order

  #1 (permalink)  
New Member
Join Date: Oct 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
PHP Itemisation of order

Hi there,

I'm using a prebuilt Wordpress theme which has a shop plugin inbuilt.

Basically, I want to alter this script to submit an array of items to PayPal (for orders with multiple items).

I've read from the documentation here : that this can be done by adding for example item_name_1, but I have no idea of how to compile this in a PHP array, so for each result it creates, 1, 2, 3 etc.

Any help greatly appreciated!

PHP Code:


global $General$Cart;
//$orderNumber; // order number
$paymentOpts $General->get_payment_optins($_REQUEST['paymentmethod']);
$merchantid $paymentOpts['merchantid'];
$returnUrl $paymentOpts['returnUrl'];
$cancel_return $paymentOpts['cancel_return'];
$notify_url $paymentOpts['notify_url'];
$currency_code $General->get_currency_code();
$cartInfo $Cart->getcartInfo();
$itemArr = array();
$product_att preg_replace('/([(])([+-])([0-9]*)([)])/','',$cartInfo[$i]['product_att']);
$itemstr '';
$itemstr .= $cartInfo[$i]['product_qty'].' X '.$cartInfo[$i]['product_name'];
$itemstr .="($product_att)";
$itemArr[] = $itemstr;
$item_name implode(', ',$itemArr);
$amount $Cart->getCartAmt();
$payable_amt $General->get_payable_amount($_REQUEST['shippingmethod']);
<form name="frm_payment_method" action="" method="post">
<?php /*?><form name="frm_payment_method" action="" method="post"><?php */?>
<input type="hidden" value="<?php echo $payable_amt;?>" name="amount"/>
<input type="hidden" value="<?php echo $returnUrl;?>&oid=<?php echo $orderNumber;?>" name="return"/>
<input type="hidden" value="<?php echo $cancel_return;?>&oid=<?php echo $orderNumber;?>" name="cancel_return"/>
<input type="hidden" value="<?php echo $notify_url;?>" name="notify_url"/>
<input type="hidden" value="_xclick" name="cmd"/>
<input type="hidden" value="<?php echo $item_name;?>" name="item_name"/>
<input type="hidden" value="<?php echo $merchantid;?>" name="business"/>
<input type="hidden" value="<?php echo $currency_code;?>" name="currency_code"/>
<input type="hidden" value="<?php echo $orderNumber;?>" name="custom" />
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="1">

<div class="wrapper" >
        <div class="clearfix container_message">
                <center><h1 class="head2"><?php _e('Processing for Paypal, Please wait ....');?></h1></center>
Reply With Quote

Featured Marketplace Scripts (view more)



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What PHP Frameworks do you use and why? digioz Polls 12 09-27-11 12:00 AM
Problems retrieving data from SQL, in order to post into php mail function WillUK PHP 6 02-08-10 04:08 AM
problem displaying records in order of time and date in php method Database 9 07-25-06 03:32 PM
PHP multi-dimensional array sorting issue aqw PHP 2 06-24-05 11:09 PM
Soon..Need PHP Coder to MOD 'shopping cart order system' superprogrammer Job Offers & Assistance 2 02-09-04 07:29 PM

All times are GMT -5. The time now is 06:07 PM.
vBulletin® Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.