cburnett
12-31-2010, 04:23 PM
[questions]
What does name="OptionGroupCount" refer?
& Why does site code not match shopping cart code?
[Why I ask] I noticed that source code has name="OptionGroupCount" value="[lots of different #s]" on front end but the live code of back-end do not match.
[Example and see below]
front-end ula-equipment.com/cdt.asp (http://www.ula-equipment.com/cdt.asp?o=1) (source 1)
back-end CDT backpack in shopping cart (http://www.ula-equipment.com/store/pc/viewPrd.asp?idproduct=5) (source 2)
[history] Company website was built by professionals. I inherited maintenance.
Front-end is .asp and integrates with a shopping cart Product Cart v3.5
[how question arose] as I am preparing for a new option to be added to all backpacks, I noted that front end OptionGroupCount and back end OptionGroupCount were miss matched on many products.
[follow up question] Do I need the front end OptionGroupCount to be unique between front end pages i.e. each product? As the pages have been working I see that I do not need the front end to match back end code, but should I clean this up since i'm doing this work?
[ aspiration] I hope that by understanding this OptionGroupCount I'll write cleaner code in future and or identify where I do not need to spend time editing existing source code.
Source 1
<td>Pack Total:
<!-- update these -->
<input type="hidden" name="OptionGroupCount" value="11" />
<input type="hidden" name="idproduct" value="5" />
<input type="hidden" name="baseWeight" id="baseWeight" value="17" />
<input type="hidden" name="baseCost" id="baseCost" value="135" />
<!-- /update these -->
<input type="hidden" name="calculatedTotal" id="calculatedTotal" value="0" />
<input type="hidden" name="calculatedWeight" id="calculatedWeight" value="0" />
<input type="hidden" name="previouslySelectedRadioButton" value="0" /></td>
<td><input name="weight" type="text" id="weight" onfocus="this.blur();" size="4" maxlength="5" readonly />
oz</td>
<td>$
<input name="total" type="text" id="total" onfocus="this.blur();" size="5" readonly /></td>
</tr>
</table>
Source 2
<input type="hidden" name="OptionGroupCount" value="4">
<!-- End Product Options -->
What does name="OptionGroupCount" refer?
& Why does site code not match shopping cart code?
[Why I ask] I noticed that source code has name="OptionGroupCount" value="[lots of different #s]" on front end but the live code of back-end do not match.
[Example and see below]
front-end ula-equipment.com/cdt.asp (http://www.ula-equipment.com/cdt.asp?o=1) (source 1)
back-end CDT backpack in shopping cart (http://www.ula-equipment.com/store/pc/viewPrd.asp?idproduct=5) (source 2)
[history] Company website was built by professionals. I inherited maintenance.
Front-end is .asp and integrates with a shopping cart Product Cart v3.5
[how question arose] as I am preparing for a new option to be added to all backpacks, I noted that front end OptionGroupCount and back end OptionGroupCount were miss matched on many products.
[follow up question] Do I need the front end OptionGroupCount to be unique between front end pages i.e. each product? As the pages have been working I see that I do not need the front end to match back end code, but should I clean this up since i'm doing this work?
[ aspiration] I hope that by understanding this OptionGroupCount I'll write cleaner code in future and or identify where I do not need to spend time editing existing source code.
Source 1
<td>Pack Total:
<!-- update these -->
<input type="hidden" name="OptionGroupCount" value="11" />
<input type="hidden" name="idproduct" value="5" />
<input type="hidden" name="baseWeight" id="baseWeight" value="17" />
<input type="hidden" name="baseCost" id="baseCost" value="135" />
<!-- /update these -->
<input type="hidden" name="calculatedTotal" id="calculatedTotal" value="0" />
<input type="hidden" name="calculatedWeight" id="calculatedWeight" value="0" />
<input type="hidden" name="previouslySelectedRadioButton" value="0" /></td>
<td><input name="weight" type="text" id="weight" onfocus="this.blur();" size="4" maxlength="5" readonly />
oz</td>
<td>$
<input name="total" type="text" id="total" onfocus="this.blur();" size="5" readonly /></td>
</tr>
</table>
Source 2
<input type="hidden" name="OptionGroupCount" value="4">
<!-- End Product Options -->