• Resolved phixate

    (@phixate)


    Hi codepeople! Is it possible to have the price submitted to WooCommerce by a CFForm be conditional? In other words can I let the user choose:

    “Buy it now” for the calculated retail price to be passed into WooCommerce
    -or-
    “Rent to own” for the retail price + interest to be passed into WooCommerce?

    If this is complicated or requires custom code I am happy to pay you for it. Thanks!

    Here is the form I am currently working with: https://whittsroofing.com/gazebos/index.php/8×8-octagon-gazebo-with-rto/

    • This topic was modified 6 years, 7 months ago by phixate.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @phixate,

    If you want to use the shopping cart, checkout page, and payment gateways of WooCommerce, you should associate the form to a WooCommerce product using the “CFF-WooCommerce” add-on distributed with the Developer and Platinum versions of the plugin. Furthermore, associating the form to a WooCommerce product the “Add To Cart” button would be inserted by WooCommerce and not by our plugin (and it would be an unique button).

    Now there are two calculated fields in your form to calculate the different prices, the fieldname1 field for “Total Retail”, and the fieldname13 for “Monthly”

    First, insert a radio button field (that I’ll call fieldname123) with two choices: for total retail and for monthly payment, with the choices’ values: 1 and 2 respectively.

    Second, insert a new calculated field, configured as hidden, whose equation would be:

    IF(fieldname123 == 1, fieldname1, fieldname13)

    Finally, select this new calculated field through the “Request Cost” attribute in the form’s settings.

    Best regards.

    Thread Starter phixate

    (@phixate)

    Awesome! I knew it would be easy and I was already starting to toy with a checkbox option. Thank you so much for your help!

    Plugin Author codepeople

    (@codepeople)

    Hello @phixate,

    A checkbox field allows the user select multiple options at once, the correct control here would be a radio buttons field, and it should be configured as a required field.

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conditional price in WooCommerce’ is closed to new replies.