Updating Item Prices and Grand Totals on the fly

Results 1 to 2 of 2

Thread: Updating Item Prices and Grand Totals on the fly

  1. #1
    Join Date
    Dec 1969

    Default Updating Item Prices and Grand Totals on the fly

    Hi Folks.. I am writing an application that allows the users to select optional features for an item. <BR><BR>what happens is after the user enters the infomation to get the selected Part. in My case its a Mechanical Seal it goes to another page that displays all the available options for that seal.. the user can pick multiple items off it. those items end up getting saved into a SQL table tied to the user Quote. then the the user then sees a quotation page that displays the seal with all their selected options what I need to do is theres a form field on the quotation page that allows the user to change the quantity of each optional feature. and when the user changes it the item price for that feature changes automatically as well as the grand total. I know I will have to use an array because the number of features will be different for each quote. and I will have to use JavaScript to do the On Change events to cause the prices to update automatically. I was wondering if anyone had an efficient approach to this problem or can guide me in the right direction. <BR><BR>Thanks in advance<BR><BR>Dean Forant

  2. #2
    Join Date
    Dec 1969

    Default Pretty Involved Question....

    and there are several ways you can do this; personal preference. The way I would do this is:<BR><BR>1) In your table that stores the selected options, also have a quantity field.<BR><BR>When you display the quotation page that allows the user to modify quantities, simply loop thru this table.<BR><BR>Each Row or Block (eg: Unique Option) that gets written will contain a single form. When a quantity is changed and a submit button is pushed, posts back to self sending an Identifier (primary key) of options table and the quantity is updated.<BR><BR>As you are looping, you are taking selected Option * Quantity and adding this to your running total.<BR><BR>Basically you are making a shopping cart interface, yes?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts