VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: saviB on November 19, 2013, 18:17:06 PM

Title: Weight Calculation / Total in Cart or Checkout
Post by: saviB on November 19, 2013, 18:17:06 PM
VM 2.0.24

I've read a few posts that deal with this, but I have not found a definitive solution or answer.

1. I can display individual product weight in cart with:
<td align="left"><?php  echo $prow->product_weight ?></td>

2. I need to have weight subtotal in cart, as calculated by quantity.

3. I need to have a per order weight total.
http://fairpricestudio.com/vm_images/weight_cart.jpg

4. I need to add weight to product custom fields.
http://fairpricestudio.com/vm_images/custom_fields.jpg

I've read through:
https://forum.virtuemart.net/index.php?topic=115921.0
But I don't want to create product children when just adding weight to product custom fields seems so easy.

http://forum.virtuemart.net/index.php?topic=115233.0
But this seems to be already out of date as my cart.php doesn't contain $cart = VirtueMartCart::getCart(false);

In my cart.php I DO find:

         //** @todo WEIGHT CALCULATION
         //$weight_subtotal = vmShipmentMethod::get_weight($product["virtuemart_product_id"]) * $product->quantity'];
         //$weight_total += $weight_subtotal;

So - is this something that is stuck in the TO DO list? Is the a definitive answer on how to make this work - including which files/lines to modify?
Title: Re: Weight Calculation / Total in Cart or Checkout
Post by: servlet on February 07, 2015, 14:18:19 PM
Is there a solution to add weight to custom field?
I need it too...
Title: Re: Weight Calculation / Total in Cart or Checkout
Post by: GJC Web Design on February 07, 2015, 14:35:44 PM
this is over a year old with version VM 2.0.24

have u checked the latest?  afaik there is a public function now to get the cart weight (see ship plugin)
Title: Re: Weight Calculation / Total in Cart or Checkout
Post by: servlet on February 07, 2015, 14:42:37 PM
No I didnt check latest version. I am using 2.6.14 which is form 2 months ago.
Title: Re: Weight Calculation / Total in Cart or Checkout
Post by: servlet on February 18, 2015, 10:47:25 AM
I checked latest version for J!3.x. There is no such option. May be it is possible to implement it via additional coding, but I am not a web developer.
I think this function is "must have" for professional e-shops. It will be nice if we know real weight of product + custom field (maybe for both: stockable non nonstockable variant)

By the way, in latest version I cant find stockable variant plugin.

Regards