I want to display the weight without decimals in the shipping estimator en on the checkout page in the shippingoption. I use table / weight for the shipping way.
Hope someone can help which files I have to modify.
Thanks in advance!
I want to display the weight without decimals in the shipping estimator en on the checkout page in the shippingoption. I use table / weight for the shipping way.
Hope someone can help which files I have to modify.
Thanks in advance!
I found a convenient "starting point" to use the developers tool kit found in the admin->tools section to be a bit helpful, though I hadn't chased down to the exact location to make the change that seems to be asked about.
Anyways, searching on $products_weight gave some useful information. There currently doesn't appear to be any rounding or truncation done store side for the weight. So depending on your goal (affect display or calculation) you might be able to add a rounding operation to display 0 decimals if that is your goal.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Thanks for your reply, mc12345678. I've searched everywhere and tried so many changes only to make them undone cause it does not give the wanted effect.
I managed to change the weight decimals in product info page, product_listing page and and the show totals line above the shoppingcart with help of showthread.php?80092-Decimal-places-in-shipping-weight.
In the developers tool I searched for the appropiate files using every possible word which can lead me to the files where I can change the decimals for weight in the shipping estimator and shipping option without succes.
All I want is that it displays as 17 gram instead of 17,00 gram.
Any hint in the right direction is very welcome!
Last edited by jolion; 18 Nov 2017 at 12:24 PM.
Not sure which files you have edited, so I'm going to point out a few that relate to display of the shipping_weight as found when working through the files associated with the shopping_cart page. The shopping_cart page is typically where the shipping estimator is first displayed.
includes/modules/YOUR_TEMPLATE/shipping_info.php ($totalsDisplay)
includes/modules/page/shopping_cart/header_php.php ($totalsDisplay)
Does that address the areas in question?
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
The first file I can't find it, even in the original installation files I can't find it. Maybe you mean shipping_estimator.php?
If so, I have modified this one, without succes. But it is possible that I modified it in the wrong way. Help with that is also very welcome
The second one I have already modified with succes except for the shipping estimator and payment options in checkout.
Bookmarks