close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

DataAssist Multi-Image Product Help

Thread began 1/08/2013 4:10 am by Kumel | Last modified 1/09/2013 9:06 am by Jason Byrnes | 1286 views | 6 replies |

Kumel

DataAssist Multi-Image Product Help

I need help in creating multi-image product page (DETAIL PAGE) of dataassist wizard....

So now in insert record page there is no option for inserting multi imgs. there is currently only 1 field at insert page for Image upload field.. & in detail page there are totally 5images. 1 is main image & other 4 are sub image kinda..
So for multi image how we do it?

Suppose if i need to upload 3 or more images in a single recordset how to we do that?

Attached Files
img.zip
Sign in to reply to this post

Kumel

i looked at this video : insert_multiple_final.swf

I applied for the Img field which i created on my insert page..
i applied repeat selection & also multiple record insert.. but then the images are not actually uploading into the mysql & database.


my insert page form looks like this:

<form action="Prop_Insert.php" method="post" enctype="multipart/form-data" name="WADAInsertForm" id="WADAInsertForm">
<div class="WADAHeader">Insert Record</div>
<table class="WADADataTable" cellpadding="0" cellspacing="0" border="0">
<tr>
<th class="WADADataTableHeader">Category:</th>
<td class="WADADataTableCell"><input type="text" name="ItemCatID" id="ItemCatID" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Property Name:</th>
<td class="WADADataTableCell"><input type="text" name="ItemName" id="ItemName" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Property Short Description:</th>
<td class="WADADataTableCell"><input type="text" name="ItemShortDesc" id="ItemShortDesc" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Property Long Description:</th>
<td class="WADADataTableCell"><input type="text" name="ItemLongDesc" id="ItemLongDesc" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Price:</th>
<td class="WADADataTableCell"><input type="text" name="ItemPrice" id="ItemPrice" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Builder Thumb:</th>
<td class="WADADataTableCell"><label>
<input type="file" name="ItemThumb" id="ItemThumb" />
</label></td>
</tr>
<tr><br />
<?php
// RepeatSelectionCounter_1 Begin Loop
$RepeatSelectionCounter_1_IterationsRemaining = $RepeatSelectionCounter_1_Iterations;
while($RepeatSelectionCounter_1_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_1 || $row_None){
?>
<th class="WADADataTableHeader">Property Image:</th>
<td class="WADADataTableCell"><label>
<input type="file" name="ItemImage_<?php echo $RepeatSelectionCounter_1; ?>" id="ItemImage_<?php echo $RepeatSelectionCounter_1; ?>" />
</label></td>
<?php
} // RepeatSelectionCounter_1 Begin Alternate Content
else{
?>
<?php } // RepeatSelectionCounter_1 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
if(!$row_None && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining = 0;}
$row_None = mysql_fetch_assoc($None);
}
$RepeatSelectionCounter_1++;
} // RepeatSelectionCounter_1 End Loop
?>
<br />
</tr>
</table>
<div class="WADAButtonRow">
<table class="WADADataNavButtons" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="WADADataNavButtonCell" nowrap="nowrap"><input type="image" name="Insert" id="Insert" value="Insert" alt="Insert" src="WA_DataAssist/images/Pacifica/Modular_insert.gif" /></td>
<td class="WADADataNavButtonCell" nowrap="nowrap"><a href="Prop_Results.php" title="Cancel"><img border="0" name="Cancel" id="Cancel" alt="Cancel" src="WA_DataAssist/images/Pacifica/Modular_cancel.gif" /></a></td>
</tr>
</table>
<input name="WADAInsertRecordID" type="hidden" id="WADAInsertRecordID" value="" />
</div>
</form>


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

and INSERT MUTLIPLE RECORDS LOOKS LIKE THIS ->


<?php
// WA DataAssist Multiple Inserts
if (isset($_POST["Insert_x"])) // Trigger
{
if (!session_id()) session_start();
$WA_loopedFields = array("");
$WA_connection = $Connection_1;
$WA_table = "items";
$WA_redirectURL = "Prop_Detail.php";
if (function_exists("rel2abs")) $WA_redirectURL = $WA_redirectURL?rel2abs($WA_redirectURL,dirname(__FILE__)):"";
$WA_keepQueryString = false;
$WA_fieldNamesStr = "ItemImage";
$WA_columnTypesStr = "',none,''";
$WA_insertIfNotBlank = "ItemImage";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_Connection_1;
$WA_multipleInsertCounter = 0;
mysql_select_db($WA_connectionDB, $WA_connection);
while (WA_AB_checkMultiInsertLoopedFieldsExist($WA_loopedFields, $WA_multipleInsertCounter)) {
if ($WA_insertIfNotBlank == "" || WA_AB_checkLoopedFieldsNotBlank(array($WA_insertIfNotBlank), $WA_multipleInsertCounter)) {
$WA_fieldValuesStr = "".$WA_DFP_UploadStatus["WA_UploadResult2"]["serverFileName"] ."";
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$insertParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
$WA_Sql = "INSERT INTO `" . $WA_table . "` (" . $insertParamsObj->WA_tableValues . ") VALUES (" . $insertParamsObj->WA_dbValues . ")";
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
}
$WA_multipleInsertCounter++;
}
if ($WA_redirectURL != "") {
if ($WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos($WA_redirectURL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
header("Location: ".$WA_redirectURL);
}
}
?>

Sign in to reply to this post

Jason ByrnesWebAssist

No, this is not done using multiple insert.

you need to have a column in the table for each image.

on the insert page, add a file filed for each image you wish to upload, and an upload file behavior for each file field.

in the insert record behavior, bind each image column to the corresponding upload -> Server File Name binding.

Sign in to reply to this post

Kumel

ok...
So now how can we change URL in the dynamic detail page..
example: now i have opened a detail page where the url is Item_Detail.php?ItemID=34

so every different item got different ids and it displays there..
so how can we just show the product name for each of the item page..?

Sign in to reply to this post

Jason ByrnesWebAssist

Use the ItemID URL variable to filter the recordset on the detail page.

Sign in to reply to this post

Kumel

how exactly do that do that? do i need to create new recordset or edit using the existing 1 in detail page?

i have attached all required file.

Attached Files
filez.zip
Sign in to reply to this post

Jason ByrnesWebAssist

edit the existing recordset.

in the filtering section, select the ItemID column and set it to use a URL variable named ItemID.

if you need further help with using the filtering section in the recordset dialog, click the help button.

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