Hosted Buttons VS Non Hosted Buttons

AngelSpeaks
Contributor
Contributor

Hi.  I'm Cathy.  It's been awhile since I posted here (I forgot about this forum!).   I'm using Paypal Payments Standard.  My website currentlyis using the old unhosted buttons.  The code for the buttons came from two places, PayPal, and Softseller (which handles my digital download products).  Items purchased from any of these always ended up on the same shopping cart.

 

I've added my non digital items to the saved buttons and replaced the unhosted buttons with the hosted buttons code.  Th download items are still using the unhosted buttons.  They are going into different shopping carts. 

 

How can I get them to go to one?

 

Thanks.

Login to Me Too
12 REPLIES 12

snowshoe
Frequent Advisor
Frequent Advisor

One would actually have to see what is going on but, just taking a guess here, it's possible that the new PayPal item button code is opening a new browser window each time an item is added to the cart.  As you're jumping between two services, it opening too many browser windows.  Because everthing was working fine before you switched to the "hosted" item button code suggest trying the following tweak to the first line of the item button code:

 

Change target="paypal" to target="_self".   This will keep the shopping cart page on the same page.   See example below: 

<form target="_self" action="https://www.paypal.com/cgi-bin/webscr method="post"> 

 The HTML command target="_self" puts the new document in the same window as the current document.   Some web browsers like FireFox, Chrome and older versions of IE will open a new or second window to display a new document.   In order to prevent having multiple windows open while doing a task, it's recommended to use target="_self". 

 

Login to Me Too

AngelSpeaks
Contributor
Contributor

Thank you for responding Snowshoe.  I should have mentioned that my site uses frames.  When I changed target to "_self", I received the message "Please open a new window to continue shopping" and it still used different carts.

 

