close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Checkout Dynamic drop down list not working

Thread began 4/25/2012 3:33 pm by rgolab68503 | Last modified 4/30/2012 2:06 pm by Jason Byrnes | 1781 views | 9 replies |

rgolab68503

Checkout Dynamic drop down list not working

I am customizing my cart. Basically what is happening is that this cart is in a support section of my site for specific people to use. The checkout form is populated automatically from the session variables created at login. All the text entry fields work fine but when i comes to creating a drop down list connected to the information already in the database it will not recognize the current value which in this case is province = BC.

Any ideas?

Here is the code for the drop down box ...

<select name="state_province" id="state_province" title="<?php echo $row_rsUSERNAME['DealerProv']; ?>">
<option value="" <?php if (!(strcmp("", $row_rsUSERNAME['DealerProv']))) {echo "selected=\"selected\"";} ?>>Chose a Province</option>
<?php
do {
?>
<option value="<?php echo $row_rsPROVINCE['ProvAbbrev']?>"<?php if (!(strcmp($row_rsPROVINCE['ProvAbbrev'], $row_rsUSERNAME['DealerProv']))) {echo "selected=\"selected\"";} ?>><?php echo $row_rsPROVINCE['ProvName']?></option>
<?php
} while ($row_rsPROVINCE = mysql_fetch_assoc($rsPROVINCE));
$rows = mysql_num_rows($rsPROVINCE);
if($rows > 0) {
mysql_data_seek($rsPROVINCE, 0);
$row_rsPROVINCE = mysql_fetch_assoc($rsPROVINCE);
}
?>
</select>

I know the information is being passed to the page from tests done. I have also attached the checkout page as it sits now.

Thank you for your help.

Further to the above I tested the dynamic drop down in IE and Firefox on my computer and it didn't work. yet on anothe rcomputer in teh office it works fine. I would say it is a setting on my browser but the dynamic menues in the insert and update pages work fine.

Sign in to reply to this post

Jason ByrnesWebAssist

to help troubleshoot, add the following code to the page just before the closing </body> tag:


php:
<?php

echo("SQL :".$query_rsUSERNAME."<br />TotalRows ".$totalRows_rsUSERNAME."<br />");
echo(
"<pre>");
var_dump($_SESSION);
echo(
"</pre>");
?>



this will give us some information about the recordset to help troubleshoot why it is not working.



also, change the code for the option:

php:
<option value="<?php echo $row_rsPROVINCE['ProvAbbrev']?>"<?php if (!(strcmp($row_rsPROVINCE['ProvAbbrev'], $row_rsUSERNAME['DealerProv']))) {echo "selected=\"selected\"";} ?>><?php echo $row_rsPROVINCE['ProvName']?></option>



to:

php:
<option value="<?php echo $row_rsPROVINCE['ProvAbbrev']?>"<?php if (!(strcmp($row_rsPROVINCE['ProvAbbrev'], $row_rsUSERNAME['DealerProv']))) {echo "selected=\"selected\"";} ?>><?php echo $row_rsPROVINCE['ProvName']?>||User:<?php echo $row_rsUSERNAME['DealerProv']?>||Abbr:<?php echo $row_rsPROVINCE['ProvAbbrev']?></option>




this will show the rsUSERNAME['DealerProv'] value and rsPROVINCE['ProvAbbrev'] value in the select list next to the providence name

Sign in to reply to this post

rgolab68503

Updates

So I added the code you had indicated. In the drop down and all the options are there as you have expected: ex. British Columbia ||User:BC |Abbr:BC

On the right side of the page this code shows up. (note I changed my password so that is it not posted online.)

SQL :SELECT * FROM entry WHERE Password = 'Changed so my password is not noted online' AND Name = 'ron'
TotalRows 1

array(9) {
["user_name"]=>
string(3) "ron"
["pass_word"]=>
string(8) "Changed so my password is not noted online"
["MM_Username"]=>
string(3) "ron"
["MM_UserGroup"]=>
string(0) ""
["DealerNumber"]=>
string(5) "11860"
["passwordnew"]=>
string(8) "toyocana"
["WADbSearch1_Results"]=>
string(29) " AND ((ItemCatID LIKE '%2%'))"
["ToyoeCart_Items"]=>
string(157) "8|WAECART|BFEXAS|WAECART|Extensa AS|WAECART|BFEXAS.jpg|WAECART|0|WAECART|1|WAECART|0|WAECART|100|WAECART|Extensa AS |WAECART|0|WAECART|0|WAECART|1 BFEXAS (8)"
["WAEC_ContinueRedirect"]=>
string(32) "/support/POP/Detail.php?ItemID=8"
}

Now I know the Province Abreviation is transfering because I can drop :
<?php echo $row_rsUSERNAME['DealerProv']; ?>
anywhere on teh page and it shows up. For some reason on my browsers the drop down does not see it.

Further to this I have vied the site on two other computers now and it works fine on them. This does mean that the error could show up on other computers but why would it work on those computers and not on mine where the file is created? We are all using IE8 with the exception of my computer also having Firefox.

Sign in to reply to this post

Jason ByrnesWebAssist

the results you have posted here, are those from a computer where this list is or is not working correctly?

I need to see the results from a computer where you are experiencing the problem.


the recordset that returns the logged in users province relies on session variables. It may be that the computer where you are having the problem has cookies turned off, or is refusing to set the cookie for your domain.

Try clearing all cookies and double check that the browser has cookies enabled.

Sign in to reply to this post

rgolab68503

Dynamic menu

No this is from the computer where the dynamic drop down is NOT working.

Sign in to reply to this post

Jason ByrnesWebAssist

did you read and try the rest of my reply?

the recordset that returns the logged in users province relies on session variables. It may be that the computer where you are having the problem has cookies turned off, or is refusing to set the cookie for your domain.

Try clearing all cookies and double check that the browser has cookies enabled.

Sign in to reply to this post

rgolab68503

Cookies

Sorry I should have been a little clearer; Yes, I did clear cookies and check if the browser accepts cookies. The entire support site works with cookies and hasn't had issues before and as mentioned the dynamic menus on the same computer and browser. I even tried lowering the security setting to low to allow all cookies etc. with no positive results. I tried deleting the current drop down and inserting a new one. As far as I can tell there should be no problem with cookies.

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post

rgolab68503

Dynamic drop down

Any idea when I will get a call on this?

Sign in to reply to this post

Jason ByrnesWebAssist

I will try calling tomorrow regarding this issue.

Sign in to reply to this post
loading

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