orderanywhere options now appearing in cart

General ShopSite user discussion

orderanywhere options now appearing in cart

Postby barnstormer » Sun Mar 21, 2010 9:08 am

I have an orderanywhere form that needs to pass values to the cart. I have not been successful in making this work with Pro V10, as I've done with Pro v8.2. However, it has been 2-3 years, so I've probably forgotten something.

I've even tried using this simplified code example, without success:
Code: Select all
<form action="https://---removed---/---removed---/sb/order.cgi" method="post" id="orderfrm" class="validate">
<input type="hidden" name="storeid" value="*---removed---" />
  <input type="hidden" name="dbname" value="products">
  <input type="hidden" name="function" value="add">
  <input type="hidden" name="sku" value="PR-1">
  <input type="hidden" name="PR-1:finoptnum" value="1">
<br />Handle Color
  <select name="PR-1:finopt:0" size="1">
    <option value="Black">Black</option>
    <option value="Orange">Orange</option>
  </select>
<br />Quantity
  <input type="text" size="2" name="PR-1:qnty" value="1"><br />
<input type="image" src="img/ele/btn-chkout.gif" alt="Checkout" />
</form>


I've been searching the forum and documentation for two days, but can't find anything specific to my issue.

I ultimately need to have the option values affect the pricing (such as with ;+1.00), but will tackle that once I can see the options in the cart.

Thanks in advance for any assistance.
Deborah
barnstormer
 
Posts: 35
Joined: Thu Jun 14, 2007 4:59 pm

Postby Jim » Sun Mar 21, 2010 9:30 am

Here is the code I get from order anywhere with to options.
(Note you have to enable the order option display and quantity display under Products > Edit product Layout. Did you do that?)
Code: Select all
<form action="http://MYDOMAIN.com/sc/order.cgi" method=post>
<select name="1:finopt:0" size=1>
<option value="color;n">color
<option value="red">red
<option value="green;+5">green
<option value="blue">blue
</select>
<select name="1:finopt:1" size=1>
<option value="height;n">height
<option value="tall;+2">tall
<option value="short">short
</select>
<input type=hidden name="1:finoptnum" value=2>
<BR>Quantity <input type=text size="2" name="1:qnty" value="1" >
<input type=hidden name="storeid" value="*1c5d5cf4902c989e90ec576becbc21fd">
<input type=hidden name="dbname" value="products">
<input type=hidden name="function" value="add">
<input type=hidden name="itemnum" value="1">
<input type=image src="http://www.MYDOMAIN.com/ShopSite/images/en-US/buttons/transparent/whitetext-addtocart.gif" border="0" align="bottom" alt="Add to Cart" name="Add to Cart">
<input type=image src="http://www.MYDOMAIN.com/ShopSite/images/en-US/buttons/transparent/whitetext-viewcart.gif" border="0" align="bottom" alt="View Cart" name="View Cart">
</form>
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby barnstormer » Sun Mar 21, 2010 10:59 am

Hi, Jim. Thanks for the post and suggested code.... still no luck here.

Yes. These settings are checked in the product layout:
Check here to display this product's Quantity Pricing
Check here to display this product's Ordering Options menu

Using the following code, the options still do not appear in the cart:

Code: Select all
<form action="https://---removed--/sb/order.cgi" method="post">
<select name="3:finopt:0" size="1">
<option value="color;n">color
<option value="red">red
<option value="green;+5">green
<option value="blue">blue
</select>
<select name="3:finopt:1" size="1">
<option value="height;n">height
<option value="tall;+2">tall
<option value="short">short
</select>
<input type="hidden" name="3:finoptnum" value="3">
<BR>Quantity <input type="text" size="2" name="3:qnty" value="1" >
<input type="hidden" name="storeid" value="*---removed---" />
<input type="hidden" name="dbname" value="products">
<input type="hidden" name="function" value="add">
<input type="hidden" name="itemnum" value="3">
<input type="image" src="img/ele/btn-chkout.gif" alt="Checkout" />
</form>


I modified this for my item number, which is 3, instead of 1. I also changed the "itemnum" value to "3", because there are three options. (I think that's how it works, anyway.)

I tried using the sku instead of item number... no luck.

I also tried adding hidden inputs, (found my notes from v8.2):
<input type="hidden" name="3:finopt:1" value = "Color">
<input type="hidden" name="3:finopt:1" value = "Height">

Even with the hidden inputs, the options do not display in the cart and the price is not changed when the ;+2 is selected for Height.

I'm perplexed!

Deborah
barnstormer
 
Posts: 35
Joined: Thu Jun 14, 2007 4:59 pm

Postby PatG » Sun Mar 21, 2010 12:29 pm

i guess it depends on your installation, but shouldn't "sb/order.cgi" be "sc/order.cgi"?
PatG
 
Posts: 34
Joined: Sat Feb 06, 2010 1:03 pm
Location: Winter Park, FL

Postby PatG » Sun Mar 21, 2010 12:31 pm

sample code is here:
http://shopsite.com/orderanywherecode.html

yours looks correct to me.
PatG
 
Posts: 34
Joined: Sat Feb 06, 2010 1:03 pm
Location: Winter Park, FL

Postby PatG » Sun Mar 21, 2010 12:32 pm

are you missing some option closing tags?

looks like there are several </option> tags missing?
PatG
 
Posts: 34
Joined: Sat Feb 06, 2010 1:03 pm
Location: Winter Park, FL

Postby barnstormer » Sun Mar 21, 2010 12:59 pm

PatG, Thank you so much for your helpful suggestions. Unfortunately, I'm still not having success.

Have added the missing closing option tags. (Can't believe I missed that!)

I've already tried the code in the shopsite URL example, but no luck.

This particular installation is definitely in the directory /sb/, instead of /sc/. And /sb/ is the code generated in the admin.

Here's the current code I'm working with:

Code: Select all
<form action="https://---removed---/cgi----removed---/sb/order.cgi" method="post" id="orderfrm" class="validate">
<input type="hidden" name="storeid" value="*---removed---" />
<input type="hidden" name="dbname" value="products">
<input type="hidden" name="function" value="add">
<input type="hidden" name="PR-1:qnty" value="1" />
<input type="hidden" name="sku" value="PR-1">
<input type="hidden" name="PR-1:finoptnum" value="2">

<input type="hidden" name="PR-1:finopt:0" value="Color">
<select name="PR-1:finopt:0">
<option name="PR-1:finopt:0" value="color;n">color</option>
<option name="PR-1:finopt:0" value="red">red</option>
<option name="PR-1:finopt:0" value="green;+5">green</option>
<option name="PR-1:finopt:0" value="blue">blue</option>
</select>

<input type="hidden" name="PR-1:finopt:1" value="Size">
<select name="PR-1:finopt:1">
<option name="PR-1:finopt:1" value="height;n">height</option>
<option name="PR-1:finopt:1" value="tall;+2">tall</option>
<option name="PR-1:finopt:1" value="short">short</option>
</select>

<input type="image" src="img/ele/btn-chkout.gif" alt="Checkout" />
</form>


I wonder if this is a template issue, as in the template is simply not generating a place in the code for the option info.

I checked the html page code and back office settings for my v8.2 account which is working, and I don't see anything I'm doing differently.
barnstormer
 
Posts: 35
Joined: Thu Jun 14, 2007 4:59 pm

Postby robm » Sun Mar 21, 2010 1:34 pm

If the options are not appearing in the cart at all, make sure you entered these available ordering options in the backoffice under:

Products -> Edit Product Info -> "Pull-down Menus"

The options must first exist before they can be passed to ShopSite and appear in the cart.

Rob
robm
 
Posts: 463
Joined: Fri Aug 04, 2006 5:46 pm
Location: Connecticut

Postby barnstormer » Sun Mar 21, 2010 2:02 pm

robm, Your suggestion definitely pointed me in the right direction. The options are now appearing in the cart. What a relief!

When I initially entered the ordering options for the product, the drop-downs were appearing inside the shopping cart, which I didn't want. I did not know until today that the display of the menus inside the cart could be turned off in the Commerce Setup.

I'm going to document this for next time, for sure!

Thanks Rob, and everyone who helped out! Now on to the next challenge... ;-)

Deborah
barnstormer
 
Posts: 35
Joined: Thu Jun 14, 2007 4:59 pm


Return to User Forum

Who is online

Users browsing this forum: No registered users and 160 guests