Is it possible to Force Feed a quantity with a link???

This is an archive of old posting to the User Forum

Is it possible to Force Feed a quantity with a link???

Postby Tom Kordik » Tue Apr 23, 2002 10:02 am

Hello. We don't use the shopsite pages we use our own links. Is it
possible to somehow 'force feed' a default quantity value in a link? I have
a special that requires a QTY of 9 to save X amount. The discount is
already set up but I would like to have the quantity automatically fed in as
the value 9 when they click on the link.
Here is a normal link to add the product to the shopping cart:
http://www.mysitename.com/cgi-mybinname ... rename&dbn
ame=products&itemnum=123&function=add

Here was an attempt I made to feed in QTY = 9 when adding it to the shopping
cart:
http://www.mysitename.com/cgi-mybinname ... rename&dbn
ame=products&itemnum=123&function=add&qnty=9

Is there any way of finding out what name value pairs shopsite will accept
in its order.cgi links??
Can anyone offer any suggestions?
Thank you.
Tom Kordik
 

Re: Is it possible to Force Feed a quantity with a link???

Postby loren_d_c » Tue Apr 23, 2002 4:54 pm

In ShopSite v5 the ability to pass a quantity into the cart from the store pages
was added. In the ShopSite product templates this is done by displaying a text
box to the shopper for them to enter a quantity. Collecting this extra
subjective information requires the use of an HTML form rather than just a
simple href link.

So the short answer is "yes"...

.... if you create a custom product template, and rather than use a text field
for the Quantity variable in the form, hardcode that variable in a hidden field
to whatever value you want, like 9.

Here is an example of how you would do the order button section of your custom
product template to accomplish this:

<FORM action="[-- SHOPPING_CART_URL --]" method=post>
<input type=hidden name="[-- PRODUCT.RecordNumber --] :qnty" value="9" >
<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 --] >
<input type=submit value="[Add to Cart]">
<input type=submit name=checkout value="[View Cart]">
</FORM>

To get graphic submit buttons instead of the ugly grey ones that the browser
makes when the submit buttons are text, do something like this:

<input type=image src="media/add_to_cart.gif" border=0 name="Add to Cart"
alt="Add to Cart">
<input type=image src="media/view_cart.gif" border=0 name="View Cart" alt="View
Cart">

-Loren



Tom Kordik wrote:

Hello. We don't use the shopsite pages we use our own links. Is it
possible to somehow 'force feed' a default quantity value in a link? I have
a special that requires a QTY of 9 to save X amount. The discount is
already set up but I would like to have the quantity automatically fed in as
the value 9 when they click on the link.
Here is a normal link to add the product to the shopping cart:
http://www.mysitename.com/cgi-mybinname ... rename&dbn
ame=products&itemnum=123&function=add

Here was an attempt I made to feed in QTY = 9 when adding it to the shopping
cart:
http://www.mysitename.com/cgi-mybinname ... rename&dbn
ame=products&itemnum=123&function=add&qnty=9

Is there any way of finding out what name value pairs shopsite will accept
in its order.cgi links??
Can anyone offer any suggestions?
Thank you.
loren_d_c
 
Posts: 2571
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere


Return to User Forum Archive

Who is online

Users browsing this forum: No registered users and 38 guests

cron