• Im looking for a bit of advice or direction here,

    Im looking to make a site for my brother who is specialist flooring expert who can supply fit and repair floors. What i’m after doing is creating a restoration site for him which explains how he resorted and repairs old wood floors and preserves them. this part is straight forward enough etc, the wall i’m hitting and getting stuck on is an online quote / booking system which could have a payment (paypal option)

    This service is fairly straight forward as my brother charges a set price per square meter, so what i’m trying to do is create a form where the customer can enter the width and length of there room, and get a quote, then send a booking email to my brother with the same information for my brother to contact them and arrange the appointment to go round, inspect and perform the job.

    The next problem is what if the customer has more than one room?? is there a way of adding a room 2 room 3 etc etc etc if required.

    We have also though about taking an online deposit via paypal for say 10%, we would not be able to take the full amount as the customer may enter the wrong size trying to get a cheaper job done, or over changed by not measuring correctly. Deposit first and final payment on completion would be better if possible.

    Could anyone please point me in the right direction please. Thank you

Viewing 8 replies - 16 through 23 (of 23 total)
  • Moderator bcworkz

    (@bcworkz)

    Sure, the price calculation on the estimate form just gets a bit more complicated. Something like this (in pseudocode) after the room loop completes:

    if(area<=100) price=cost1*area;
       else price=(cost1*100)+(cost2*(area-100));

    In your sample code above you are keeping a running total of the cost for each room in the loop. For tiered pricing, only keep a running total of the room areas and apply the tier pricing only after the total area is determined.

    Thread Starter kitcorsa

    (@kitcorsa)

    https://jsfiddle.net/aAfQp/12/

    think i got it working ??

    Moderator bcworkz

    (@bcworkz)

    Looks good! Except for one thing. If anyone should put in a fractional dimension, such as 3.5m x 4m room, there is a chance the total area could fall between 100 and 101, causing the code execution to fall through the estimate calculation and result in no estimate.

    Use the following for the if() criteria: area<=100, area>100

    Thread Starter kitcorsa

    (@kitcorsa)

    thanks for that and well spotted!

    You know if there are any size calculation scripts out there, as i need the sizes in meters but people miught come with feet and inches, thinking a nice side widget or page with a conversion or something on it might help

    Moderator bcworkz

    (@bcworkz)

    There probably are, but I don’t personally know of any. A converter to change ft-in to meters is simple enough, but I think it’s a bit rude to ask people to enter data twice, once in the converter, then again into the area calculator. Also more prone to error.

    Better to allow either units directly on the form. On the simplest level, there could be a units dropdown and if “feet” is selected, internally multiply all input by 0.3048. It gets more complicated if inches are involved, it’s probably best to have a “ft-in” pick and when selected add an extra field with javascript to contain the inch portion. Otherwise there will be ambiguity. Is “3.5” really 3′-6″ or did they mean 3′-5″? Plus your script will need to correctly parse the various characters used to denote units. Best to have a separate, unambiguous inch field.

    Do what you like of course, just my 2 cents worth.

    Thread Starter kitcorsa

    (@kitcorsa)

    I found a problem, i just found that the script fails with decimal sizes ie 1.5m x 1.5m…

    the maths works out etc but when you click the send book it comes up with a popup invalid value… dont know why.

    Thread Starter kitcorsa

    (@kitcorsa)

    think i fixed it…. inputtype=”number” don’t allow decimial in html5, need to add the step value as well and the type ie step=”any”

    Moderator bcworkz

    (@bcworkz)

    Step huh? Well you taught me something new. I need to spend more time catching up with HTML5. Glad you figured it out, it would have stumped me for a while as well!

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Direct Required – Flooring Site – E-commerce/booking’ is closed to new replies.