close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Can a style influence what is passed onto the cart page?

Thread began 3/01/2011 12:49 pm by Roxana | Last modified 3/04/2011 9:40 am by Roxana | 1866 views | 5 replies

Roxana

Hi Jason,

I think I may have found the solution by combining the use of php and css. I duplicated the select menu, then hide the first select menu, if there is no version option, both with php and css. The other select menu only shows, if there is a version option (with php).

It is probably very unconventional, and took me a while to figure out. Serious programmers will probably cry out in horror, but here is the code I used. It works for me, but if there is something, that should not be done, could you please let me know?

php:
<p>

                  <?php if ($row_rsversion['version_id'] == "13") { // Show if recordset empty ?>
                    <select class="<?php echo $tmpElementClassVersion?> name="SelectVersion" id="SelectVersion" onchange="WA_FilterAndPopulateSubList(rssize_WAJA,MM_findObj('SelectVersion'),MM_findObj('SelectSize'),0,0,false,': ');showprice()">
                      <?php
do {  
?>
                      <option value="<?php echo $row_rsversion['version_id']?>"<?php if (!(strcmp($row_rsversion['version_id'], $row_rsversion['version']))) {echo "selected=\"selected\"";} ?>><?php echo $row_rsversion['version_compound']?></option>
                      <?php
} while ($row_rsversion mysql_fetch_assoc($rsversion));
  
$rows mysql_num_rows($rsversion);
  if(
$rows 0) {
      
mysql_data_seek($rsversion0);
      
$row_rsversion mysql_fetch_assoc($rsversion);
  }
?>
                    </select>
                    <?php // Show if recordset empty ?>
                    <?php if ($row_rsversion['version_id'] != "13") { // Show if recordset not empty ?>
                    <select name="SelectVersion" id="SelectVersion" onchange="WA_FilterAndPopulateSubList(rssize_WAJA,MM_findObj('SelectVersion'),MM_findObj('SelectSize'),0,0,false,': ');showprice()">
                      <?php
do {  
?>
                      <option value="<?php echo $row_rsversion['version_id']?>"<?php if (!(strcmp($row_rsversion['version_id'], $row_rsversion['version']))) {echo "selected=\"selected\"";} ?>><?php echo $row_rsversion['version_compound']?></option>
                      <?php
} while ($row_rsversion mysql_fetch_assoc($rsversion));
  
$rows mysql_num_rows($rsversion);
  if(
$rows 0) {
      
mysql_data_seek($rsversion0);
      
$row_rsversion mysql_fetch_assoc($rsversion);
  }
?>
                    </select>
                    <?php // Show if recordset not empty ?>   
                  </p>
                  <p>
                      <?php if ($row_rssizedefault['size_id'] == "8") { // Show if recordset empty ?>
                    <select class="<?php echo $tmpElementClassSize?> name="SelectSize" id="SelectSize" onchange="showprice()">
                      <?php
do {  
?>
                      <option value="<?php echo $row_rssizedefault['size_id']?>"<?php if (!(strcmp($row_rssizedefault['size_id'], $row_rssize['size']))) {echo "selected=\"selected\"";} ?>><?php echo $row_rssizedefault['size']?></option>
                      <?php
} while ($row_rssizedefault mysql_fetch_assoc($rssizedefault));
  
$rows mysql_num_rows($rssizedefault);
  if(
$rows 0) {
      
mysql_data_seek($rssizedefault0);
      
$row_rssizedefault mysql_fetch_assoc($rssizedefault);
  }
?>
                    </select>
                    <?php // Show if recordset empty ?>
                    <?php if ($row_rssizedefault['size_id'] != "8") { // Show if recordset not empty ?>
                    <select name="SelectSize" id="SelectSize" onchange="showprice()">
                      <?php
do {  
?>
                      <option value="<?php echo $row_rssizedefault['size_id']?>"<?php if (!(strcmp($row_rssizedefault['size_id'], $row_rssize['size']))) {echo "selected=\"selected\"";} ?>><?php echo $row_rssizedefault['size']?></option>
                      <?php
} while ($row_rssizedefault mysql_fetch_assoc($rssizedefault));
  
$rows mysql_num_rows($rssizedefault);
  if(
$rows 0) {
      
mysql_data_seek($rssizedefault0);
      
$row_rssizedefault mysql_fetch_assoc($rssizedefault);
  }
?>
                    </select>
                    <?php // Show if recordset not empty ?>
                  </p>

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