Anywhere Buttons for Variable Price (Donation) Not Working

General ShopSite user discussion

Anywhere Buttons for Variable Price (Donation) Not Working

Postby Jayne » Sun Jul 11, 2010 9:13 am

Hello - absolute ShopSite newbie here. I'm trying to create an Anywhere button so that we can collect donations online. The Anywhere button is not creating a text field to capture the amount and I'm getting a shopping cart page that says: No variable price specified, item not added to the shopping cart.

URL: http://www.bhcivic.org/newsite/membersh ... ership.htm
(Two instances that don't work here)

Can anyone help me, please.

Many, many thanks!
Jayne
 
Posts: 1
Joined: Sun Jul 11, 2010 9:03 am
Location: Amesbury, MA

Postby ShopSite Lauren » Mon Jul 12, 2010 7:46 am

You are correct, the OrderAnywhere feature does not include the variable options such as variable price. You can use the following code for your OrderAnywhere buttons.

Founders Circle:
<form action="http://bhcivic.org/cgi-bin/sc/order.cgi" method="post">
<input type="hidden" name="storeid" value="*1c21b9f5f00a3846b0dc47eb1a71e1b0">
<input type="hidden" name="dbname" value="products">
<input type="hidden" name="function" value="add">
<input type="hidden" name="itemnum" value="12">
<b>Price:</b> $<input name="12:price" size="4" maxlength="10" value="500.00" type="text">
<input type=image src="http://bhcivic.org/store/shopsite-images/en-US/buttons/clean-red/red-addtocart.jpg" name="Add to Cart" alt="Add to Cart">
</form>

Donation:
<form action="http://bhcivic.org/cgi-bin/sc/order.cgi" method="post">
<input type="hidden" name="storeid" value="*1c21b9f5f00a3846b0dc47eb1a71e1b0">
<input type="hidden" name="dbname" value="products">
<input type="hidden" name="function" value="add">
<input type="hidden" name="itemnum" value="13">
<b>Price:</b> $<input name="13:price" size="4" maxlength="10" value="" type="text">
<input type=image src="http://bhcivic.org/store/shopsite-images/en-US/buttons/clean-red/red-addtocart.jpg" name="Add to Cart" alt="Add to Cart">
</form>
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Postby barnstormer » Thu Jul 15, 2010 2:14 pm

This post is very timely, as I have an item for which I would like to allow the shopper to enter their own price. (I am using OrderAnywhere buttons for this site.)

I used the example provided for the "Donation" form, replacing "itemnum" with the SKU.

The cart view page is indicating an error of:
"The selected item is no longer available"

My code:
Code: Select all
<form action="http://www.mydomain.com/cgi-bin/sb/order.cgi" method="post">
<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="P-1" /> 
<b>Price:</b> $<input name="P-1:price" size="4" maxlength="10" value="" type="text" />
<input type="image" src="btn-add-to-crt.gif" alt="Add to cart" />
</form>


In the product settings, I've enabled variable pricing, variable name, variable SKU.

Can you see where I've possibly gone wrong? Any help is appreciated.
barnstormer
 
Posts: 35
Joined: Thu Jun 14, 2007 4:59 pm

Postby ShopSite Lauren » Thu Jul 15, 2010 2:26 pm

By default, the OrderAnywhere buttons are by itemnum (a generic item number which ShopSite assigns) rather than by SKU. It sounds like your store is setup with the default OrderAnywhere button, which is by itemnum. You can log into your ShopSite backoffice, go to Merchandising > OrderAnywhere > highlight your Donation product > Show Selected HTML. This will give you the HTML for your product. You can copy the <form action=""> tag and paste it into your example from below, as well as the <input type="hidden" name="storeid" value="*jsldjflj"> Then last, find where it has itemnum, and copy that item number and paste it into your form.
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Postby barnstormer » Thu Jul 15, 2010 2:42 pm

Lauren, Thanks for the reply. In this installation, I am using OrderAnywhere, but have been using SKU throughout the site, not itemnum. Each of the other items has multiple options to be sent to the cart.

This new "variable price" item is unique to the cart, which is why I am unsure how to code it's form.

The default HTML code generated by ShopSite is as follows:
<form action="http://www.mydomain.com/cgi-mydomain/sb/order.cgi" method=post>
<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="DP-1" />
<input type=image src="[image source]" border="0" align="bottom" alt="Add to Cart" name="Add to Cart" />
</form>

I do not see itemnum referenced anywhere in the HTML code generated or in the product listing within ShopSite. Is there another way to view the itemnum assigned by ShopSite? This is a hosted cart, so I don't have direct access to the database.
barnstormer
 
Posts: 35
Joined: Thu Jun 14, 2007 4:59 pm

Postby ShopSite Lauren » Thu Jul 15, 2010 2:58 pm

Do you have inventory tracking turned on for this product?
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Postby barnstormer » Thu Jul 15, 2010 3:10 pm

Inventory tracking is "currently disabled", according to my cart.
barnstormer
 
Posts: 35
Joined: Thu Jun 14, 2007 4:59 pm

Postby ShopSite Lauren » Thu Jul 15, 2010 3:12 pm

Could you provide a URL to where you have added the donation code?
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Postby barnstormer » Thu Jul 15, 2010 3:55 pm

My client has a live website, so in posting to a forum, I am privacy conscious on their behalf. I'll send details to you directly via pm, and will post any provided solution back here on the forum for others to view.
barnstormer
 
Posts: 35
Joined: Thu Jun 14, 2007 4:59 pm

Postby ShopSite Lauren » Thu Jul 15, 2010 4:13 pm

I usually use the itemnum, so I hadn't even thought about how when you use the SKU for the OrderAnywhere, you also need to change the input name="itemnum" to name="sku". I should have caught that earlier....but that should be all you need to get the donation product working.
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Postby barnstormer » Thu Jul 15, 2010 4:41 pm

That solved it! Working code ended up as:

<form action="http://www.mydomain.com/cgi-mydomain/sb/order.cgi" method="post">
<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="DP-1" />
Price: $ <input name="DP-1:price" value="" type="text" />
<input type="image" src="[image path]" alt="Add to cart" />
</form>

I so appreciate your assistance!
barnstormer
 
Posts: 35
Joined: Thu Jun 14, 2007 4:59 pm

Re: Anywhere Buttons for Variable Price (Donation) Not Worki

Postby MarkE » Fri Oct 01, 2010 7:57 pm

I have tried many variations of this code and always end up with the same dollar amount that is in the products data.

<b>Donation</b><br>
Please enter the amount you would like to donate.<br>
<form action="http://shopsite.aaaaaaaaaaaa.com/ss10.0/sc/order.cgi" method="post">
<input type="hidden" name="storeid" value="*2................" />
<input type="hidden" name="dbname" value="products" />
<input type="hidden" name="function" value="add" />
<input type="hidden" name="sku" value="Gift-1" />
Price: $ <input name="Gift-1:price" size="4" maxlength="10" value="" type="text" />
<input type= "submit" />
</form>

Help... First day working with shopsite

Mark
MarkE
 
Posts: 1
Joined: Fri Oct 01, 2010 7:52 pm

Re: Anywhere Buttons for Variable Price (Donation) Not Worki

Postby barnstormer » Sun Oct 03, 2010 10:03 am

Mark, In the Shopsite back office make sure under in 'Edit Product Info' you have checked the checkbox for Variable Price "Check here to enable variable pricing".

Hope that helps.
~ Deborah
barnstormer
 
Posts: 35
Joined: Thu Jun 14, 2007 4:59 pm

Re: Anywhere Buttons for Variable Price (Donation) Not Worki

Postby Omi » Wed Apr 27, 2011 10:13 am

If I am using shopsite starter, can I also accomplish this? I am asking because I have put in the code from this forum, adding it to my product description because the anywhere buttons would not let me change the code. I get the button and the blank space to put in the donation amount but when I put in an amount and push the button, I get a 0 in the shopping cart. I cannot find in the documentation/help anything that point me to a solution.

Any help is greatly appreciated.
Omi
 
Posts: 3
Joined: Wed Apr 27, 2011 7:08 am

Re: Anywhere Buttons for Variable Price (Donation) Not Worki

Postby ShopSite Lauren » Wed Apr 27, 2011 10:53 am

No, the variable pricing feature is in ShopSite Manager and ShopSite Pro but it is not in the starter version. I have seen merchants setup a donation product with a $1 price. Then with the OrderAnywhere button they would use the quantity field and make it look like a price field. So you would have something that looks like: Donate: $_.00, and the blank would actually be the quantity field. The form would look similar to:

<form action="http://bhcivic.org/cgi-bin/sc/order.cgi" method="post">
<input type="hidden" name="storeid" value="*1c21b9f5f00a3846b0dc47eb1a71e1b0">
<input type="hidden" name="dbname" value="products">
<input type="hidden" name="function" value="add">
<input type="hidden" name="itemnum" value="12">
<b>Donate</b> $<input name="12:qnty" size="4" maxlength="4" value="500" type="text">.00<br>
<input type=image src="http://bhcivic.org/store/shopsite-images/en-US/buttons/clean-red/red-addtocart.jpg" name="Add to Cart" alt="Add to Cart">
</form>
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Next

Return to User Forum

Who is online

Users browsing this forum: No registered users and 27 guests