close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

id showing instead of the size in cart in mysqli

Thread began 9/09/2015 1:20 pm by Dave W | Last modified 9/10/2015 4:17 pm by Ray Borduin | 79 views | 2 replies |

Dave W

id showing instead of the size in cart in mysqli

The problem is that my size dropdown is populated depening on the quantity available in the colours dropdown ( a MySQLi version of dynamic dropdowns) but, unlike the MySQL version (which passes the size instead of the sizeID) it passes the sizeID not the size and I can't figure out how to make it show the size and not the id in the cart.
I have looked at other answers to similar problems in the help section but they are all for MySQL.
I have attached both my final details page and cart page to see if that helps and also an image showing the problem.

Sign in to reply to this post

Ray BorduinWebAssist

Add a recordset to the page that does the Add to cart that is filtered by the submitted Size ID and returns the size and any other fields you want displayed in your cart.

Then you can either add another column to your cart for the Size name (if you still need the ID in the cart) or replace the binding in the Add to cart to get the size from the Recordset you created.

Sign in to reply to this post

Dave W

Sorry Ray,
A bit thick here, don't really understand what you mean.
Where do I get the sizeid from to filter the recordset?

Update;
Sorted it Ray the code I have for the record set is:
<?php
$getSizes = new WA_MySQLi_RS("getSizes",$dbCute,0);
$getSizes->setQuery("SELECT sizeID, item_size FROM sizes WHERE sizeID = ?");
$getSizes->bindParam("i", "".(isset($_POST['eCart1_1_Size_Add'])?$_POST['eCart1_1_Size_Add']:"") ."", "-1"); //colname
$getSizes->execute();
?>
The $_POST['eCart1_1_Size_Add'] is taken from the result of the colours recordset.

Thanks again for your help.

Sign in to reply to this post

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