Support » Plugin: Calculated Fields Form » Use value of WooCommerce product attribute

  • Resolved phixate

    (@phixate)


    Is it possible to get the value of a selected attribute in a dropdown from a WooCommerce product variation, perhaps with JavaScript? Maybe something like this, which didn’t work for me BTW (forgive my JavaScript noobness):

    function (){
       var value = document.getElementById("pa_length");  
       var getvalue = value.options[value.selectedIndex].value;
       return getvalue;
    }

    I would like to use this attribute in CFF to calculate additional options based on that value.

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @phixate

    If you install the “WooCommerce Products And Variations Prices for Calculated Fields Form” plugin (https://cff-bundles.dwbooster.com/product/woocommerce-price) you can use the woocommerce_cpcff_product_price variable with the equations, and every time you to select a variation the variable is updated and the related equations evaluated.

    Best regards.

    Thread Starter phixate

    (@phixate)

    Yes, and that’s great, but what I want to do is pull the value of an attribute from the selected variation into a field in CFF to calculate the price of another add-on option. If you look on the page I posted, I want the value of the “Length” field to be pulled into the “CFF calculated field below it”, and then multiply that by a dollar value.

    Plugin Author codepeople

    (@codepeople)

    Hello @phixate

    The URL provided response with a 403 ERROR, forbidden access.

    Best regards.

    Thread Starter phixate

    (@phixate)

    My apologies. I don’t have the site set up for public access right now. Let me try to explain what I want. I have a dropdown for the length of a trailer you want to buy. That length field is an attribute from WooCommerce. When you select the length you want I want a Calculated Field to multiply that by 3. That Calculated Field is for another option for the trailer (like adding a sliding track rail with straps, which is based on the length of the trailer).

    • This reply was modified 7 months ago by phixate.
    Thread Starter phixate

    (@phixate)

    Here’s the most concise way I can put it:

    Length in feet (user selects from a WooCommerce attribute dropdown): 30|35|40|45
    User selects 40.
    The value 40 is sent to a Calculated Fields Form to be used in a calculation for an add-on option. Example: Add Sliding track and straps ($3 per foot)

    Plugin Author codepeople

    (@codepeople)

    Hello @phixate

    I’m sorry, but I need to check your product’s page.

    You can contact me directly through my private website: Click Here

    Best regards.

    Thread Starter phixate

    (@phixate)

    Does this help?
    swartzfinance.com/cff.png

    My site’s SSL certificate needs to be renewed so you’ll have to click “show anyway”.

    Plugin Author codepeople

    (@codepeople)

    Hi!

    Thank you very much for sending me the screenshot. However, after checking it, I note you are using the Developer or Platinum versions of our plugin. We are not allowed to support any customers in these forums.

    For pro or commercial product support please contact us directly on our site. This includes any pre-sales topics as well.

    Commercial products are not supported in these forums. We will happily answer this and any other questions you can have on our own site.

    Thank you.

    Thread Starter phixate

    (@phixate)

    OK will do.

    Thread Starter phixate

    (@phixate)

    I did renew my support and then sent a request through your website but haven’t heard anything back.

    Plugin Author codepeople

    (@codepeople)

    Hello @phixate

    I’ve responded to every email received through the support service. If you don’t have received our email, please, check the spam folder.

    Best regards.

    Thread Starter phixate

    (@phixate)

    I checked the spam folder. There is nothing.

    Plugin Author codepeople

    (@codepeople)

    Hello @phixate

    Please contact me again via support service, and I will let you know via this forum once I reply to your email.

    Best regards.

    Plugin Author codepeople

    (@codepeople)

    I’ve responded to your email right now.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Use value of WooCommerce product attribute’ is closed to new replies.