Woocommerce price

Home Forums Quform WordPress Woocommerce price

This topic is: not resolved
Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #18558
    Nitrat
    Participant

    Hi, Ally!
    Is it possible using Quform to calculate and change the value of the selected product?

    • This topic was modified 8 years, 1 month ago by Nitrat.
    #18566
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #18568
    Nitrat
    Participant

    Thanks, but can’t we just add code into this method? ->

    Integrate WooCommerce in Quform

    • This reply was modified 8 years, 1 month ago by Nitrat.
    #18574
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #18575
    Nitrat
    Participant

    Hi
    I adapted Woocommerce for the sale of insurance policies. I need to determine the cost of the policy by changing two parameters – the period of insurance (1, 2 ,3 months etc) and the amount of insurance. For example: 3 months (0.4) * sum insured (100 000). The price of the policy should be changed to 40. That is, using the form I need to change the price of the item and then put it in the cart and checkout.

    #18578
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #18579
    Nitrat
    Participant

    I put in your code, but after entering in the cart there are two, one with a zero price, the other – with a completely incomprehensible.
    Look –
    http://liebkind.head-wind.ru/test/

    #18580
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #18581
    Nitrat
    Participant

    I did so – the same result
    Now I send the code by email

    #18584
    Nitrat
    Participant

    Incidentally, the price of the product by default is equal to 2. If it somehow help

    #18596
    Nitrat
    Participant

    Or rather two products with zero cost, but a final price is right, see screenshot

    Attachments:
    You must be logged in to view attached files.
    #18603
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #18608
    Nitrat
    Participant

    Hi!
    I just want to do everything without plugin Uni Cpo, I disabled it now. And there you are, see screenshot
    To cart to add another item at the original price = 2…

    Attachments:
    You must be logged in to view attached files.
    #18624
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #19550
    Nitrat
    Participant

    Hi Ally
    I have reduced the code to the following, but get a white screen:

    function my_add_policy_to_cart($form)
    {
    global $woocommerce;
    $productId = 432;

    $price = $form->getValue(‘iphorm_3_4’);

    $woocommerce->cart->add_to_cart($productId, 1, 0, array(), array(‘my_price’ => $price));
    }

    add_action(‘iphorm_post_process_3’, ‘my_add_policy_to_cart’);

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy