Payment

pjb

No avatar

2006-03-18 19:45

re QC v1.2 with simple PayPal payment.

Please please help, when customers click the Paypal button to pay, it opens in a new window.
So after payement my QC web page is still open and customers could potentially pay for the same thing multiple times.

How do I make the QC web page close or how do i make the paypal payment process not open in a new window?
Thanks in advance for any help.

willum

No avatar

2006-03-20 23:05

if someone could post a real paypal code that WORKS with QC 1.2 that would be amazing...

pjba

No avatar

2006-03-21 00:03

There are several examples in the forum which work, heres one (which also works with QCv1.2:
Ste707

2006-01-14 19:53:35 Follow the two steps below to add PayPal to the shop checkout. This is for QC v1.0 only.

STEP ONE
edit the file >>>>actions_client/orders.php

Where you find the following code mentions, add the section between the // ----- PayPal code to the page. This should be around line 58

if( checkOrderFields( $_POST ) === true && checkOrderProducts( $iOrder ) === true ){
saveOrder( $iOrder, $_POST );
//--------- Start PayPal Code
$aData = throwOrder( $iOrder );
listBasket( $iOrder);
$aData['fSummary'] = sprintf( '%01.2f', $aData['fCourierPrice'] + $aList['fSummary'] );
if( $aData['fCourierPrice'] > 0 ){
$content .= $tpl->tbHtml( 'messages.tpl', 'ORDER_PAYPAL' );
}
else
//-------- End PayPal Code
$content .= $tpl->tbHtml( 'messages.tpl', 'ORDER_SAVED' );


STEP TWO
Edit the file >>>>templates/messages.tpl

And add all the following code to the file at the top.

<!-- BEGIN ORDER_PAYPAL -->
<div id="message">
<div id="ok">
<form target="paypal" name="_$iOrder" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="$config[email]">
<input type="hidden" name="item_name" value="Order ID $iOrder">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="amount" value="$aList[fSummary]">
<input type="hidden" name="shipping" value="$aData[fCourierPrice]">
<input type="hidden" name="no_note" value="1">
<input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but6.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form><br />
$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 -->

Make sure you change the currency_code to your requirements.

Thanks it, it works for me so it should for you. Cheers to Stormy again.


pawe

2006-01-14 22:06:42 Works great. Your the best Ste707.. :)

plattyd

2006-01-15 15:25:45 I cant see where in the actions_client/orders.php to insert your code ?
I cant find no reference to this
Where you find the following code mentions, add the section between the // ----- PayPal code to the page. This should be around line 58


Cheers

-------------------------------------------------------
Platty

eremcee

2006-01-16 10:59:27 Works

Thank you ;o)

&raquo; http://www.eremcee.nl/

pawe

2006-01-16 11:05:52 plattyd:
Past the PayPal code after this sentence.
saveOrder( $iOrder, $_POST ); on line about 59.

diseous

2006-01-16 20:07:46 You are a GOD! Thankyou

ipodstock

2006-01-26 18:42:18 Will this parsed plugin work for v1.1?

Martin

2006-01-27 00:48:21 worked a treat for me!

JohnnHmd

2006-01-29 15:44:42 Doesn't seem to work - I can't actually see anything even mentioning PayPal!

I'm using v1.0.

-------------------------------------------------------
John

ipodstock

2006-01-29 17:28:56 Yes, it does work... for help you should try the Paypal website to "Integrate Paypal into a Custom Shopping Cart"

Help

2006-02-23 22:28:30 I entered all the code but it does not do anything different??
It still says order pending and it does not take them to paypal?
HeLP

&raquo; http://www.oliviaandco.com/OliviaNew

-------------------------------------------------------
Robin

thomas.slowhand

2006-02-23 22:47:28 Is this Paypal solution ONLY for Q.C v1.0 or for => v1.0? ( i. e. I'm using 1.2)??

-------------------------------------------------------
Thomas

sherlock

2006-02-24 01:04:07 the paypal solution should work.

robinsnest

2006-02-24 02:56:56 I am using the newest version and I must be doing something wrong it is not showing up in the check out at all.

-------------------------------------------------------
Robin
---------------------------------------------------------------------
To have paypal not open in a differenct window just change (in step two):
form target="paypal" name="_$iOrder" action="https://www.paypal.com/cgi-bin/webscr" method="post">
to
form name="_$iOrder" action="https://www.paypal.com/cgi-bin/webscr" method="post">

Back to top
about us | contact