Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Listings Manager (Realty Manager & Auto Manager):
PayPal and options

 

 


annie
User

Mar 10, 2009, 7:01 AM

Post #1 of 5 (3952 views)
Shortcut
PayPal and options Can't Post

PayPal has the on0 ans os0 and on1 and os1 values (ie. optional dropdown boxes for various choices such as colour or size) and I am wondering how to implement them into Listings Manager so that these values will be passed to the PayPal shopping cart.

The shopper needs to be able to choose the desired size and colour from a dropdown list so this can't be one value which is input at the LM backend. The problem is that not every item in LM will need to use these values and the values might vary between listings so I can't hard code this into the listings template.


(This post was edited by annie on Mar 10, 2009, 7:34 AM)


Donna
Staff / Moderator


Mar 11, 2009, 4:08 PM

Post #2 of 5 (3858 views)
Shortcut
Re: [annie] PayPal and options [In reply to] Can't Post

Hi there,

I suspect you could use a combination of the method we use in our Paypal shopping cart tutorial and conditional statements to put those values in. Then, if there's something IN the field, it would get printed (via JavaScript) on the page to be viewed, and submitted through the form. If there was nothing in those fields, nothing would get passed.

Take a look at this post for how to setup a Javascript conditional statement: http://www.interactivetools.com/forum/gforum.cgi?post=68312#68312

Does that make sense? Instead of having just the field display in the "print" statement, you would instead have the Paypal code (plus the listing field you're using to save those values, as per the Paypal tutorial above.)

If you're stuck on that, give me a few more details about how the end result should look and I can go into more detail about how to set that up. :)

Donna

--
support@interactivetools.com


annie
User

Mar 12, 2009, 1:48 AM

Post #3 of 5 (3835 views)
Shortcut
Re: [Donna] PayPal and options [In reply to] Can't Post

Thank you Donna,

What I'm trying to achieve is to be able to create a dropdown list within the backend which will display on the web site and then the chosen option will be sent to PayPal.

I know you can set up a dropdown menu in the back end of Listings Manager but is it possible to create a field in the back end which will show a dropdown list on the site? I need it to be more than a yes/no choice and the site visitor needs to make the choice, not the person inputting the details into LM.

If this isn't possible (and I'm a little reluctant to use javascript because I'm assuming those who have it turned off will not see the options), I think I may have reached a compromise by adding two optional input text boxes which can be completed or not by the site visitor. This does, however, look a little messy and over the top.


Donna
Staff / Moderator


Mar 13, 2009, 2:56 PM

Post #4 of 5 (3769 views)
Shortcut
Re: [annie] PayPal and options [In reply to] Can't Post

Hi Annie,

Ah! Sorry, I didn't quite understand how your extra fields were working. Yes, that's definitely do-able, although will depend a little on what the code you need is. Can you give me the specific code you're trying to pass over?

Donna

--
support@interactivetools.com


annie
User

Mar 13, 2009, 3:44 PM

Post #5 of 5 (3767 views)
Shortcut
Re: [Donna] PayPal and options [In reply to] Can't Post

This is the code that I'm using at present. As you'll see, the options are hardcoded and therefore appear on all publish_listings pages. I want to use a dropdown menu instead of the text boxes with the choices that the site visitor will select from but the criteria will be different for various products.




Code
  

<table border="0" cellpadding="0" cellspacing="0">

<tr>

<td valign="middle" width="180">

<h2>Price - £$lfield2$</h2>

</td>

<td valign="middle" align="left">

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

<input type=
"image" src="http://www.domain.com/images/buy1.gif" border="0" alt="Add to Basket" title="Add to Basket" width="47" height="18" name="I1">

<img alt=
"" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">

<input type=
"hidden" name="add" value="1">

<input type=
"hidden" name="cmd" value="_cart">

<input type=
"hidden" name="business" value="email@domain.com">

<input type=
"hidden" name="item_name" value="$lfield1$">

<input type=
"hidden" name="amount" value="$lfield2$">

<input type=
"hidden" name="return" value="http://www.domain.com/success.html">

<input type=
"hidden" name="cancel_return" value="http://www.domain.com/cancel.html">

<input type=
"hidden" name="currency_code" value="GBP">

<input type=
"hidden" name="lc" value="GB">

<input type=
"hidden" name="bn" value="PP-ShopCartBF">



</td></tr>


<tr>

<td valign="middle">

<b>Option 1</b>

</td>

<td valign="middle"><input type="hidden" name="on0" value="Option 1" maxlength="220"><input type="text" name="os0">

</td>

</tr>

<tr>

<td valign="middle">

<b>Option 2</b>

</td>

<td valign="middle"><input type="hidden" name="on1" value="Option 2" maxlength="220"><input type="text" name="os1">

</td>

</tr></form></table>