Integrating PayPal Mini cart with PayPal Custom Buttons

This forum is dedicated to discussions about shopping carts/ecommerce.
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
Post Reply
User avatar
ColinM
 
 
Posts: 917
Joined: Wed Feb 09, 2011 3:40 am
Location: Western Australia

Integrating PayPal Mini cart with PayPal Custom Buttons

Post by ColinM »

Hi Pablo,

I'm just assisting a client set up a new PayPal account and have noticed that PayPal has the ability to create custom buttons that allows you add a drop down combo selection box for, say, selection of a clothing size - you configure the button in the PayPal account and then imbed the HTML in an HTML box.

I love the simplicity of the PayPal mini cart extension and how it keeps the buyer on the website, but it appears it needs to be the standard cart buttons?
Yours truly
Colin M
Western Australia
User avatar
Pablo
 
Posts: 22472
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by Pablo »

Although I did not test it, the PayPal mini cart may also work with custom code.
User avatar
ColinM
 
 
Posts: 917
Joined: Wed Feb 09, 2011 3:40 am
Location: Western Australia

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by ColinM »

Pablo wrote:Although I did not test it, the PayPal mini cart may also work with custom code.
It doesn't seem to Pablo - it opens the standard second tab browser window as if you had a std cart button without the Paypal Mini Cart extension in it.

Not sure if you can suggest anything from the PayPal Custom Button code snippet in the HTML area:

Code: Select all

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="RK2N3UWQR44U8">
<table>
<tr><td><input type="hidden" name="on0" value="Please select size">Please select size</td></tr><tr><td><select name="os0">
	<option value="Size S">Size S $60.00 AUD</option>
	<option value="Size M">Size M $60.00 AUD</option>
	<option value="Size L">Size L $60.00 AUD</option>
	<option value="Size XL">Size XL $60.00 AUD</option>
	<option value="Size XXL">Size XXL $60.00 AUD</option>
	<option value="Size 3XL">Size 3XL $60.00 AUD</option>
</select> </td></tr>
</table>
<input type="hidden" name="currency_code" value="AUD">
<input type="image" src="https://www.paypalobjects.com/en_AU/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal — The safer, easier way to pay online.">
<img alt="" border="0" src="https://www.paypalobjects.com/en_AU/i/scr/pixel.gif" width="1" height="1">
</form>
Yours truly
Colin M
Western Australia
User avatar
Pablo
 
Posts: 22472
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by Pablo »

Change

Code: Select all

<input type="hidden" name="cmd" value="_s-xclick">
to

Code: Select all

<input type="hidden" name="cmd" value="_cart">
User avatar
ColinM
 
 
Posts: 917
Joined: Wed Feb 09, 2011 3:40 am
Location: Western Australia

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by ColinM »

Pablo wrote:Change

Code: Select all

<input type="hidden" name="cmd" value="_s-xclick">
to

Code: Select all

<input type="hidden" name="cmd" value="_cart">
OK, that got us one step closer - it now displays the Mini cart - but it doesn't add the selected item to the cart ?
Yours truly
Colin M
Western Australia
User avatar
Pablo
 
Posts: 22472
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by Pablo »

Your code does not have fields for amount and item ID
User avatar
ColinM
 
 
Posts: 917
Joined: Wed Feb 09, 2011 3:40 am
Location: Western Australia

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by ColinM »

Pablo wrote:Your code does not have fields for amount and item ID
I agree Pablo, but that's the code that is generated by PayPal - I've tried adding the code:

Code: Select all

<input type="hidden" name="amount" value="54.00">
<input type="hidden" name="tax" value="6.00">
<input type="hidden" name="currency_code" value="AUD">
but it still says my cart is empty if I use the mini cart.

In addition, I've noticed two other issues:

1) If I add the mini cart and add an item to the cart using the original WB add to cart button the mini cart doesn't show the tax only a pre-tax sub total.
2) If I test the same item without the mini cart - it (of course) reverts back to PayPal cart page but shows the GST.
3) If I use the code that PayPal provides to select a size with the Custom button and not the mini cart, it also doesn't show the GST.
Yours truly
Colin M
Western Australia
User avatar
Pablo
 