Here is the code, if this will help with minor edits (post wouldn't except with links).

 

Hosted button for CD item:

 

<form target="paypal" action="removed by me, wouldn't except" method="post" target="_self">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="xxxxxxxxxxxxxxx">
<table>
<tr><td><input type="hidden" name="on0" value="Operating Systems">Operating Systems</td></tr><tr><td><select name="os0">
    <option value="Windows 7">Windows 7 </option>
    <option value="Windows Vista">Windows Vista </option>
    <option value="Windows XP">Windows XP </option>
    <option value="Windows 2000">Windows 2000 </option>
    <option value="Windows ME">Windows ME </option>
</select> </td></tr>
</table>
<input type="image" src="removed by me, wouldn't except border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" width="120" height="26">
<img alt="" border="0" src="removed by me, wouldn't except:" width="1" height="1">
</form>

And the unhosted button for the digital download:

 

<form action="removed by me, wouldn't except" method="post" target="paypal">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="add" value="1">
<input type="hidden" name="business" value="removed by me, wouldn't except">
<input type="hidden" name="undefined_quantity" value="0">
<input type="hidden" name="item_name" value=" Digital Download">
<input type="hidden" name="item_number" value="itenno.">
<input type="hidden" name="amount" value="39.00">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="shipping" value="0">
<input type="hidden" name="shipping2" value="0">
<input type="hidden" name="handling" value="0">
<input type="hidden" name="notify_url" value="removed by me, wouldn't except- links to Softseller">
<input type="hidden" name="return" value="removed by me, wouldn't except-links to Softseller">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
 <table>
  <tr><td><input type="hidden" name="on0" value="Operating Systems">Operating Systems</td>
   <td><select name="os0">
    <option>Windows 7</option>
    <option>Windows Vista</option>
    <option>Windows XP</option>
    <option>Windows 2000</option>
    <option>Windows ME</option>
   </select></td></tr>
</table>
<input type="image" src="removed by me, wouldn't except" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" width="87" height="23">
</form>

 

Thanks!

Login to Me Too

snowshoe
Frequent Advisor
Frequent Advisor

Thanks but, can't really tell anything from this.  Need a link. 

 

Also thanks for mentioning that you use Frames, as that can be issue.  PayPal does not work with Frames unless you tweak the code.

 

Another tip, if you do post code, you need to use the the Clipboard with the "C" on it in the tool bar.  Do so you can post the entire code except for an email address, you can't post an email address in it's normal format.

Login to Me Too

AngelSpeaks
Contributor
Contributor

Thanks Snowshoe.  I tried using a version of the site without frames and got the same results.  I wasn't sure what you meant "without a link", so I am posted the code without the email addy, hopefully that is what you meant.

 

Softseller code (digital download item):

 

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="paypal">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="add" value="1">
<input type="hidden" name="business" value="myemailaddy">
<input type="hidden" name="undefined_quantity" value="0">
<input type="hidden" name="item_name" value="MyCommunication Board 2.0 - Digital Download">
<input type="hidden" name="item_number" value="ASBCAR20">
<input type="hidden" name="amount" value="44.00">
<input type="hidden" name="no_shipping" value="0">
<input type="hidden" name="shipping" value="0">
<input type="hidden" name="shipping2" value="0">
<input type="hidden" name="handling" value="0">
<input type="hidden" name="notify_url" value="http://SoftSeller.com/cgi-bin/odb.exe/SS/odb/SSNotify.odb">
<input type="hidden" name="return" value="http://softseller.com/cgi-bin/odb.exe/SS/odb/SSReturn.odb">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
 <table>
  <tr><td><input type="hidden" name="on0" value="Operating Systems">
    <font size="2" face="Comic Sans MS">Operating Systems</font></td>
   <td><select name="os0">
    <option>Microsoft Windows 7</option>
    <option>Microsoft Windows Vista</option>
    <option>Microsoft Windows XP</option>
   </select></td></tr>
</table>
<input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but22.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" width="87" height="23">
</form>

 

Hosted button code:

 

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_self">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="2UPBVTPWYEX36">
<table>
<tr><td><input type="hidden" name="on0" value="Operating Systems">Operating Systems</td></tr><tr><td><select name="os0">
    <option value="Windows 7">Windows 7 </option>
    <option value="Windows Vista">Windows Vista </option>
    <option value="Windows XP">Windows XP </option>
    <option value="Windows 2000">Windows 2000 </option>
    <option value="Windows ME">Windows ME </option>
</select> </td></tr>
</table>
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" width="120" height="26">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

 

Thanks

 

Login to Me Too

snowshoe
Frequent Advisor
Frequent Advisor

Something to try as you're using frames.   Use the line of code below for hosted, non-hosted and view cart code.  For a test, just try one of each and see if that makes any difference.

 

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">

The coding has to be consistant with each item button including view cart.  PayPal recently added the target="_top" attribute to code generated by the online button creator so the code works properly with frames.

Login to Me Too

AngelSpeaks
Contributor
Contributor

Hi Snowshoe.

 

I've replaced the code with yours (thanks).  The View Cart will only display the digital download item(un hosted button), the hosted button still goes to a different cart.

Login to Me Too

snowshoe
Frequent Advisor
Frequent Advisor

How about providing a link to web site?

 

One note, before you test changes and code, are you deleting your web browser's cookies, temp files and history.  You should be doing this each time you make a change to your item button code to ensure you are testing clean each time.  Retaining old browser info can cause unexpected results.

Login to Me Too

AngelSpeaks
Contributor
Contributor

Right now, I am testing two versions.  One in Frontpage using frames and one in Expression Web which only has inline frames.  When I test, I launch the browser from either Frontpage or Expression Web, then I close out the browser.  The browser I'm testing with is Firefox 20.0.1.  I have the browser setup to delete cookies when I close the browser so I am testing clean.

 

The only link I can give you is to my live website, which has all unhosted buttons.  The live site is www.angelspeaks.com, which is how I want the carts to work.

 

In Expression Web, the target="paypal" and target="_top" gets highlighted because of two versions of target.  In doesn't work with _top or _self (with target="paypal") nor does it work with just target="paypal".

Login to Me Too

AngelSpeaks
Contributor
Contributor

I "think" I may have solved my problem.  The softseller website mentioned that PayPal buttons can be used but the following code would have to go in. 

 

If you already have PayPal buttons and don't want to set the IPN URL in your PayPal account (for example, if not all your items are SoftSeller downloadable products), you can manually add the following line to your PayPal button HTML code:

<input name="notify_url" type="hidden" value="http://softseller.com/cgi-bin/odb.exe/SS/odb/SSNotify.odb">

 

So, I added the following to Advanced Variables:

 

 

handling_cart=0.00  (override handling charge)
shipping=0.00  (no shipping)
notify_url=http://softseller.com/cgi-bin/odb.exe/SS/odb/SSNotify.odb"

Both items went to the same cart.

 

Softseller does have this code in their buttons:

 

<input type="hidden" name="return" value="http://softseller.com/cgi-bin/odb.exe/SS/odb/SSReturn.odb">
<input type="hidden" name="rm" value="2">

Could these be added to Advanced Variables as well?

 

Thanks

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.