Advanced Search

Results 1 to 10 of 10

Thread: Help Needed for Newbie for Price Quote Issue

  1. #1
    Join Date
    Feb 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help Needed for Newbie for Price Quote Issue

    Hi Everyone,
    I am new to this forum, and it looks like the most interesting place to ask this question. I am trying to come up with an easy instant price quote calculator in javascript for a blinds website i am creating like this one here;
    http://www.blindsuk.net/

    it would be a simple one with only 3 - 4 fields. Basically it would be imput of width and length measurements to get a price based upon the measurements typed in.


    such as;
    1) Width in mm
    2) length
    3 ) price
    4) button to calculate total

    Does anyone know of such a script that i could use or simplify to accomodate these actions?

    Thanks

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,624
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    it depends entirely on how the price is calculated, and that is something we can't answer. Is it priced per linear foot? square foot? are there per piece charges? without that information, there's no way we can help.

    computer scripts understand math really well, so if you know the formula needed to find the price, you can certainly write a script that can do it too.
    We Only Torture the Folks We Don't Like (You're Probably Gonna Be Okay)
    It's a Party in the CIA

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,154
    Thanks
    261
    Thanked 690 Times in 678 Posts

    Default

    In fact, if you can just post the formula in the most formal way possible, we can probably easily help. However, try to avoid any specific terms for your field in case they might not be known to us.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #4
    Join Date
    Feb 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks very much for your imput, the price is calculated solely by set measuremenst for example

    Width and length = price
    So i guess i would have to add in the varying widths lengths and get the set price for this quote is this correct?

    As a example:
    Width is 1220mm and selected length is 1370mm then the price is set to come out then at £19.92

    This would be the type of script i am looking to create and add the varying 3 major imputs in to get the final price.

  5. #5
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,624
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    what does "and" mean in your calculation? do you mean:

    width plus length

    width multiplied by length

    width multiplied by length multiplied by a price factor

    ...?

    from your example, I don't see how you got your price. Can you show the actual math involved?
    We Only Torture the Folks We Don't Like (You're Probably Gonna Be Okay)
    It's a Party in the CIA

  6. #6
    Join Date
    Feb 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for trying to help and i may of not made it clear enough with being not so much of a pro coder or similar.

    I have a set number of preset figures of widths lengths and prices to be placed into a script and anything placed in by the client would come out to the next nearest width and length, if not exact measurements as i have set.

    As an example

    Client types in box his width and length desired to get his price
    Width.... is set at 48"
    Length..... is set at 66"

    Price comes out at a set £24

    The price set for these figures would have to come out at the set price of £24

    If client typed in width of 46" and length of 62" the price would have to come out to the next nearest figure which in this example above is £24

  7. #7
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,154
    Thanks
    261
    Thanked 690 Times in 678 Posts

    Default

    That's still not a mathematical formula. Are you saying that there is no math in this? You just make a list (1x2=7, 4x5=20, ...) and then you want the computer to figure out based on the available dimensions which one is closest to what the user input?
    The logic on that is the following:
    Find the smallest item in the list with height and width both greater than or equal to the input.

    Is that correct?
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  8. #8
    Join Date
    Feb 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi djr,
    Thanks for your reply with my query.
    There wouild be maths involved yes in the equation.
    for instance there would have to be laid out sets of dimensions such as:

    in the width there would have to be a variable from 915mm to 3200mm
    and the length would have to be variable again from 600mm to 2900mm

    So those would be the parameters and when a client places in their measuremenst they would then a get a price output.

    The last equation is getting the price from a set rule of 15 price variables.

    Hope this clarifies what i am trying to accomplish and why i need some advise.

  9. #9
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,154
    Thanks
    261
    Thanked 690 Times in 678 Posts

    Default

    I think that makes sense now. What language do you want to use? Javascript will operate within the user's browser and is in some ways a little easier to setup than other methods, but it requires that Javascript is available (enabled, compatible) in the user's browser. A method using a serverside language like PHP is more reliable, slightly harder to setup (since it requires PHP on the server, etc), and would require reloading the page to process the form.

    But PHP (or another serverside language) will be required if you intend to make this functional beyond a quote-- if you want this to be added to a shopping cart, for example.


    The basic steps will be this:
    1. Create an array with three items in each index: width, height, price.
    2. From the user's input, find a price such that its height and width are greater than or equal to the user's input.
    3. Display that price for the user.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  10. #10
    Join Date
    Feb 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you ever so much as this makes it so clear thanks again

Bookmarks

Posting Permissions

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