Posts: 22472
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by Pablo »

I think you should also include the item name/number

Code: Select all

<input type="hidden" name="item_name" value="">
<input type="hidden" name="item_number" value="">
Note that I did not create the PayPal minicart, this is an external script. I only create an extension 'wrapper' for it, on request.
So I have no control over the behavior of this script. It is provided "AS IS".
User avatar
BaconFries
 
 
Posts: 5640
Joined: Thu Aug 16, 2007 7:32 pm

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by BaconFries »

Hi Colin lets see if this helps the first part is the code you have already provided which is the buying options for the sizes and price.

Code: Select all

<select name="os0">
   <option value="Size S">Size S $60.00 AUD</option>
   <option value="Size M">Size M $60.00 AUD</option>
   <option value="Size L">Size L $60.00 AUD</option>
   <option value="Size XL">Size XL $60.00 AUD</option>
   <option value="Size XXL">Size XXL $60.00 AUD</option>
   <option value="Size 3XL">Size 3XL $60.00 AUD</option>
</select>
The second part should output the size and the price for what you need.

Code: Select all

<input type="hidden" name="on0" value="Size" />
   <input type="hidden" name="option_select0" value="Size S" />
   <input type="hidden" name="option_amount0" value="60.00" />
   <input type="hidden" name="option_select1" value="Size M" />
   <input type="hidden" name="option_amount1" value="60.00" />
   <input type="hidden" name="option_select2" value="Size L" />
   <input type="hidden" name="option_amount3" value="60.00" />
   <input type="hidden" name="option_select3" value="Size M" />
  <input type="hidden" name="option_amount4" value="60.00" />
  <input type="hidden" name="option_select4" value="Size L" />
  <input type="hidden" name="option_amount5" value="60.00" />
  <input type="hidden" name="option_select5" value="Size XL" />
  <input type="hidden" name="option_amount6" value="60.00" />
  <input type="hidden" name="option_select6" value="Size XXL" />
  <input type="hidden" name="option_amount7" value="60.00" />
  <input type="hidden" name="option_select7" value="Size 3XL" />
Hope this helps...
User avatar
ColinM
 
 
Posts: 917
Joined: Wed Feb 09, 2011 3:40 am
Location: Western Australia

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by ColinM »

Pablo and BC - Thank you so much, my apologies for the delay in getting back to you, been away.

I haven't got down to testing all that code yet, but I will. Doing it one step at a time...

One question for you please Pablo, at this stage, why does the Mini cart by itself show only the Pre-tax amount as the item amount, the same page using the std external PayPal method shows the gross (GST included) amount?
Yours truly
Colin M
Western Australia
User avatar
Pablo
 
Posts: 22472
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by Pablo »

I'm sorry I do not have any control over the behavior of this (third party) script. it is provided "AS IS".
User avatar
ColinM
 
 
Posts: 917
Joined: Wed Feb 09, 2011 3:40 am
Location: Western Australia

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by ColinM »

Pablo wrote:I'm sorry I do not have any control over the behavior of this (third party) script. it is provided "AS IS".
Ahh, ok - no worries Pablo, thank you anyway 8)
Yours truly
Colin M
Western Australia
User avatar
BaconFries
 
 
Posts: 5640
Joined: Thu Aug 16, 2007 7:32 pm

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by BaconFries »

Colin there may be a way I havent tried it as not at my PC on what you refer to as a"Walkabout: but will be back soon and try what I am thinking and will post results.
User avatar
ColinM
 
 
Posts: 917
Joined: Wed Feb 09, 2011 3:40 am
Location: Western Australia

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by ColinM »

BaconFries wrote:Colin there may be a way I havent tried it as not at my PC on what you refer to as a"Walkabout: but will be back soon and try what I am thinking and will post results.
BaconFries wrote:on what you refer to as a"Walkabout
:lol: hahaha we do indeed.

