close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

storing product options in an order history table

Thread began 4/05/2012 2:46 am by Christopher West | Last modified 4/05/2012 12:30 pm by Christopher West | 470 views | 3 replies

Christopher WestCommunity Expert

storing product options in an order history table

Hi I have a range of product options (due to complexity of them, I had to create them as an array) (the product options are made up as a series of text fields, checkboxes and select lists).

How would I go about storing these in an order history table? I have read a little on the php command "serialize" would it be best to use this method to pass the array into a database?

since there are many different product options relating to a single product I was assuming that I would need 3 tables:
1. order summary
2. orders
3. orderProductOptions

then then "orderProductOptions would have a field that stores the ID from order summary table. Would that make sense?

currently on my cart.php I am displaying the options by this code:

<?php
$options = $DinkyCart->DisplayInfo("Options");
$optionArray = explode("<br>",$options);
$optionInfo = array();
for ($x=0; $x<sizeof($optionArray)-1; $x++) {
$optionInfo[] = explode("**",$optionArray[$x]);
}
?>

-----------------------------------------------------------

<tr>
<td valign="top"><p><strong>Options</strong></p>
<p>
<?php
for ($y=0; $y<sizeof($optionInfo); $y++) {
?>

<?php echo($optionInfo[$y][0]); ?>
<br>
<?php
}
?>
</p>
td>

<td align="right" valign="top">
<?php
for ($y=0; $y<sizeof($optionInfo); $y++) {
?>

£<?php echo(number_format($optionInfo[$y][1],2)); ?>
<br>
<?php
}
?>
</p></td></tr>

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