passing on individual items to paypal

pjba

No avatar

2006-03-22 00:06

Does anyone know how to pass on the products names into paypal instead of the Order ID number?

Thanks

QCv2.1
simple paypal installed in odrers.tlp and messages.tlp
plugin: productsinrow

pjba

No avatar

2006-04-05 20:27

I kindly renew my question with reference to QCv1.2

Can the basket contents be pass on to PayPal as well as the order ID number.
So when a customer who shops on my site is directed to PayPal to take credit card information they can see what they have bought rather than just the order ID number.

I would be extremely grateful for any help. Even to say it can not be done, as it has been weeks since I last posted this question.

nvictor

No avatar

2006-04-06 12:50

I've started developing a paypal plugin based on a plugin I've seen on this forum. It's not completed yet, but it can give you an idea if you know how to have fun with php.

******************
******************

1. Copy these lines on top of the file: templates/messages.tpl

<!-- BEGIN ORDER_PAYPAL_MUL_ITEM_START -->
<div id="message">
<div id="ok">
<div id="paypal">
<form target="paypal" name="_$iOrder" action="https://www.paypal.com/fr/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="business" value="noagbodjivictor@yahoo.fr" />
<input type="hidden" name="currency_code" value="EUR" />
<input type="hidden" name="upload" value="1">
<!-- END ORDER_PAYPAL_MUL_ITEM_START -->

<!-- BEGIN ORDER_PAYPAL_MUL_ITEM_LOOP -->
<input type="hidden" name="$item_name_prefix" value="$item_name" />
<input type="hidden" name="$amount_prefix" value="$amount" />
<input type="hidden" name="$quantity_prefix" value="$quantity" />
<!-- END ORDER_PAYPAL_MUL_ITEM_LOOP -->

<!-- BEGIN ORDER_PAYPAL_MUL_ITEM_END -->
<input type="hidden" name="no_note" value="1" />
<input type="image" src="http://www.paypal.com/fr_FR/i/btn/x-click-but01.gif" border="0" name="submit" alt="Effectuez vos paiements via PayPal : une solution rapide, gratuite et sécurisée !" />
</form>
</div>

$lang[Order_finished]<br />
<a href="javascript:windowNew( '?p=ordersWindowPrint&amp;iOrder=$iOrder' );">&raquo; $lang[Order_print]</a><br />
<a href="?p=">$lang[Homepage]</a>
</div>
</div>
<!-- END ORDER_PAYPAL_MUL_ITEM_END -->

2. Then copy these lines in actions_client/orders.php after line 59, saveOrder( $iOrder, $_POST );

//-------- Start Paypal Multiple Item
$aTestData = throwOrder( $iOrder );
if ( $aTestData['fCourierPrice'] > -1 ){
$content .= $tpl->tbHtml( 'messages.tpl', 'ORDER_PAYPAL_MUL_ITEM_START' );

$aData = dbListBasket( $iOrder );

if( isset( $aData ) ){
$iCount = count( $aData );
$fSummary = 0;

for( $i = 0; $i < $iCount; $i++ ){
list( $aList['iElement'], $aList['iOrder'], $aList['iProduct'], $aList['iQuantity'], $aList['fPrice'], $aList['sProduct'] ) = $aData[$i];

$prefix = $i + 1;
$item_name_prefix = "item_name_".$prefix;
$quantity_prefix = "quantity_".$prefix;
$amount_prefix = "amount_".$prefix;

$item_name = $aList['sProduct'];
$amount = sprintf( '%01.2f', $aList['fPrice'] );
$quantity = $aList['iQuantity'];

$content .= $tpl->tbHtml( 'messages.tpl', 'ORDER_PAYPAL_MUL_ITEM_LOOP' );
} // end for
}

$content .= $tpl->tbHtml( 'messages.tpl', 'ORDER_PAYPAL_MUL_ITEM_END' );
}
else
//-------- End Paypal Multiple Item

Following line, $content .= $tpl->tbHtml( 'messages.tpl', 'ORDER_SAVED' );

******************
******************

What is not yet done is shipping price. Paypal says, you can have shipping information for each product or for the entire basket. That's what complicate the matter.

PS.
1.
My script is configured with french interface of Paypal. You can change this line, "https://www.paypal.com/fr/cgi-bin/webscr" as you wish.
For example:
https://www.paypal.com/cgi-bin/webscr --> English
https://www.paypal.com/de/cgi-bin/webscr" --> Deutch

2.
Don't forget to get an appropriate button code from paypal's marchant tools section. I've found the french one code here, https://www.paypal.com/fr/cgi-bin/webscr?cmd=_pdn_xclick_techview_outside

I hope this will help you a bit.

pjba

No avatar

2006-04-06 22:22

Thank you for taking the time to share this.
I will have a play around with the code and see what happens.
If I succeed will post it here.

pjba

No avatar

2006-04-09 11:44

Hi nvictor,
Thanks for your help earlier. I am sorry but I am unable to sort out the shipping price bit. But if its any help you can select postage and packing in paypal from the profile tab and it appears as though it has been pass on. Although it won't be seen in the payplal basket, it is shown on main payment page.

nvictor

No avatar

2006-04-10 15:58

pjba, I'm not sure to understand.

I'm glad the code was helpful. Don't bother yourself with setting the shipping cost, as Paypal can do it for you. This is what the manual says, "You can set up your PayPal account to automatically calculate and charge shipping and sales
tax (also called value added tax or VAT).", p.50

This is the detailed instruction:
1. Log in to your PayPal account at https://www.paypal.com.
2. Click the Profile subtab of the My Account tab.
3. In the Selling Preferences column, click Sales Tax or Shipping Calculation.

This is where you set up shipping information, there are more information in the manual, p.50

keeb

No avatar

2006-04-21 05:14

i am currently working on a solution to the shipping issue, currently i have a simple flat solution but i am working toward the per product solution.

here is my flat solution it will atleast show shipping overall for whatever value you set.. very basic.


<input type="hidden" name="shipping" value="<set price here>" />

that is the basic code from paypals button setup. i had something almost worked out but i couldnt find the right feild that displays the courier total. once i get that sorted then i will post my solution here..

i have to say i have made this cart do alot of cool things both with a plugin and with some minor manipulation.. i will be sending a donation next week when i can afford it.

yall rock. this cart is pretty awesome for it's simplicity.

=keeb - The boss of the little people=

Noise

Avatar: Noise

2011-07-16 21:44

i know this is an old thread but i was hoping i could get some help with this. i am using 3.x version trying what u have put but it keeps loading the paypal page with bicket it empty

Back to top
about us | contact