PDA

View Full Version : What does name="OptionGroupCount" refer? & Why does site code not match live code?


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 -->

Old Pedant
12-31-2010, 10:46 PM
There is no possible way for anyone to guess what OptionGroupCount is used for, based on the miniscule code you posted or by looking at those pages.

It surely has some sort of meaning to the shopping cart code, but you aren't showing us any of that code. And we can't see it by looking at the site, as it is part of the ASP code invisible to us.

FWIW, that isn't any sort of standard name. It's something unique to the shopping cart code you are using. You would have to find all the places that name is used in the ASP code (*NOT* in the HTML code...that is, not in what is visible by doing a VIEW->SOURCE on the web site) to begin to understand its purpose.

praneybehl
08-13-2011, 12:03 PM
Agree, Its hard to say looking at such a small snippet of code that whats it used for. About the difference in the codes, languages like php and asp are executed server-side and the browser only shows you the HTML

beautifulday
08-27-2011, 03:16 PM
I hope cburnett was able to figure that out, with so little to go on. Another option would be to use a different shopping cart.

cburnett
11-13-2011, 11:34 PM
Agree, Its hard to say looking at such a small snippet of code that whats it used for. About the difference in the codes, languages like php and asp are executed server-side and the browser only shows you the HTML


thanks that helps me understand how it is that i'm getting different data when inspecting the site live.

cburnett
11-13-2011, 11:35 PM
I hope cburnett was able to figure that out, with so little to go on. Another option would be to use a different shopping cart.

I am a studious one, so I was really always just trying to get best answer possible. It has been working on from all test I ran on several browsers in different versions.

thanks for your feedback.

casey

in my quest for knowledge I must skillfully apply my efforts, server side stuff isn't it yet.