Duplicate message lines with PayPal integration "plugin"

Examaids

No avatar

2007-03-17 17:50

Hi -- I managed to integrate PayPal into v2.1. It didn't work first time. I think it's because one of the //-------- PayPal End mark is in the wrong place. I think it could've been for the client/orders.php page.

This additional scripting should really be a standard. It's such a basic requirement. I struggled not knowing PHP. Many thanks to Stormy. No thanks to support who did not reply to 2 cries for help. :-(((

A question: after completing the order, I go to the page with the PayPal button and "Print your order," but have text repeating above it and below it. I found it in lang/en.php $lang['Order_finished'] =''Your order has been saved and will be sent as soon as possible.<br />Thank You';

How do I stop the text showing below the button? I would like it to appear above the button but just the once. Also, the lines are too far apart (leading two great). Can someone point me to the CSS lines that need to be changed?

Many thanks.

» Quick.Cart v2.x

S Singh

wewior (OpenSolution)

Avatar: wewior

2007-03-19 15:49

Can you write here in which file you made correction with it to work?
About that information after sending order, you can change font-size in templates/default.css file in line:
#orderFinish #ok{padding:20px 0;}

Examaids

No avatar

2007-03-20 10:30

Wewior -- thanks for the reply regarding formatting. How do I prevent the double-entry above and below the button?

I changed a number of files. Instructions are in the PayPal "plugin" by Stormy posted in the forum. I couldn't get it to work first time because, I think, one of the paste instructions isn't correct. Probably obvious to someone who understands PHP but I don't.

However, I don't think I will use the cart unless it can plugin the values in my PayPal buy buttons. They need to be sent to PayPal for my automated download PHP script to work, which generates download links to files. Please see this thread: How do I capture old PayPal button values and replace Order ID

S Singh

idaryl

Avatar: idaryl

2007-03-20 11:28

Examid... wewinor may be able to help you, or someone else may -- but if you dont supply the info needed (as with the case of the code) how on earth do you expect help? - Send people to another thread with as much, if not less info?

Examaids

No avatar

2007-03-20 13:45

Sorry, the PayPal plugin code is so major, I assumed someone of Wewior's caliblre would be aware of it. Same applies to NoChecks code but I haven't followed that thread because I'm only interested in intergrating PayPal.

Here is the link to the Quick.Cart *test* page, if it helps:

I would be happy if Quick.Cart supplied the product name, as well as the Order 1D, in the PayPal cart. Then I can automate the backend download process.

If you purchase using this link, you will see the PayPal cart includes the item name and number, as entered in the buy button: http://examaids.com/privat/cart_win.html

Here is Stormy's PayPal plugin code that I used to alter files:
Step 1
edit >>>> lang/en.php

/*
* Name of fields in forms
*/
//--------- PayPal Start
$lang[Currency_Code] = 'Currency Code';
$lang['PayPal_Email'] = 'PayPal Email';
//--------- PayPal Finish

Step 2
edit >>>>actions_client/orders.php

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

Step 3
edit >>>>templates/messages.tpl

<!-- END NOT_EXISTS -->
//--------- PayPal Start
<!-- BEGIN ORDER_PAYPAL -->
<div id="message">
<div id="ok">
$lang[Order_finished]<br />
<a href="javascript:windowNew( '?p=ordersWindowPrint&amp;iOrder=$iOrder' );">&raquo; $lang[Order_print]</a><br />
<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[PayPal_email]">
<input type="hidden" name="item_name" value="Order ID $iOrder">
<input type="hidden" name="currency_code" value="$config[currency_code]">
<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>
<a href="?p=">$lang[Homepage]</a>
</div>
</div>
<!-- END ORDER_PAYPAL -->
//-------- PayPal End
<!-- BEGIN ORDER_SAVED -->

Step 4
edit >>>>config/general.php

$config['version'] = '2.0';
//--------- PayPal start
$config['PayPal_email'] = "edit_your_paypal@email";
$config['currency_code'] = "USD";
//-------- PayPal end

//----------DO I NEED TO ENTER MY EMAIL? YES!
Step 5
edit >>>>templates/admin/config_form.tpl

</tr>
//--------- PayPal start
<tr>
<th>
$lang[PayPal_Email]
</th>
<td>
<input type="text" name="PayPal email" value="$config[PayPal_email]" size="35" />
</td>
</tr>
<tr>
<th>
$lang[Currency_Code]
</th>
<td>
<input type="text" name="currency code" value="$config[currency_code]" size="5" maxlength="3" />
</td>
</tr>
//-------- PayPal end
<tr>
<th>
$lang[Start_page]

S Singh

Examaids

No avatar

2007-03-20 13:50

Ooops! Forgot to paste the link to the Quick.Cart test page:
http://examaids.com/quickcartstd/index.php

S Singh

idaryl

Avatar: idaryl

2007-03-20 19:52

I actually figured out how to do that - go here -- http://opensolution.org/Quick.Cart/forum/?p=readTopic&nr=3636 - I poated this awhile ago, but it appears that absolutley no-one has seen it, really odd.

Examaids

No avatar

2007-03-21 09:58

iDaryl -- I'm going to start another thread because this title isn't really appropriate anymore.

S Singh

idaryl

Avatar: idaryl

2007-03-21 10:28

So that answer is'nt what you're after? You want to add/change the item ID and other values assigned by PayPal (button scripts supplied by paypal) as (Item name and Item number) to whatever you want - but the paypal code for Quickcart replaces this with item_name" value="[$aList[iQuantity]] and name="item_number" value="$iOrder using the quantity and order as the variables collected by the cart to place into the paypal order fields....

but you want to be able to change that to ....? thusly breaking the paypal integration? I sent you a pointer to be able to add (whatever) the cart has been defined from (products in cart) and now you say the title isn't appropriate anymore.

I'm trying to keep up with you here, but...

btw- if you are using the "integration" posted in this site then the variable the paypal code uses (as I mentioned above) use the iOrder, iQuantity etc etc from within the structure of the cart and it will be hard to find a suitable workaround -- HOWEVER -- if you do find one, please post it here, I'm sure a lot of people (besides myself) would love to have something like that to work from.

also... as far as my experience with paypal is concerned, you go to a preassigned page (after) the payment process - and thats within Paypal - outside of QC's juristiction

Examaids

No avatar

2007-03-21 11:31

I changed the title because the duplicate message lines don't appear with your modification code. In the new thread, I did say your code worked.

I don't know PHP. I can just about keep up with HTML. So it's highly unlikely I'll be able to find any suitable workarounds...

Please see this thread if you have time:
http://opensolution.org/Quick.Cart/forum/?p=readTopic&nr=3931

S Singh

Back to top
about us | contact