How we can update the weight field value if the same product added two times in the cart. How we can update the weight value of the product?
For example-
If we add two same products in the cart, and then update the cart, the price field gets updated, same as if we want to update the weight field of the product, how we can do this?
Suppose-
Product 1 - Weight = 0.25
Product 1- Weight= 0.25
Total it should be - 0.5
Please, help me with this issue.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | screenshot20170112_103320408.png | 346.2 KB | zenimagine |
| #4 | screenshot20170112_103249967.png | 340.5 KB | zenimagine |
Comments
Comment #2
zenimagine commentedI have the same problem. Did you find a solution ?
Comment #3
joelpittetThis sounds like a support request, the quantity * weight should already work.
Are you saying this doesn't work, then maybe steps to reproduce would be helpful?
Comment #4
zenimagine commentedIf I add to the cart :
1 product of 0.15 kg and 1 product of 0.20 kg, the sum is well of 0.35 kg.
If I add to the cart :
1 product of 0.15 kg and 5 products of 0.20 kg, the sum is not corect is always displays 0.35 kg.
The quantity column does not work with this module.
See screenshots.
Comment #5
joelpittetThanks @zenimagine, screenshots are always helpful. How are you getting the value being grabbed to show on the cart in your screenshots at the top.
"Le poids de votre panier est de 0.35 kg", where does that come from?
Comment #6
zenimagine commentedI used a mathematical formula in the view.
My question is, how to display on the cart total weight of the order ?
For the calculation of the shipping costs it works but to display the total weight to my customers it does not work.
Comment #7
joelpittetYou need to multiply the (line item quantity * weight) in your formula.
Comment #8
zenimagine commentedThat's what I did.
Product1: 1kg; 3€; x2; Total 2kg
Product2: 1.5kg; 12€; x3; Total 4,5kg
With the formula I have the total weight of each product. My question is how to get the tatal weight of the order ? In my example ca should be 6.5kg
Comment #9
joelpittetDouble check the code you wrote, there may be something missing. Feel free to post the custom logic here
Comment #10
zenimagine commentedMy question is, how to display the total weight of a command in a block ?
I want my customers to see the weight of their order on the cart and shipping page.
With a view it is not possible.
http://drupal.stackexchange.com/questions/225621/can-not-aggregate-a-glo...
Comment #11
zenimagine commentedI got an answer here :
https://www.drupal.org/node/2844407#comment-11878345
How to create a token with the total weight of the current user's command ?
Comment #12
bojanz commented