close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Adding <select> Items to Cart

Thread began 1/29/2014 9:44 am by Mike Perry | Last modified 1/30/2014 10:07 am by Mike Perry | 1879 views | 11 replies

Mike Perry

Adding <select> Items to Cart

I have An Item Select Page where Training Packages can be purchased for a specified player.

The Player is selected from a recordset filtered by the User's ID, and chosen by a <select> and Dynamic <option> form> (Code follows)

*****************************************************************************************
<form id="playerSelect" name="playerSelect" style="margin:10px 100px;">
<fieldset title="">
<select name="Player" id="Player">
<option value=0>Select a Player to Sign Up</option>
<?php
// RepeatSelectionCounter_1 Begin Loop
$RepeatSelectionCounter_1_IterationsRemaining = $RepeatSelectionCounter_1_Iterations;
while($RepeatSelectionCounter_1_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_1 || $row_myPlayers){
?> <option value="<?php echo $row_myPlayers['id']; ?>"><?php echo $row_myPlayers['playerFirstName']." ".$row_myPlayers['playerLastName']; ?></option>
<?php
} // RepeatSelectionCounter_1 Begin Alternate Content
else{
?>
<?php } // RepeatSelectionCounter_1 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
if(!$row_myPlayers && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining = 0;}
$row_myPlayers = mysql_fetch_assoc($myPlayers);
}
$RepeatSelectionCounter_1++;
} // RepeatSelectionCounter_1 End Loop
?>
</select><br><br><br>

</fieldset>
</form>

***********************************************************************'

Then a second Form is revealed, with a <select> and Dynamic <option> providing a list of available packages

************************************************************************

<form id="TrainSelect" name="TrainSelect" style="margin:10px 100px;">
<fieldset>
<select name="TO" id-"TO">
<option>Select a Training Option</option>
<?php
// RepeatSelectionCounter_2 Begin Loop
$RepeatSelectionCounter_2_IterationsRemaining = $RepeatSelectionCounter_2_Iterations;
while($RepeatSelectionCounter_2_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_2 || $row_trainingOptions){
?>
<option value="<?php echo $row_trainingOptions['ProductID']; ?>" alt="<?php echo $row_trainingOptions['ProductLongDesc']; ?>" title="<?php echo $row_trainingOptions['ProductLongDesc']; ?>"><?php echo $row_trainingOptions['ProductShortDesc']; ?></option>
<?php
} // RepeatSelectionCounter_2 Begin Alternate Content
else{
?>
<?php } // RepeatSelectionCounter_2 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_2 && $RepeatSelectionCounter_2_IterationsRemaining != 0){
if(!$row_trainingOptions && $RepeatSelectionCounter_2_Iterations == -1){$RepeatSelectionCounter_2_IterationsRemaining = 0;}
$row_trainingOptions = mysql_fetch_assoc($trainingOptions);
}
$RepeatSelectionCounter_2++;
} // RepeatSelectionCounter_2 End Loop
?>
</select>
</fieldset>
</form>

***************************************************************

What is the best way to bind the information from these two drop-downs to the PlayerID and ItemID in the cart Object??

Thanks,

Mike

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...