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

rating

Modification in Order

Thread began 9/08/2016 4:44 am by Kumel | Last modified 9/12/2016 1:18 pm by Ray Borduin | 225 views | 20 replies |

Kumel

Modification in Order

I created a sample complete store to order products.

So for admin he can view orders & edit status or so on.
The tables of order & orderdetails are same as what webassist provides.

So now if admin wants to modify the order by adding more products into the same order & change quantity & etc then how can we structure this?
Generally all orders will be modified.
So do i need to create another table or work with same orders & orderdetails tables.
How can this be achieved?

Sign in to reply to this post

Ray BorduinWebAssist

You can use the same table and create update pages.

Sign in to reply to this post

Kumel

I found a way to do it. make it open like order details & then create different forms
1 - for editing existing order details (done)
2- for adding more products into same orderdetails with OrderID (so i just added a 'dropdown list of products' & quantity textfield & button)
Problem is i m not able to had ProductPrice or DetailPrice & into the orderdetails. How can this be done.

Sign in to reply to this post

Ray BorduinWebAssist

Just add a recordset to the top of the page that filters by the submitted productID from the dropdown. Then you can use the fields from that recordset when inserting to get the rest of the necessary product information.

Sign in to reply to this post

Kumel

OMG!

That is one piece of master mind!

I was wondering whole day how it can be done. Thank you so much.

Sign in to reply to this post

Kumel

But how can Orders table be updated?

Do i need to create a formula on update page & recalculate things & update on Orders table?

Can a cart like subtotal, discouts, tax n total be added here so then it calculates all & updates the table.

Sign in to reply to this post

Ray BorduinWebAssist

Yes, you would have to also add an update server behavior for the orders table and then do the math to update the total amount appropriately.

You can probably do that with another recordset after the orderdetails update or insert but before the orders update that can get the totals in a SQL statement for reference in the orders update bindings.

Sign in to reply to this post

Kumel

Can a cart like subtotal, discouts, tax n total be added here so then it calculates all & updates the table.

I can do the math or general like

<?php
$productprice = $row_Produ...
$quantity = $Row_ProductQ.....

$TotalPrice = $productprice * $quantity;
?>



But in my case there are multiple products in repeat region.

Looks like this :

<tr>
<td><?php echo $row_OrderDetails['DetailName'];?> <?php if($row_OrderDetails['AdminAdded'] == 1) {?> * <?php }?>
</td>
<td>&#8377;<?php echo $row_OrderDetails['DetailPrice'];?></td>
<td><?php echo $row_OrderDetails['DetailQuantity'];?></td>
<td align="left">&#8377; <?php echo $row_OrderDetails['TotalPrice'];?></td>
</tr>
Sign in to reply to this post

Kumel

once after products are added i will display message to update the Orders table.

So that when all products are added they click on button which calculates & shows breakdown like how its present in cart.
ie

Subtotal
Discounts
SalesTax
Shipping charges
Total

Sign in to reply to this post

Ray BorduinWebAssist

That would work, or you can update it automatically without displaying them. The user experience you want to support is up to you.

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