Integrating PayPal Mini cart with PayPal Custom Buttons
Integrating PayPal Mini cart with PayPal Custom Buttons
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?
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
Colin M
Western Australia
Re: Integrating PayPal Mini cart with PayPal Custom Buttons
Although I did not test it, the PayPal mini cart may also work with custom code.
Re: Integrating PayPal Mini cart with PayPal Custom Buttons
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.Pablo wrote:Although I did not test it, the PayPal mini cart may also work with custom code.
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
Colin M
Western Australia
Re: Integrating PayPal Mini cart with PayPal Custom Buttons
Change
to
Code: Select all
<input type="hidden" name="cmd" value="_s-xclick">
Code: Select all
<input type="hidden" name="cmd" value="_cart">
Re: Integrating PayPal Mini cart with PayPal Custom Buttons
OK, that got us one step closer - it now displays the Mini cart - but it doesn't add the selected item to the cart ?Pablo wrote:ChangetoCode: Select all
<input type="hidden" name="cmd" value="_s-xclick">
Code: Select all
<input type="hidden" name="cmd" value="_cart">
Yours truly
Colin M
Western Australia
Colin M
Western Australia
Re: Integrating PayPal Mini cart with PayPal Custom Buttons
Your code does not have fields for amount and item ID
Re: Integrating PayPal Mini cart with PayPal Custom Buttons
I agree Pablo, but that's the code that is generated by PayPal - I've tried adding the code:Pablo wrote:Your code does not have fields for amount and item ID
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">
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
Colin M
Western Australia
Re: Integrating PayPal Mini cart with PayPal Custom Buttons
I think you should also include the item name/number
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".
Code: Select all
<input type="hidden" name="item_name" value="">
<input type="hidden" name="item_number" value="">
So I have no control over the behavior of this script. It is provided "AS IS".
- BaconFries
-
- Posts: 5648
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Integrating PayPal Mini cart with PayPal Custom Buttons
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.
The second part should output the size and the price for what you need.
Hope this helps...
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>
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" />
Re: Integrating PayPal Mini cart with PayPal Custom Buttons
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?
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
Colin M
Western Australia
Re: Integrating PayPal Mini cart with PayPal Custom Buttons
I'm sorry I do not have any control over the behavior of this (third party) script. it is provided "AS IS".
Re: Integrating PayPal Mini cart with PayPal Custom Buttons
Ahh, ok - no worries Pablo, thank you anywayPablo wrote:I'm sorry I do not have any control over the behavior of this (third party) script. it is provided "AS IS".
Yours truly
Colin M
Western Australia
Colin M
Western Australia
- BaconFries
-
- Posts: 5648
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Integrating PayPal Mini cart with PayPal Custom Buttons
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.
Re: Integrating PayPal Mini cart with PayPal Custom Buttons
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.
hahaha we do indeed.BaconFries wrote:on what you refer to as a"Walkabout
BC, that would be awesome mate - thank you - looking forward to that post!
Yours truly
Colin M
Western Australia
Colin M
Western Australia
- BaconFries
-
- Posts: 5648
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Integrating PayPal Mini cart with PayPal Custom Buttons
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
https://github.com/jeffharrell/minicart/issues/66
Re: Integrating PayPal Mini cart with PayPal Custom Buttons
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.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
Yours truly
Colin M
Western Australia
Colin M
Western Australia
- BaconFries
-
- Posts: 5648
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Integrating PayPal Mini cart with PayPal Custom Buttons
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....
Re: Integrating PayPal Mini cart with PayPal Custom Buttons
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.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....
Yours truly
Colin M
Western Australia
Colin M
Western Australia
- BaconFries
-
- Posts: 5648
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Integrating PayPal Mini cart with PayPal Custom Buttons
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...
Re: Integrating PayPal Mini cart with PayPal Custom Buttons
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 friendBaconFries 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...
Yours truly
Colin M
Western Australia
Colin M
Western Australia