Ordering Options not populating cart page

General ShopSite user discussion

Ordering Options not populating cart page

Postby deb_w » Sun Feb 11, 2007 6:22 pm

I have ordering options (color and size) enabled on my t shirt product more info pages. They are working correctly. However, when I pick a color and size, off of the more info page, then click on add to cart, the color and size do not populate the cart. Instead the drop down menus reappear on the cart.

I'm afraid this will annoy customers. Is there a way to have these values carried through so they don't have to be selected again?

Debbie
deb_w
 
Posts: 17
Joined: Mon Feb 05, 2007 10:35 pm

Postby JeremeD » Sun Feb 11, 2007 7:47 pm

Deb,

Those values should be transferred to the cart. If they are not, something is wrong with the code. Double check to make sure that the dropdowns appear inside your <form> and <form> tags.
SD360.com
Certified ShopSite Designer
ShopSite Templates Available Now
JeremeD
 
Posts: 60
Joined: Sat Feb 10, 2007 4:20 pm
Location: Athens, GA

Postby deb_w » Sun Feb 11, 2007 9:16 pm

Jereme,

Thanks for the reply. I didn't alter the code for the cart. I'm using the sc-default.

Shouldn't that be working?

Deb
deb_w
 
Posts: 17
Joined: Mon Feb 05, 2007 10:35 pm

Postby JeremeD » Sun Feb 11, 2007 10:12 pm

The problem that I mentioned would be in your product template. I believe you mentioned that you customized your product template to match your new design.
SD360.com
Certified ShopSite Designer
ShopSite Templates Available Now
JeremeD
 
Posts: 60
Joined: Sat Feb 10, 2007 4:20 pm
Location: Athens, GA

Postby Jim » Sun Feb 11, 2007 10:15 pm

It is not the cart code that is the problem, it is the code for the product Add to Cart on your store pages. Ordering options (as well as quantity) must be submitted to the cart through a Form submit and not an href. Check out one of the ShopSite provided templates to see how this is done.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby deb_w » Mon Feb 12, 2007 12:50 pm

Thanks guys! I'll work on it when I get home this evening and test it out.

Deb
deb_w
 
Posts: 17
Joined: Mon Feb 05, 2007 10:35 pm

Postby deb_w » Mon Feb 12, 2007 5:41 pm

I made the change and still the data is not populating the shopping cart. Here is my Product Page code:

[--DEFINE PRODUCT--]
<!--Format product as a table to put picture over product info -->
<table border="0">
<tr>
[--IF PRODUCT.DisplayMoreInformationPage--]
<td align="center"><a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Graphic --]</a></td>
[--ELSE--]
<td align="center">[-- PRODUCT.Graphic --]</td>
[--END_IF--]
</tr>
<tr>
[--IF PRODUCT.DisplayMoreInformationPage--]
<td align="center"><a href="[-- PRODUCT.MoreInfoURL --]"><b>[-- PRODUCT.Name --]</b></a></td>
[--ELSE--]
<td align="center"><b>[-- PRODUCT.Name --]</b></td>
[--END_IF--]
</tr>
</table>

[-- IF PRODUCT.DisplayOrderingOptions --]
<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 --]">
[-- PRODUCT.OptionText --]
[-- Order_Option_Menu Line --]
<input type="submit" value="[-- PRODUCT.AddToCartButton --]">
</form>
[-- ELSE --]
<a href="[-- PRODUCT.AddToCartURL --]">Add to Cart</a>
[-- END_IF --]


[-- END_DEFINE PRODUCT--]

[-- DEFINE MORE_INFO_PAGE--]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Shirt Expo - [-- PRODUCT.Name --]- T Shirt</title>
<style type="text/css" media="screen">
@import '/style.css';
[-- INCLUDE style.css --]
<!--
td {
font-family: serif;
}

td.tag {
background-color: #cccc99;
font-family: courier new, courier;
font-size: 10pt;
padding-top: 2pt;
padding-bottom: 2pt;
}

-->
</style>
</head>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" ><table width="100%" border="0" align="center" cellpadding="0" cellspacing="5" class="grayborder">
<th class="thead-round"><h1>[-- PRODUCT.Name --] Details </h1></th>

<tr>
<td width="25%" valign="top" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="19" class="tl-edge"><img src="media/x.gif" width="1" height="1" /></td>
<td class="tcenter"><img src="media/x.gif" alt="x" width="1" height="1" /></td>
<td class="tr-edge"><img src="media/x.gif" width="1" height="1" /></td>
</tr>
<tr><align="center">[-- PRODUCT.MoreInformationGraphic --]</tr>
<tr><small><align="center">[-- PRODUCT.SKU --]</small></tr>

<tr>[-- IF PRODUCT.SaleOn --]
<strike>Regular Price [-- PRODUCT.Price --]</strike>&nbsp;&nbsp;<b>[-- PRODUCT.SaleAmount --]&nbsp;&nbsp;<font color="red">On Sale!</font></b>
[-- ELSE --]
<b><align="center">Regular Price [-- PRODUCT.Price --]</b>
[-- END_IF --]
</tr>

<tr><p>
<nobr>
<a href="[--PRODUCT.AddToCartURL--]">[-- PRODUCT.AddToCartButton --]</a>
<a href="[--SHOPPING_CART_URL--]">[-- PRODUCT.ViewCartButton --]</a>
</nobr></p></tr>

</table></td>

<td width="75%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="19" class="tl-edge"><img src="media/x.gif" width="1" height="1" /></td>
<td class="tcenter"><img src="media/x.gif" alt="x" width="1" height="1" /></td>
<td class="tr-edge"><img src="media/x.gif" width="1" height="1" /></td>
</tr>


<tr><align="left">
<p>&nbsp;</p>

[-- PRODUCT.MoreInformationText --]</tr>

<tr>
<p>&nbsp;</p>
<p>&nbsp;</p>
Color and Size Options</tr>
<tr>[-- Order_Option_Menu Line --]</tr>
</tr>
</table></td>

</table>
</blockquote>
</body>
</html>
[-- END_DEFINE MORE_INFO_PAGE--]
deb_w
 
Posts: 17
Joined: Mon Feb 05, 2007 10:35 pm

Postby JeremeD » Mon Feb 12, 2007 11:50 pm

Hey Deb,

I took your code from the section of your template that defines the product and used it in a sample template. It works as it should in transferring the chosen options into the cart.

Are you wanting to just remove the dropdowns from the cart? If so, you can add this to your stylesheet:

Code: Select all
.cart_op, .cart_op1, .cart_op2 {
display: none;
}


This will keep the options from displaying in the cart. Make sure you add those code after the ShopSite cart codes.

On your more info page, you do not have a form tag around your ordering options. That is keeping those options from transferring to the cart. It has to be 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="hidden" name="itemnum" value="[-- PRODUCT.RecordNumber --]">
[-- PRODUCT.OptionText --]
[-- Order_Option_Menu Line --]
</form>


Also, there are a number of errors in your regular HTML.
SD360.com
Certified ShopSite Designer
ShopSite Templates Available Now
JeremeD
 
Posts: 60
Joined: Sat Feb 10, 2007 4:20 pm
Location: Athens, GA

Postby deb_w » Tue Feb 13, 2007 7:30 am

Thank you Jeremy!

I have everything working o.k. now.

Deb
deb_w
 
Posts: 17
Joined: Mon Feb 05, 2007 10:35 pm


Return to User Forum

Who is online

Users browsing this forum: Bing [Bot] and 137 guests