Support » Plugin: WooCommerce » Price based on width and height entered by customer

  • Resolved Dave Dean

    (@deaner666)


    Hello there. I have a problem that I thought would be solved by the measurement price calculator extension, but that extension doesn’t do what I expected at all! (I wonder if I’m the only person to think that?)

    I’m creating a site that sells banners and other printed products at custom sizes. The customer needs to be able to enter a width and a height and have a price generated that is an area calculation based on that width and height.

    The measurement price calculator ties this calculation into the quantity for some reason (ie. it works out how many of a product to order based on the given dimensions), I can’t image many people wanting to use it like that, but I might be wrong.

    I need a customer to choose, say, a 2m x 1m banner, have a price displayed that’s calculated from a per square metre price, and then be able to update the quantity to decide how many of those 2m x 1m banners they want.

    Can I do this in any of the following ways:

    * With the measurement price calculator extension
    * With a “width” and “height” attribute
    * In some other way I haven’t thought of?

    Cheers,

    Dave

    http://wordpress.org/extend/plugins/woocommerce/

Viewing 15 replies - 1 through 15 (of 51 total)
  • Bump…

    I’m desperately in need of this! Anybody got any ideas?

    ogdesign

    (@ogdesign)

    Hi Deaner666! I see it’s been 2 month since your post, and you probably solved your problem already. But just in case, the Measurement Price Calculator can be set up for what you need. You just have to tick “Pricing” option in the Measurement tab. Feel in Pricing Lable if you need and the Pricing unit and you good to go. Good luck!

    Dave Dean

    (@deaner666)

    Hi ogdesign,

    Thanks for the reply. I think perhaps the measurement price calculator has been updated since I last tried it. I’ve just checked out the new demos from the woothemes extension page and it does seem to do more things than it used to.

    I managed to solve my particular situation using gravity forms and the gravity forms product add on extensions. I was able to use calculation fields to work out areas and prices. Gravity forms has the added bonus of allowing you to add other fields, like file upload fields which I needed for customers to upload their artwork. You can also use conditional logic in the forms to only show certain fields when they’re required.

    Cheers,

    Dave

    Hi deaner666,

    I am having the same need that you had with a price generated from the user inputed area. I too am using gravity forms and the gravity forms product add on extensions. I am currently stuck with multiplying the area by the product total. How were you able to work that out?

    Thanks,

    Jaffy

    Hi jescarcha,

    You can see an example page showing what I’ve done here:

    http://www.print-2-media.com/shop/banners/pvc-banner-510gsm-single-sided/

    If you need more of an explanation of how it works then let me know.

    Cheers,

    Dave

    Hey Deaner666,

    Your site has the same functionality that I need!

    Two things:

    I see that you have the product options changing the subtotal. Is there a setting that I missed?

    How were you able to have the height and width change the subtotal and total?

    The latter is something that I have been struggling with for quite a while. Did you have to dig through and change code? You help is very much appreciated!

    Thanks,

    Jaffy

    It took me a while, but I managed to do it all using in-built Gravity Forms functionality. Calculation fields are the key to the puzzle.

    You need to start with a product field for the base price which I just set to £0.00.

    Then create your option fields (like Finish in my example).

    Then create your number input fields (Height and Width).

    Then create calculation fields for all the different combinations of options. I called the calculation fields “Sub Total”. Use conditional logic on the calculation field so it only shows when the relevant option is selected.

    The actual calculation that goes into the calculation field is the Height field * the Width field * the price of the selected option.

    You finally need a total field to generate the final price.

    I hope that makes sense!

    Cheers,

    Dave

    Thanks for your explanation.

    My calculations run as described using your method but the option total gets added to the total again. Did you run into this issue?

    Thanks

    I’m not entirely sure what you mean, but I’ve just had a quick look and in the Gravity Forms Product Add-ons section in the product, underneath “Total Calculations” I’ve got Disable Sub-Total checked, Disable Options Label checked and Disable Total Label UNchecked.

    Not sure if any of that will make a difference?

    Let’s say that my options totaled to $140:

    When i perform the “Sub Total” calculations it equals to $1120

    However, the total gets displayed as $1272.
    The problem as I see it is that my options total AND my base price is getting added to the total.
    $1120 + $140 + $12 (base price) = $1272

    Hopefully that clears up my problem.

    I still don’t follow I’m afraid. Are you using the area calculation as well? I think I’d need to see the form to understand fully what you’re doing.

    The only think I would say is that my base price was £0.00.

    What did you set your regular price as in the woocommerce product page?

    Regular price was also £0.00.

    I appreciate all of the assistance that you have provided me Deaner666. I am just one step away from having this solution work.

    https://fbcdn-sphotos-d-a.akamaihd.net/hphotos-ak-ash3/q71/945623_10201193729580418_801895647_n.jpg

    This link shows the issue that I mentioned earlier. For some reason my Sub Total calculations field and my Totals field are not the same. In the specific screenshot above, it seems that the amount in the option total (Basswood / Filler Option Total) is getting added to the Sub Total which gives me the price in the Total.

    What version of gravity forms product add ons are you using? Is there a setting that I am missing?

    Are you using the total provided by woocommerce or the total provided by Gravity Forms? Although you have to have a Total field at the end of your form, I’ve set the CSS class name in the advanced tab for that field to “hidden-total”, which hides it from the user. So the user isn’t ever seeing the Gravity Forms total, only the one from Woocommerce.

    Not sure if this will make the difference, but might be worth a try.

    Can you show me exactly what’s in the sub total calculation fields?

Viewing 15 replies - 1 through 15 (of 51 total)
  • The topic ‘Price based on width and height entered by customer’ is closed to new replies.