Get weight from product.
-
Hi!
We have a website which shipping is calculated on the weight of the order. The products can be bought by hektograms or by boxes. I used the Calculated field forms to have a checkbox if they want to buy in hekto or with boxes. A slider appears when you choose to buy via hekto and you choose the amount. The price is depending on how much and the specified hekto-price and when you choose to buy boxes, it uses the price that is determined by the product.
The weight on the products is based on the hekto field in the form. But when you choose to buy a box, it should use the weight that is filled in when the product was created in Woocommerce.
Is there a way to use the original box-weight if you choose to buy boxes and use the hekto-weight if you choose to buy by hekto? Similar to how we did for the price:
(function() { if (fieldname2 == 1) { return PREC(fieldname1 * 7.9, 2); } if (fieldname2 == 0) { return jQuery('#woocommerce_cpcff_product_price').val(); } })()
Thanks in advance!
The page I need help with: [log in to see the link]
- The topic ‘Get weight from product.’ is closed to new replies.