Revised PAYPAL integration - many new features 1.4 and earlier -


Avatar: idaryl

2007-01-21 03:55

How many of you out there use the PayPal plugin from here?......... ... I will bet a lot have. It is a life-saver for some. And...... I've made it even more functionable.
I've noticed that even though this works fine, there are some other things that needed to be added, which in turn address a few other issues mentioned many times over here on other occasions. The biggest one being pre-population of the PayPal information fields!

Working/Implemented - Version 1.4 - however it should work for earlier versions - provided you have the code already working

1) Adding the order ID Product Name to PayPal -- fixed!

2) Having the shipping cost added to the PayPal price -- fixed!

3) Having extra information shown in PayPal EG: Date/Time - Price - SubTotal - Shipping Price - Shipped by: - Comment (if used)

4) Taxes and Discounts - I don't completely understand how this plug-in works - but.... fixed!

5) The ability to have custom graphic/rather than the standard PayPal button - Make sure the string to the img src is complete EG: http://www.yoursite/whereverthecartis/graphic.jpg/gif and its width and height - you can see the code in the button string below.

6) There is a redirect string to send the user to the "Empty" orders basket -- Empty, because they've just ordered ;-) howver, if you want to dispaly a thankyou page or ..? Use the admin to generate the category page and use the ?p= address to point to it. - The string is at the end of the code (starts with: onclick - just change the address, that's it)

7) Here is the "Biggest Thing" - it will pre-populate PayPal for the buyer! It will use the previously entered information and set it in the appropriate fields in the PayPal cart area.

**Secondary Issues: This is an initial setup for Paypal US, however, a few code changes will make it operable for whatever country you are from.

Known Bugs:
1): If you have shipping costs setup in PayPal - PayPal will automatically add that amount to your total - To fix this, goto your PayPal account and disable the shipping costs in your account.

2): Because PayPal has only a few editable fields, all the data collected has been concentated inline. Unfortunately only the last item in the cart will be displayed - however, if multiple units/items are ordered in one session the amounts will still be added to Paypal
**(Note this element would possibly work if the ability to have all ordered items thrown into an array so it could be displayed properly)

3) PayPal does NOT have a field for "Company" so if you want that - its a no!

4) Taxes and Discounts - I don't completely understand how this plug-in works (the instructions are vague) - but....

This is a fully commented version for use by all the QC community - by iDaryl - it should work great - it does wonderfully for me.

The PayPal configuration settings have been implemented - ( this adds to this, you must have this already established, this is the first requirement.

How to use:

goto where you have added the PayPal code and completely replace that code with this - As mentioned before, if you are not using this for the US, you will have to change the settings for whatever country/currency you need - I have added lots of comments about each field, so editing it to suit your needs should be easy.


<form target="paypal" name="_$iOrder" action=""; method="post" >
<input type="hidden" name="cmd" value="_ext-enter">
<input type="hidden" name="redirect_cmd" value="_xclick">
<input type="hidden" name="business" value="$config[email]">
<input type="hidden" name="item_name" value="[$aList[iQuantity]] x $aList[sProduct] | Options:$aAttributes[basketList] | Date/Time Ordered:$aData[sDate]"><!-- adds volume of order -- adds last item to cart - also adds attributes if turned on, also adds date and time of order -->
<input type="hidden" name="item_number" value="$iOrder | Price:$aList[fPrice] ea | Sub Total:$aList[fSummary] | Shipping Cost:$aData[fCourierPrice] | Via: $aData[sCourier] | Comment on order: $aData[sComment]"><!-- adds last product name, order id number, price, subtotal, shipping cost and comment if entered to comment field -->
<input type="hidden" name="amount" value="$aData[fSummary]"> <!-- adds costing here -->
<input type="hidden" name="shipping" value="$aData[Delivery_cost]"> <!-- adds price of shipping -->
<input type="hidden" name="shipping2" value="">
<input type="hidden" name="currency_code" value="USD"><!-- Sets the shipping and billing country. -->
<input type="hidden" name="first_name" value="$aData[sFirstName]">
<input type="hidden" name="last_name" value="$aData[sLastName]">
<input type="hidden" name="address1" value="$aData[sStreet]">
<input type="hidden" name="address2" value=""><!-- add fields if this is needed -->
<input type="hidden" name="city" value="$aData[sCity]">
<input type="hidden" name="state" value="$aData[sState]"> <!-- added state field to accomodate the US - remove if not neeed/used -->
<input type="hidden" name="zip" value="$aData[sZipCode]"> <!-- this could also be postcode or ....? -->
<input type="hidden" name="lc" value="US"> <!-- Locale. This is the buyer's checkout flow language. -->
<input type="hidden" name="email" value="$aData[sEmail]"> <!-- Email address. (Max. length = 127) -->
<input type="hidden" name="no_note" value="1">
<input type="image" src=""; name="submit" alt="Make payments with PayPal" width="62" height="31" border="0" onClick="top.location.href='index.php?p=ordersBasket'"> <!-- added last -->


A note for use with this - I would like (feedback) on this! It took me awhile to get this to this stage, and I'm giving it to all of you.. all I ask in return, is responses - good or bad. Whoever said that "No news is good news, was an idiot! - No news is just that!, no news!

Email direct to -- Author note

Yes, yes... 2.0 version - at this point I don't know if there is an free Open Source version that is PayPal proficient (except if you buy the one from here -- ) -- why release a free version when there's one for sale? I have bought it and am currently looking into doing a similar setup for that too. from what I can see the MediaFire, the Tec, and Sklep versions are somewhat similar as to the way they handle PayPal, so some further testing is going to be done. At this point there is not a 2.0 version, but I'm working on it.

idaryl - I know this will help........


Avatar: idaryl

2007-01-21 04:58

This will give you a graphic idea of what this does :-)


No avatar

2007-08-31 16:28

hi i have tried to use this but don't no were to start am trying to add it to v1.4 from scratch but don't Know what to add to what files and were to add them, could you please help me idaryl thanks from Patrick


Avatar: idaryl

2007-08-31 20:09

Look at the second sentence - there is a link there - I was pretty sure I was explicit about the whys and wherefores regarding my submission here to begin with


Avatar: idaryl

2007-08-31 20:27

OK here's another link with better descriptions

I know the additions I made, work - I've seen other snippets of code in this forum that have the insert in them so I know it works.


Avatar: idaryl

2007-09-04 16:25

Did you get it to work?


No avatar

2007-09-06 10:38

hello ,

i am using this on version 1.3 and its work creat ! but if your gonna redirect to the paypal website , on top there's only your email adres in big letters , benead there's the bill, well correct ! good job , only i want mij own logo on top how do i do this ?
plees help me out here,
i used this :
thanks, i hope some one will help me

paul ,Arnhem holland


Avatar: idaryl

2007-09-06 11:10

I sent you an email about your shop (responded to your private request) however, upon further reflection and looking at what you wrote above [ there's only your email adres in big letters , benead there's the bill ] -- ?? -- I can only assume thats what you're seeing in Paypal - right?

If so, then you'll have to use your control panel setup in paypal to add your logo to your account (is it a sandbox or just a standard account?) - but -- there again, if you hav'nt upgraded your paypal account to business you'll never be able to change it - its a Paypal thing - sorry.

But...... let me know


No avatar

2007-09-06 19:20

hello , that is correct i dit recieve the email , but after talking to people of paypal is it so that i have a premier account and it should work out fine ,
but it is not going oke this way .... what to do now ??? please help me out ...!

paul ,Arnhem holland


Avatar: idaryl

2007-09-07 12:31

Not going ok what way?


No avatar

2007-09-07 12:37

well , i do want to have my logo insted of my email name on top , if your redirect to the paypal site ...

paul ,Arnhem holland


Avatar: idaryl

2007-09-07 13:28

Oiks - as I've said three times now - this is not a QuickCart issue - its a Paypal one, you have to setup your PAYPAL account to accept a logo on YOUR paypal page - my redirect - its only a further addon to another piece of code - it follows the same proceedure as the standard one or the plugin one you buy - it simply posts data to the account setup by a person in Paypal....

if they have only setup a simple basic - accept monies account - thats all it does... (in PayPal)

if you want to "pretty up" the PayPal account you will have to do it there (as the account owner by logging into PayPal) - boy, am I repeating myself here :p

Asking QC to post your logo into your paypal account is something that cannot be done so comments about its not going OKE this way are somewhat unreasonable; given the inexplicable criteria you are expecting...

It posts the data - so it works! - You want paypal pretty - you have to do it there - end of story!!!!


No avatar

2007-11-08 12:00

Hi, Thanks for the update and filling the fields. That's great. I have still one problem that was already there. If I test locally on xammp I see the paypal button but If I put the qc on line I don't see any button and I get only the thank you message as if I already payed. What can this be? Please help!


Jeroen Ozo

Back to top
about us | contact