Home › Forums › Quform WordPress › Woocommerce price
- This topic has 15 replies, 2 voices, and was last updated 7 years, 9 months ago by Ally.
- AuthorPosts
- March 30, 2016 at 6:13 am #18558NitratParticipant
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.
March 30, 2016 at 1:45 pm #18566AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
March 31, 2016 at 6:02 am #18568NitratParticipantThanks, but can’t we just add code into this method? ->
- This reply was modified 8 years, 1 month ago by Nitrat.
April 1, 2016 at 9:56 am #18574AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 1, 2016 at 10:04 am #18575NitratParticipantHi
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.April 1, 2016 at 11:04 am #18578AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 1, 2016 at 11:23 am #18579NitratParticipantI 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/April 1, 2016 at 11:45 am #18580AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 1, 2016 at 11:46 am #18581NitratParticipantI did so – the same result
Now I send the code by emailApril 1, 2016 at 1:19 pm #18584NitratParticipantIncidentally, the price of the product by default is equal to 2. If it somehow help
April 4, 2016 at 6:09 am #18596NitratParticipantOr rather two products with zero cost, but a final price is right, see screenshot
Attachments:
You must be logged in to view attached files.April 5, 2016 at 10:26 am #18603AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 5, 2016 at 10:55 am #18608NitratParticipantHi!
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.April 5, 2016 at 6:15 pm #18624AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
July 19, 2016 at 11:16 am #19550NitratParticipantHi 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’);
- AuthorPosts
- You must be logged in to reply to this topic.