Thanks so much for your help! I will try that this evening.
Do you know if there is a way to do it such that only one template is used
for all products so, if the extra fields are needed for input, it is somehow
associated with the product thus not requiring different templates for
different products?
My concern is if I have too many templates, I will forget to update parts in
one and not the others (if there is a change). Unless I'm not seeing the
best way to set up the product templates. Maybe you have a good suggestion?
"jim" <jstavast@xmission.com> wrote in message
news:e9umt2$2or$1@eval.shopsite.com...
In your product template you would put something like this:
----------------------------
form action="[-- SHOPPING_CART_URL BASE --]/order.cgi" method=post
input type=hidden name=storeid value=[-- STORE_ID --]
input type=hidden name=dbname value=products
input type=hidden name=function value=add
input type=hidden name=itemnum value=[-- PRODUCT.RecordNumber --]
[-- IF PRODUCT.DisplayOrderingOptions --]
br>[-- PRODUCT.OptionText --]
[-- ORDER_OPTION_MENU LINE --]
[-- END_IF --]
[-- IF PRODUCT.OptionsBox --]
Name: <textarea name="[-- PRODUCT.Recordnumber --]:freeopt"
/textarea><br
Address: <textarea name="[-- PRODUCT.Recordnumber --]:freeopt"
/textarea><br
City: Name: <textarea name="[-- PRODUCT.Recordnumber --]:freeopt"
/textarea><br
State: Name: <textarea name="[-- PRODUCT.Recordnumber --]:freeopt"
/textarea><br
Zip: Name: <textarea name="[-- PRODUCT.Recordnumber --]:freeopt"
/textarea><br
[-- END_IF --]
input type=image src="[--
OUTPUT_DIRECTORY_URL --]/media/button_add.gif" border=0 name="Add to Cart"
alt="Add to Cart"
/form
---------------------------
Note all the Text area lines. When this is displayed on the page there
will be a separate input field for each. When they are added to the
shopping cart they will all be put in the single field for the product
with a comma between each entry . You would need to sort out what the
shopper entered based on the commas. So it would look like this:
My Name, 283 N. Main, Any town, AnyState, 12345
You could include a separator between fields by putting something like
this between each of the textarea lines
input type=hidden name="[-- PRODUCT.Recordnumber --]:freeopt"
value=";"
But that would display as
My Name,;, 283 N. Main,;, Any town,;, AnyState,;, 12345
In the shopping cart and the shopper might wonder what all of the ,;,
characters in the text were.
I have seen a store where they have a button that pops open a dialog with
different input fields from the shopping cart screen . The shopper fills
in their information on that screen and it is passed back to the form
field for the product in the cart. I'm sure this requires javascript but
I don't know how it was done.
Note that the textarea could be any type of input so you could have a
single line input by using
input type=text name="[-- PRODUCT.Recordnumber --]:freeopt" size=50
Jim
Pam Laing wrote:
Does anyone know how to have multiple input text fields for products and
get them into the one text field allowed? I am not a javascript writer
and have been told it can be done, but don't know where to start.
The site is
www.smallfrypress.net -- I have customized the page and
product templates which went fine. Just need the multiple input fields.
Thanks for any help anyone can provide!
Pam