BC, that would be awesome mate - thank you - looking forward to that post!
Yours truly
Colin M
Western Australia
User avatar
BaconFries
 
 
Posts: 5640
Joined: Thu Aug 16, 2007 7:32 pm

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by BaconFries »

Hi Colin ok have looked at this and my initial thought to maybe what could be done.....cant sorry. I paid a visit to the following from the original author (jeff harrell ) of the script is it is not possible but it will show in the checkout.
https://github.com/jeffharrell/minicart/issues/66
mayur007
 
 
Posts: 280
Joined: Tue Jun 24, 2014 9:06 am

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by mayur007 »

thanx
User avatar
ColinM
 
 
Posts: 917
Joined: Wed Feb 09, 2011 3:40 am
Location: Western Australia

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by ColinM »

BaconFries wrote:Hi Colin ok have looked at this and my initial thought to maybe what could be done.....cant sorry. I paid a visit to the following from the original author (jeff harrell ) of the script is it is not possible but it will show in the checkout.
https://github.com/jeffharrell/minicart/issues/66
Hi BC - yes, just read through that, haven't yet been able to get PayPal to show the GST at even checkout using the minicart, if that's what you're referring to? Thanks heaps for your endeavours mate and assistance - greatly appreciated. 8)
Yours truly
Colin M
Western Australia
User avatar
BaconFries
 
 
Posts: 5640
Joined: Thu Aug 16, 2007 7:32 pm

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by BaconFries »

Hi Colin no I was referring to when you click on checkout in the Minicart and it takes you to PayPal the tax should then display... If it doesn't then please try this just using the PayPal Button set it up as normal ie add a item, price, tax etc etc then check to see if the button passes all the info to the PayPal checkout and let me know I have tried this and it works so it safe to say that the PayPal button in WB is working correct....
User avatar
ColinM
 
 
Posts: 917
Joined: Wed Feb 09, 2011 3:40 am
Location: Western Australia

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by ColinM »

BaconFries wrote:Hi Colin no I was referring to when you click on checkout in the Minicart and it takes you to PayPal the tax should then display... If it doesn't then please try this just using the PayPal Button set it up as normal ie add a item, price, tax etc etc then check to see if the button passes all the info to the PayPal checkout and let me know I have tried this and it works so it safe to say that the PayPal button in WB is working correct....
Hi BC - Ah, sorry for the misunderstanding. Yes, I've assessed that, the Mini Cart does not pass the GST, nor does it appear externally in PayPal, and yes, the std WB PayPal dialogue/button works fine.
Yours truly
Colin M
Western Australia
User avatar
BaconFries
 
 
Posts: 5640
Joined: Thu Aug 16, 2007 7:32 pm

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by BaconFries »

Ok before I turn in. So I think it safe to say that the PayPal button is passing the tax it is simply not displaying it in the minicart output. Now you may need to set the tax amount in the PayPal account first and I believe that the tax will be added to the final payment once the user logs in or enters there details at checkout to pay. Maybe you can do a test using the sandbox this allows you to fully test without actually making a payment...right time to hot the hay...
User avatar
ColinM
 
 
Posts: 917
Joined: Wed Feb 09, 2011 3:40 am
Location: Western Australia

Re: Integrating PayPal Mini cart with PayPal Custom Buttons

Post by ColinM »

BaconFries wrote:Ok before I turn in. So I think it safe to say that the PayPal button is passing the tax it is simply not displaying it in the minicart output. Now you may need to set the tax amount in the PayPal account first and I believe that the tax will be added to the final payment once the user logs in or enters there details at checkout to pay. Maybe you can do a test using the sandbox this allows you to fully test without actually making a payment...right time to hot the hay...
Yes agreed on the std PayPal button. Yup checked, the account has GST added. Will give the Sandbox a go and advise. Again thanks for your help and engagement BC - so much appreciated - sleep deep my friend :D
Yours truly
Colin M
Western Australia
Post Reply