Magento 2 how convert package weight to Kilogram (KG) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Change weight based on custom optionUPS is not working for heavy weight productsWhat kind of weight does default UPS and USPS take in consideration?How to get the value of custom field checkout address in Carrier Model Magento 2Check if free shipping method is active programmatically in Magento 2How to add Magento shipping method extra details?Magento 2 - Dimensional Weight ConfusionHow to add shipping rate according to weight?How Can I Use the module-dhl programmatic to collect rates?Shipping rate calculation in Table rate Shipping method Magento 2
What was Apollo 13's "Little Jolt" after MECO?
Married in secret, can marital status in passport be changed at a later date?
Why I cannot instantiate a class whose constructor is private in a friend class?
What does the black goddess statue do and what is it?
Are these square matrices always diagonalisable?
What happened to Viserion in Season 7?
SQL Server placement of master database files vs resource database files
Will temporary Dex penalties prevent you from getting the benefits of the "Two Weapon Fighting" feat if your Dex score falls below the prerequisite?
Can gravitational waves pass through a black hole?
Test if all elements of a Foldable are the same
Raising a bilingual kid. When should we introduce the majority language?
How to keep bees out of canned beverages?
What is ls Largest Number Formed by only moving two sticks in 508?
RIP Packet Format
Why aren't road bicycle wheels tiny?
How to translate "red flag" into Spanish?
Is there a possibility to generate a list dynamically in Latex?
false 'Security alert' from Google - every login generates mails from 'no-reply@accounts.google.com'
What do you call an IPA symbol that lacks a name (e.g. ɲ)?
Was Objective-C really a hindrance to Apple software development?
Preserving file and folder permissions with rsync
Simulate round-robin tournament draw
Was there ever a LEGO store in Miami International Airport?
Is Bran literally the world's memory?
Magento 2 how convert package weight to Kilogram (KG)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Change weight based on custom optionUPS is not working for heavy weight productsWhat kind of weight does default UPS and USPS take in consideration?How to get the value of custom field checkout address in Carrier Model Magento 2Check if free shipping method is active programmatically in Magento 2How to add Magento shipping method extra details?Magento 2 - Dimensional Weight ConfusionHow to add shipping rate according to weight?How Can I Use the module-dhl programmatic to collect rates?Shipping rate calculation in Table rate Shipping method Magento 2
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have a custom shipping method in Magento 2, i successfully got the package weight by using this code in Model/Carrier.php :
$weight = $request->getPackageWeight();
but the default system measurement is not in KG or grams,is there any way to detect the type of measurement for package weight and convert it to KG?
magento-2.1 shipping-methods
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have a custom shipping method in Magento 2, i successfully got the package weight by using this code in Model/Carrier.php :
$weight = $request->getPackageWeight();
but the default system measurement is not in KG or grams,is there any way to detect the type of measurement for package weight and convert it to KG?
magento-2.1 shipping-methods
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have a custom shipping method in Magento 2, i successfully got the package weight by using this code in Model/Carrier.php :
$weight = $request->getPackageWeight();
but the default system measurement is not in KG or grams,is there any way to detect the type of measurement for package weight and convert it to KG?
magento-2.1 shipping-methods
I have a custom shipping method in Magento 2, i successfully got the package weight by using this code in Model/Carrier.php :
$weight = $request->getPackageWeight();
but the default system measurement is not in KG or grams,is there any way to detect the type of measurement for package weight and convert it to KG?
magento-2.1 shipping-methods
magento-2.1 shipping-methods
edited Jan 30 '17 at 6:46
simple guy
asked Jan 30 '17 at 6:36
simple guysimple guy
1,07921542
1,07921542
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
The weight unit is whatever is being used for shipping. You can sometimes control it in Stores> Configuration > Sales > Shipping Methods. For example UPS has a choice of Lbs or Kgs;
For custom shipping method you need to check UPS code,
add a comment |
By default the weight is abstract in Magento. It does not have a measuring unit. You can consider it what you want.
There are some shipping methods like UPS (as Yogesh mentioned ) where you can state the measuring unit, but this does not autodetect anything. You are just telling UPS that you use LBS or KG, but you still have to be careful at what you input in for the products.
If you have mixed units there is no out of the box way to determine which is which.
You may need to add an attribute for the products to determine the measuring unit, and then you need to change the method MagentoShippingModelShipping::composePackagesForCarrier
to take into account your measuring unit when retrieving the weight from a products. Convert everything to KG or what ever unit you need.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f156955%2fmagento-2-how-convert-package-weight-to-kilogram-kg%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The weight unit is whatever is being used for shipping. You can sometimes control it in Stores> Configuration > Sales > Shipping Methods. For example UPS has a choice of Lbs or Kgs;
For custom shipping method you need to check UPS code,
add a comment |
The weight unit is whatever is being used for shipping. You can sometimes control it in Stores> Configuration > Sales > Shipping Methods. For example UPS has a choice of Lbs or Kgs;
For custom shipping method you need to check UPS code,
add a comment |
The weight unit is whatever is being used for shipping. You can sometimes control it in Stores> Configuration > Sales > Shipping Methods. For example UPS has a choice of Lbs or Kgs;
For custom shipping method you need to check UPS code,
The weight unit is whatever is being used for shipping. You can sometimes control it in Stores> Configuration > Sales > Shipping Methods. For example UPS has a choice of Lbs or Kgs;
For custom shipping method you need to check UPS code,
edited May 12 '17 at 10:13
Jai
3,60183163
3,60183163
answered Jan 30 '17 at 7:22
YogeshYogesh
362211
362211
add a comment |
add a comment |
By default the weight is abstract in Magento. It does not have a measuring unit. You can consider it what you want.
There are some shipping methods like UPS (as Yogesh mentioned ) where you can state the measuring unit, but this does not autodetect anything. You are just telling UPS that you use LBS or KG, but you still have to be careful at what you input in for the products.
If you have mixed units there is no out of the box way to determine which is which.
You may need to add an attribute for the products to determine the measuring unit, and then you need to change the method MagentoShippingModelShipping::composePackagesForCarrier
to take into account your measuring unit when retrieving the weight from a products. Convert everything to KG or what ever unit you need.
add a comment |
By default the weight is abstract in Magento. It does not have a measuring unit. You can consider it what you want.
There are some shipping methods like UPS (as Yogesh mentioned ) where you can state the measuring unit, but this does not autodetect anything. You are just telling UPS that you use LBS or KG, but you still have to be careful at what you input in for the products.
If you have mixed units there is no out of the box way to determine which is which.
You may need to add an attribute for the products to determine the measuring unit, and then you need to change the method MagentoShippingModelShipping::composePackagesForCarrier
to take into account your measuring unit when retrieving the weight from a products. Convert everything to KG or what ever unit you need.
add a comment |
By default the weight is abstract in Magento. It does not have a measuring unit. You can consider it what you want.
There are some shipping methods like UPS (as Yogesh mentioned ) where you can state the measuring unit, but this does not autodetect anything. You are just telling UPS that you use LBS or KG, but you still have to be careful at what you input in for the products.
If you have mixed units there is no out of the box way to determine which is which.
You may need to add an attribute for the products to determine the measuring unit, and then you need to change the method MagentoShippingModelShipping::composePackagesForCarrier
to take into account your measuring unit when retrieving the weight from a products. Convert everything to KG or what ever unit you need.
By default the weight is abstract in Magento. It does not have a measuring unit. You can consider it what you want.
There are some shipping methods like UPS (as Yogesh mentioned ) where you can state the measuring unit, but this does not autodetect anything. You are just telling UPS that you use LBS or KG, but you still have to be careful at what you input in for the products.
If you have mixed units there is no out of the box way to determine which is which.
You may need to add an attribute for the products to determine the measuring unit, and then you need to change the method MagentoShippingModelShipping::composePackagesForCarrier
to take into account your measuring unit when retrieving the weight from a products. Convert everything to KG or what ever unit you need.
edited Mar 8 '18 at 9:57
Teja Bhagavan Kollepara
2,99241950
2,99241950
answered Jan 30 '17 at 7:40
Marius♦Marius
168k28324693
168k28324693
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f156955%2fmagento-2-how-convert-package-weight-to-kilogram-kg%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown