Check Box

General ShopSite user discussion

Check Box

Postby Steve » Thu Dec 22, 2005 12:43 pm

Is there a way to add a checkbow that a customer can click to add an
different item. For instance, they can click on the order button to add the
product, but I want to have a check box there they can click to also include
the appropriate batteries. The batteries have a different SKU than the
original product. All of our add anywhere button send a form.

I could make an option with a drop down list to add batteries but I'd like
to do it with a check box if possible.

ShopSite 8
Steve
 

Re: Check Box

Postby Jim » Wed Dec 28, 2005 11:01 am

In the ShopSite help on page:
http://www.shopsite.com/help/8.0/en-US/ ... i-add.html
it gives an example of creating multi-product add to cart buttons.

This page (http://www.beeutahful.com/store/arachne2003_sale.html) is
using the templates from the help to allow shoppers to order multiple
items with a single click. You could use the templates from the Help as
a starting point but you would probably need to do some javascript and
special layout on your own to get things formatted the way you want.

Jim


Steve wrote:
Is there a way to add a checkbow that a customer can click to add an
different item. For instance, they can click on the order button to add the
product, but I want to have a check box there they can click to also include
the appropriate batteries. The batteries have a different SKU than the
original product. All of our add anywhere button send a form.

I could make an option with a drop down list to add batteries but I'd like
to do it with a check box if possible.

ShopSite 8

Jim
 

Check Boxs on More Info Page

Postby tom0360 » Wed Sep 27, 2006 1:03 pm

Would it be possible to Create a Multi-Product [Add to Cart] Button for use on the More Info pages using something similar to the Shop Site help page shows. I Don't see where the help example would work as I am not sure that the more info page uses the page template that a product may be assigned to in anyway.



Thanks
Tom
tom0360
 
Posts: 34
Joined: Tue Aug 22, 2006 10:55 am

Postby Jim » Thu Sep 28, 2006 5:56 am

You are correct that more info pages don't use a page template but there is a template section in the product template that defines the entire moreinfo page. So it should be possible to create a multi add to cart on the moreinfo page.

The page part of the template must have the main <form> and the product part (subproduct in the case of a moreinfo page) just has the check boxes (i.e. input values).
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

check box

Postby tom0360 » Thu Sep 28, 2006 9:47 pm

Thanks Jim for the Reply,

I am still not totally sure how to make this work.

By trying to use the help sample code I get all sorts of template errors trying to include it in a product template.

Should I be trying to set up for the check boxes to be using the subproducts of a product?

Would it be possible for you to give a brief example of what my product template may look like?


Thanks
Tom
tom0360
 
Posts: 34
Joined: Tue Aug 22, 2006 10:55 am

check box

Postby tom0360 » Fri Sep 29, 2006 9:25 am

To elaborate a little as to what I would like to accomplish:

On the More Info Page only I would like to have the main product listed with a check box, quantity, price

then all subproducts listed with check box, quantity, price with only one add to cart button for all items on page.



Thanks
Tom
tom0360
 
Posts: 34
Joined: Tue Aug 22, 2006 10:55 am

Postby loren_d_c » Fri Sep 29, 2006 11:06 am

The ShopSite documentation page here shows how to make an add to cart form:
http://www.shopsite.com/templates/examp ... tions.html

Basically you would put this form in the DEFINE MORE_INFO_PAGE section of your product template, but change the hidden itemnum field to be a checkbox field instead, add a quantity text box, and insert your LOOP SUBPRODUCTS loop before the submit button and closing form tag, something like this:

Code: Select all
<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=checkbox name="itemnum" value="[-- PRODUCT.RecordNumber --]">
  <input type=text size=2 name="[-- PRODUCT.RecordNumber --]:qnty" value="1">

[-- LOOP SUBPRODUCTS --]
<br>[-- SUBPRODUCTS --]
[-- END_LOOP SUBPRODUCTS --]

  <input type="submit" value="[-- PRODUCT.AddToCartButton --]">
  </form>


Then in your DEFINE SUBPRODUCT section, you would include the same type of itemnum and quantity box form fields as you did for the main product, so something like this:

Code: Select all
[-- DEFINE SUBPRODUCT --]
  <input type=checkbox name="itemnum" value="[-- PRODUCT.RecordNumber --]">
  <input type=text size=2 name="[-- PRODUCT.RecordNumber --]:qnty" value="1">
[-- END_DEFINE SUBPRODUCT --]


So now your subproducts will also have a checkbox and quantity field and will be within the same form as the main product on the More Info Page. Of course you would want to flesh out the above code with the product names, prices, and the layout/spacing you want for them, but this is the general idea.

-Loren
loren_d_c
 
Posts: 2572
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Postby tom0360 » Wed Oct 04, 2006 6:23 am

Thanks Loren,

I will give that a try.



Tom
tom0360
 
Posts: 34
Joined: Tue Aug 22, 2006 10:55 am


Return to User Forum

Who is online

Users browsing this forum: No registered users and 101 guests