Where does Magento store the PRODUCT_HAS_WEIGHT attributeConverting virtual products in Magento 2Adding custom attribute to customer registration formquickly update an attribute value for number of products belonging to a particular attribute setCommon attribute valuesEAV attribute values stored in databaseTrouble trying to select a large amount of Attributes for a ProductCannot update custom product attribute values4 questions regarding Weight attribute producthow can use weight attribute for different weightFind value of attribute for each productphp code or mysql query to 'bundle' 2 attributes into 1
How is linear momentum conserved in case of a freely falling body?
Is this password scheme legit?
tcbset behaves differently in preamble and main body
Is it legal for source code containing undefined behavior to crash the compiler?
How much does Commander Data weigh?
Why did Lucius make a deal out of Buckbeak in "The Prisoner of Askaban" but not about Draco being turned into a ferret in "The Goblet of Fire"?
How long do you think advanced cybernetic implants would plausibly last?
What is the loud noise of a helicopter when the rotors are not yet moving?
Why is adding AC power easier than adding DC power?
Is it unusual for a math department not to have a mail/web server?
Can you help me identify this aircraft?
Disk usage of integer column vs boolean column in Postgres
Is it ok to record the 'environment' around my workplace?
If I said I had $100 when asked, but I actually had $200, would I be lying by omission?
Can MuseScore be used programmatically?
How to prevent a hosting company from accessing a VM's encryption keys?
74S vs 74LS ICs
Why does a sticker slowly peel off, but if it is pulled quickly it tears?
What if an AES GCM nonce overflows and collides with the GHASH nonce (0^128)?
Shift lens vs move body?
What does rm -rf $(!!) mean?
Multiple delayed triggers from Massacre Girl interaction
Did Dr. Hannibal Lecter like Clarice or was he attracted to her?
Why is getting a PhD considered "financially irresponsible" by some people?
Where does Magento store the PRODUCT_HAS_WEIGHT attribute
Converting virtual products in Magento 2Adding custom attribute to customer registration formquickly update an attribute value for number of products belonging to a particular attribute setCommon attribute valuesEAV attribute values stored in databaseTrouble trying to select a large amount of Attributes for a ProductCannot update custom product attribute values4 questions regarding Weight attribute producthow can use weight attribute for different weightFind value of attribute for each productphp code or mysql query to 'bundle' 2 attributes into 1
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
For some of our configured products (unfortunately), the PRODUCT_HAS_WEIGHT
attribute has not been set to 1
. Although, the products all have weight set (as a float), Magento still refuses to provide shipping calculation for these products.
I want to modify the PRODUCT_HAS_WEIGHT
property for all products in the database. For that I want to access the MySQL database and issue a query that updates all the corresponding fields. Unfortunately, I was unsuccessful in identifying the attribute to update.
For example, to examine the weights, I would do the following:
(1) USE database;
(2) SELECT * FROM eav_attribute where attribute_code LIKE '%weight%';
(3) SELECT * FROM catalog_product_entity_decimal where attribute_id = 82;`
In a similar fashion as in line (2), product has weight
is not found.
I'd kindly ask the community, to help me find the related attribute to update for each product.
I'm using Magento CE 2.1.6.
magento-2.1 product database attributes
add a comment |
For some of our configured products (unfortunately), the PRODUCT_HAS_WEIGHT
attribute has not been set to 1
. Although, the products all have weight set (as a float), Magento still refuses to provide shipping calculation for these products.
I want to modify the PRODUCT_HAS_WEIGHT
property for all products in the database. For that I want to access the MySQL database and issue a query that updates all the corresponding fields. Unfortunately, I was unsuccessful in identifying the attribute to update.
For example, to examine the weights, I would do the following:
(1) USE database;
(2) SELECT * FROM eav_attribute where attribute_code LIKE '%weight%';
(3) SELECT * FROM catalog_product_entity_decimal where attribute_id = 82;`
In a similar fashion as in line (2), product has weight
is not found.
I'd kindly ask the community, to help me find the related attribute to update for each product.
I'm using Magento CE 2.1.6.
magento-2.1 product database attributes
Magento version ?
– PЯINCƏ
Jul 8 '17 at 21:26
what is the magento version you are using
– Rama Chandran M
Jul 8 '17 at 21:27
I'm using Magento CE 2.1.6. Sorry for missing out this important detail. Thank you!
– Dyin
Jul 9 '17 at 8:34
add a comment |
For some of our configured products (unfortunately), the PRODUCT_HAS_WEIGHT
attribute has not been set to 1
. Although, the products all have weight set (as a float), Magento still refuses to provide shipping calculation for these products.
I want to modify the PRODUCT_HAS_WEIGHT
property for all products in the database. For that I want to access the MySQL database and issue a query that updates all the corresponding fields. Unfortunately, I was unsuccessful in identifying the attribute to update.
For example, to examine the weights, I would do the following:
(1) USE database;
(2) SELECT * FROM eav_attribute where attribute_code LIKE '%weight%';
(3) SELECT * FROM catalog_product_entity_decimal where attribute_id = 82;`
In a similar fashion as in line (2), product has weight
is not found.
I'd kindly ask the community, to help me find the related attribute to update for each product.
I'm using Magento CE 2.1.6.
magento-2.1 product database attributes
For some of our configured products (unfortunately), the PRODUCT_HAS_WEIGHT
attribute has not been set to 1
. Although, the products all have weight set (as a float), Magento still refuses to provide shipping calculation for these products.
I want to modify the PRODUCT_HAS_WEIGHT
property for all products in the database. For that I want to access the MySQL database and issue a query that updates all the corresponding fields. Unfortunately, I was unsuccessful in identifying the attribute to update.
For example, to examine the weights, I would do the following:
(1) USE database;
(2) SELECT * FROM eav_attribute where attribute_code LIKE '%weight%';
(3) SELECT * FROM catalog_product_entity_decimal where attribute_id = 82;`
In a similar fashion as in line (2), product has weight
is not found.
I'd kindly ask the community, to help me find the related attribute to update for each product.
I'm using Magento CE 2.1.6.
magento-2.1 product database attributes
magento-2.1 product database attributes
edited Jul 9 '17 at 10:55
sv3n
10.2k6 gold badges25 silver badges57 bronze badges
10.2k6 gold badges25 silver badges57 bronze badges
asked Jul 7 '17 at 18:00
DyinDyin
789 bronze badges
789 bronze badges
Magento version ?
– PЯINCƏ
Jul 8 '17 at 21:26
what is the magento version you are using
– Rama Chandran M
Jul 8 '17 at 21:27
I'm using Magento CE 2.1.6. Sorry for missing out this important detail. Thank you!
– Dyin
Jul 9 '17 at 8:34
add a comment |
Magento version ?
– PЯINCƏ
Jul 8 '17 at 21:26
what is the magento version you are using
– Rama Chandran M
Jul 8 '17 at 21:27
I'm using Magento CE 2.1.6. Sorry for missing out this important detail. Thank you!
– Dyin
Jul 9 '17 at 8:34
Magento version ?
– PЯINCƏ
Jul 8 '17 at 21:26
Magento version ?
– PЯINCƏ
Jul 8 '17 at 21:26
what is the magento version you are using
– Rama Chandran M
Jul 8 '17 at 21:27
what is the magento version you are using
– Rama Chandran M
Jul 8 '17 at 21:27
I'm using Magento CE 2.1.6. Sorry for missing out this important detail. Thank you!
– Dyin
Jul 9 '17 at 8:34
I'm using Magento CE 2.1.6. Sorry for missing out this important detail. Thank you!
– Dyin
Jul 9 '17 at 8:34
add a comment |
2 Answers
2
active
oldest
votes
The attribute is not stored, is only use for meta purposes by the repo and it is basically a wrapper for the weight attribute within the method customizeWeightField()
of class Catalog/Ui/DataProvider/Product/Form/Modifier/General.php
Modifying the product_has_weight you will change the product type; it defaults to 'Virtual'
but it will get converted to "Download"
if it has downloadable data, remember that 'has' is a magic method prefix, although hasWeight
is overridden on product types virtual and downloadable for the purpose of locking down a false
Boolean value. The value is not specifically stored, the state will remain in the form of the product type, see the TypeTransitionManager
class and the plugin MagentoDownloadableModelProductTypeTransitionManagerPluginDownloadable
, on configurable products it will be determined by the sum of the children state specified by the meta modifier.
when you say attribute, do you refer to thehas weight
? It is definitely stored somewhere, since it is switchable through the UI and for half of the products in the catalog, it prohibits shipping calculation at checkout. Do you know where can I find it and update through SQL?
– Dyin
Jul 11 '17 at 13:40
I agree with his answer, and to me it seems the array key for example is modified when sent over the api (however I'm only guessing and will try to confirm now).
– LM_Fielding
Jul 11 '17 at 14:55
Thanks! However, it is still not clear to me, how should I update this attribute? I mean I can confirm from the Magento Admin, that some configured products have weight set, for example1.5
kilograms, but thehas weight
is disabled. Thehas weight
can be enabled. The state is preserved.
– Dyin
Jul 11 '17 at 15:17
I have modified the answer to explain how has weight is determined
– Goku
Jul 11 '17 at 17:11
1
It just happen that I've found a related post on one of the threads: magento.stackexchange.com/questions/98898/…
– Dyin
Jul 11 '17 at 18:41
|
show 2 more comments
I have found the constant for the property you are referring to, I haven't been using the API or repositories very much so I haven't seen the attribute before today:
https://github.com/magento/magento2/blob/99e85cbc45223baa3551e4c534b650c0d2c6358b/app/code/Magento/Catalog/Api/Data/ProductAttributeInterface.php
The "weight" code attribute is mentioned in this file but only to update, not add.
https://github.com/magento/magento2/blob/99e85cbc45223baa3551e4c534b650c0d2c6358b/app/code/Magento/Catalog/Setup/InstallData.php
Unfortunately I haven't got a Magento instance set up at the moment, but my first (perhaps stupid) thought is to check catalog/product eav attributes?
1
thanks. I've found thePRODUCT_HAS_WEIGHT
as well, but could not figure out how it hits the database. Ultimately, I'm looking for a SQLUPDATE
command to sethas weight
to true for all products in the catalog. I was unsuccessful in finding it in EAV attributes. Do you have any ideas in mind how to find it?
– Dyin
Jul 11 '17 at 13:38
Weight is definitely in the eav_attribute table in Magento 2.1.4, I'm looking at it now. In my install it is attribute_id 82 however this could be different in yours? From my experience I've never set anything to "has weight" it's either virtual or not, and then either has a weight > 0 or weight === 0... Forgive my inexperience.
– LM_Fielding
Jul 11 '17 at 13:48
PRODUCT_HAS_WEIGHT does not appear in a search of all files in 2.1.4 whatsoever.
– LM_Fielding
Jul 11 '17 at 14:56
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%2f182696%2fwhere-does-magento-store-the-product-has-weight-attribute%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 attribute is not stored, is only use for meta purposes by the repo and it is basically a wrapper for the weight attribute within the method customizeWeightField()
of class Catalog/Ui/DataProvider/Product/Form/Modifier/General.php
Modifying the product_has_weight you will change the product type; it defaults to 'Virtual'
but it will get converted to "Download"
if it has downloadable data, remember that 'has' is a magic method prefix, although hasWeight
is overridden on product types virtual and downloadable for the purpose of locking down a false
Boolean value. The value is not specifically stored, the state will remain in the form of the product type, see the TypeTransitionManager
class and the plugin MagentoDownloadableModelProductTypeTransitionManagerPluginDownloadable
, on configurable products it will be determined by the sum of the children state specified by the meta modifier.
when you say attribute, do you refer to thehas weight
? It is definitely stored somewhere, since it is switchable through the UI and for half of the products in the catalog, it prohibits shipping calculation at checkout. Do you know where can I find it and update through SQL?
– Dyin
Jul 11 '17 at 13:40
I agree with his answer, and to me it seems the array key for example is modified when sent over the api (however I'm only guessing and will try to confirm now).
– LM_Fielding
Jul 11 '17 at 14:55
Thanks! However, it is still not clear to me, how should I update this attribute? I mean I can confirm from the Magento Admin, that some configured products have weight set, for example1.5
kilograms, but thehas weight
is disabled. Thehas weight
can be enabled. The state is preserved.
– Dyin
Jul 11 '17 at 15:17
I have modified the answer to explain how has weight is determined
– Goku
Jul 11 '17 at 17:11
1
It just happen that I've found a related post on one of the threads: magento.stackexchange.com/questions/98898/…
– Dyin
Jul 11 '17 at 18:41
|
show 2 more comments
The attribute is not stored, is only use for meta purposes by the repo and it is basically a wrapper for the weight attribute within the method customizeWeightField()
of class Catalog/Ui/DataProvider/Product/Form/Modifier/General.php
Modifying the product_has_weight you will change the product type; it defaults to 'Virtual'
but it will get converted to "Download"
if it has downloadable data, remember that 'has' is a magic method prefix, although hasWeight
is overridden on product types virtual and downloadable for the purpose of locking down a false
Boolean value. The value is not specifically stored, the state will remain in the form of the product type, see the TypeTransitionManager
class and the plugin MagentoDownloadableModelProductTypeTransitionManagerPluginDownloadable
, on configurable products it will be determined by the sum of the children state specified by the meta modifier.
when you say attribute, do you refer to thehas weight
? It is definitely stored somewhere, since it is switchable through the UI and for half of the products in the catalog, it prohibits shipping calculation at checkout. Do you know where can I find it and update through SQL?
– Dyin
Jul 11 '17 at 13:40
I agree with his answer, and to me it seems the array key for example is modified when sent over the api (however I'm only guessing and will try to confirm now).
– LM_Fielding
Jul 11 '17 at 14:55
Thanks! However, it is still not clear to me, how should I update this attribute? I mean I can confirm from the Magento Admin, that some configured products have weight set, for example1.5
kilograms, but thehas weight
is disabled. Thehas weight
can be enabled. The state is preserved.
– Dyin
Jul 11 '17 at 15:17
I have modified the answer to explain how has weight is determined
– Goku
Jul 11 '17 at 17:11
1
It just happen that I've found a related post on one of the threads: magento.stackexchange.com/questions/98898/…
– Dyin
Jul 11 '17 at 18:41
|
show 2 more comments
The attribute is not stored, is only use for meta purposes by the repo and it is basically a wrapper for the weight attribute within the method customizeWeightField()
of class Catalog/Ui/DataProvider/Product/Form/Modifier/General.php
Modifying the product_has_weight you will change the product type; it defaults to 'Virtual'
but it will get converted to "Download"
if it has downloadable data, remember that 'has' is a magic method prefix, although hasWeight
is overridden on product types virtual and downloadable for the purpose of locking down a false
Boolean value. The value is not specifically stored, the state will remain in the form of the product type, see the TypeTransitionManager
class and the plugin MagentoDownloadableModelProductTypeTransitionManagerPluginDownloadable
, on configurable products it will be determined by the sum of the children state specified by the meta modifier.
The attribute is not stored, is only use for meta purposes by the repo and it is basically a wrapper for the weight attribute within the method customizeWeightField()
of class Catalog/Ui/DataProvider/Product/Form/Modifier/General.php
Modifying the product_has_weight you will change the product type; it defaults to 'Virtual'
but it will get converted to "Download"
if it has downloadable data, remember that 'has' is a magic method prefix, although hasWeight
is overridden on product types virtual and downloadable for the purpose of locking down a false
Boolean value. The value is not specifically stored, the state will remain in the form of the product type, see the TypeTransitionManager
class and the plugin MagentoDownloadableModelProductTypeTransitionManagerPluginDownloadable
, on configurable products it will be determined by the sum of the children state specified by the meta modifier.
edited Aug 14 at 14:13
answered Jul 11 '17 at 0:58
GokuGoku
5353 silver badges6 bronze badges
5353 silver badges6 bronze badges
when you say attribute, do you refer to thehas weight
? It is definitely stored somewhere, since it is switchable through the UI and for half of the products in the catalog, it prohibits shipping calculation at checkout. Do you know where can I find it and update through SQL?
– Dyin
Jul 11 '17 at 13:40
I agree with his answer, and to me it seems the array key for example is modified when sent over the api (however I'm only guessing and will try to confirm now).
– LM_Fielding
Jul 11 '17 at 14:55
Thanks! However, it is still not clear to me, how should I update this attribute? I mean I can confirm from the Magento Admin, that some configured products have weight set, for example1.5
kilograms, but thehas weight
is disabled. Thehas weight
can be enabled. The state is preserved.
– Dyin
Jul 11 '17 at 15:17
I have modified the answer to explain how has weight is determined
– Goku
Jul 11 '17 at 17:11
1
It just happen that I've found a related post on one of the threads: magento.stackexchange.com/questions/98898/…
– Dyin
Jul 11 '17 at 18:41
|
show 2 more comments
when you say attribute, do you refer to thehas weight
? It is definitely stored somewhere, since it is switchable through the UI and for half of the products in the catalog, it prohibits shipping calculation at checkout. Do you know where can I find it and update through SQL?
– Dyin
Jul 11 '17 at 13:40
I agree with his answer, and to me it seems the array key for example is modified when sent over the api (however I'm only guessing and will try to confirm now).
– LM_Fielding
Jul 11 '17 at 14:55
Thanks! However, it is still not clear to me, how should I update this attribute? I mean I can confirm from the Magento Admin, that some configured products have weight set, for example1.5
kilograms, but thehas weight
is disabled. Thehas weight
can be enabled. The state is preserved.
– Dyin
Jul 11 '17 at 15:17
I have modified the answer to explain how has weight is determined
– Goku
Jul 11 '17 at 17:11
1
It just happen that I've found a related post on one of the threads: magento.stackexchange.com/questions/98898/…
– Dyin
Jul 11 '17 at 18:41
when you say attribute, do you refer to the
has weight
? It is definitely stored somewhere, since it is switchable through the UI and for half of the products in the catalog, it prohibits shipping calculation at checkout. Do you know where can I find it and update through SQL?– Dyin
Jul 11 '17 at 13:40
when you say attribute, do you refer to the
has weight
? It is definitely stored somewhere, since it is switchable through the UI and for half of the products in the catalog, it prohibits shipping calculation at checkout. Do you know where can I find it and update through SQL?– Dyin
Jul 11 '17 at 13:40
I agree with his answer, and to me it seems the array key for example is modified when sent over the api (however I'm only guessing and will try to confirm now).
– LM_Fielding
Jul 11 '17 at 14:55
I agree with his answer, and to me it seems the array key for example is modified when sent over the api (however I'm only guessing and will try to confirm now).
– LM_Fielding
Jul 11 '17 at 14:55
Thanks! However, it is still not clear to me, how should I update this attribute? I mean I can confirm from the Magento Admin, that some configured products have weight set, for example
1.5
kilograms, but the has weight
is disabled. The has weight
can be enabled. The state is preserved.– Dyin
Jul 11 '17 at 15:17
Thanks! However, it is still not clear to me, how should I update this attribute? I mean I can confirm from the Magento Admin, that some configured products have weight set, for example
1.5
kilograms, but the has weight
is disabled. The has weight
can be enabled. The state is preserved.– Dyin
Jul 11 '17 at 15:17
I have modified the answer to explain how has weight is determined
– Goku
Jul 11 '17 at 17:11
I have modified the answer to explain how has weight is determined
– Goku
Jul 11 '17 at 17:11
1
1
It just happen that I've found a related post on one of the threads: magento.stackexchange.com/questions/98898/…
– Dyin
Jul 11 '17 at 18:41
It just happen that I've found a related post on one of the threads: magento.stackexchange.com/questions/98898/…
– Dyin
Jul 11 '17 at 18:41
|
show 2 more comments
I have found the constant for the property you are referring to, I haven't been using the API or repositories very much so I haven't seen the attribute before today:
https://github.com/magento/magento2/blob/99e85cbc45223baa3551e4c534b650c0d2c6358b/app/code/Magento/Catalog/Api/Data/ProductAttributeInterface.php
The "weight" code attribute is mentioned in this file but only to update, not add.
https://github.com/magento/magento2/blob/99e85cbc45223baa3551e4c534b650c0d2c6358b/app/code/Magento/Catalog/Setup/InstallData.php
Unfortunately I haven't got a Magento instance set up at the moment, but my first (perhaps stupid) thought is to check catalog/product eav attributes?
1
thanks. I've found thePRODUCT_HAS_WEIGHT
as well, but could not figure out how it hits the database. Ultimately, I'm looking for a SQLUPDATE
command to sethas weight
to true for all products in the catalog. I was unsuccessful in finding it in EAV attributes. Do you have any ideas in mind how to find it?
– Dyin
Jul 11 '17 at 13:38
Weight is definitely in the eav_attribute table in Magento 2.1.4, I'm looking at it now. In my install it is attribute_id 82 however this could be different in yours? From my experience I've never set anything to "has weight" it's either virtual or not, and then either has a weight > 0 or weight === 0... Forgive my inexperience.
– LM_Fielding
Jul 11 '17 at 13:48
PRODUCT_HAS_WEIGHT does not appear in a search of all files in 2.1.4 whatsoever.
– LM_Fielding
Jul 11 '17 at 14:56
add a comment |
I have found the constant for the property you are referring to, I haven't been using the API or repositories very much so I haven't seen the attribute before today:
https://github.com/magento/magento2/blob/99e85cbc45223baa3551e4c534b650c0d2c6358b/app/code/Magento/Catalog/Api/Data/ProductAttributeInterface.php
The "weight" code attribute is mentioned in this file but only to update, not add.
https://github.com/magento/magento2/blob/99e85cbc45223baa3551e4c534b650c0d2c6358b/app/code/Magento/Catalog/Setup/InstallData.php
Unfortunately I haven't got a Magento instance set up at the moment, but my first (perhaps stupid) thought is to check catalog/product eav attributes?
1
thanks. I've found thePRODUCT_HAS_WEIGHT
as well, but could not figure out how it hits the database. Ultimately, I'm looking for a SQLUPDATE
command to sethas weight
to true for all products in the catalog. I was unsuccessful in finding it in EAV attributes. Do you have any ideas in mind how to find it?
– Dyin
Jul 11 '17 at 13:38
Weight is definitely in the eav_attribute table in Magento 2.1.4, I'm looking at it now. In my install it is attribute_id 82 however this could be different in yours? From my experience I've never set anything to "has weight" it's either virtual or not, and then either has a weight > 0 or weight === 0... Forgive my inexperience.
– LM_Fielding
Jul 11 '17 at 13:48
PRODUCT_HAS_WEIGHT does not appear in a search of all files in 2.1.4 whatsoever.
– LM_Fielding
Jul 11 '17 at 14:56
add a comment |
I have found the constant for the property you are referring to, I haven't been using the API or repositories very much so I haven't seen the attribute before today:
https://github.com/magento/magento2/blob/99e85cbc45223baa3551e4c534b650c0d2c6358b/app/code/Magento/Catalog/Api/Data/ProductAttributeInterface.php
The "weight" code attribute is mentioned in this file but only to update, not add.
https://github.com/magento/magento2/blob/99e85cbc45223baa3551e4c534b650c0d2c6358b/app/code/Magento/Catalog/Setup/InstallData.php
Unfortunately I haven't got a Magento instance set up at the moment, but my first (perhaps stupid) thought is to check catalog/product eav attributes?
I have found the constant for the property you are referring to, I haven't been using the API or repositories very much so I haven't seen the attribute before today:
https://github.com/magento/magento2/blob/99e85cbc45223baa3551e4c534b650c0d2c6358b/app/code/Magento/Catalog/Api/Data/ProductAttributeInterface.php
The "weight" code attribute is mentioned in this file but only to update, not add.
https://github.com/magento/magento2/blob/99e85cbc45223baa3551e4c534b650c0d2c6358b/app/code/Magento/Catalog/Setup/InstallData.php
Unfortunately I haven't got a Magento instance set up at the moment, but my first (perhaps stupid) thought is to check catalog/product eav attributes?
answered Jul 10 '17 at 18:17
LM_FieldingLM_Fielding
77318 silver badges38 bronze badges
77318 silver badges38 bronze badges
1
thanks. I've found thePRODUCT_HAS_WEIGHT
as well, but could not figure out how it hits the database. Ultimately, I'm looking for a SQLUPDATE
command to sethas weight
to true for all products in the catalog. I was unsuccessful in finding it in EAV attributes. Do you have any ideas in mind how to find it?
– Dyin
Jul 11 '17 at 13:38
Weight is definitely in the eav_attribute table in Magento 2.1.4, I'm looking at it now. In my install it is attribute_id 82 however this could be different in yours? From my experience I've never set anything to "has weight" it's either virtual or not, and then either has a weight > 0 or weight === 0... Forgive my inexperience.
– LM_Fielding
Jul 11 '17 at 13:48
PRODUCT_HAS_WEIGHT does not appear in a search of all files in 2.1.4 whatsoever.
– LM_Fielding
Jul 11 '17 at 14:56
add a comment |
1
thanks. I've found thePRODUCT_HAS_WEIGHT
as well, but could not figure out how it hits the database. Ultimately, I'm looking for a SQLUPDATE
command to sethas weight
to true for all products in the catalog. I was unsuccessful in finding it in EAV attributes. Do you have any ideas in mind how to find it?
– Dyin
Jul 11 '17 at 13:38
Weight is definitely in the eav_attribute table in Magento 2.1.4, I'm looking at it now. In my install it is attribute_id 82 however this could be different in yours? From my experience I've never set anything to "has weight" it's either virtual or not, and then either has a weight > 0 or weight === 0... Forgive my inexperience.
– LM_Fielding
Jul 11 '17 at 13:48
PRODUCT_HAS_WEIGHT does not appear in a search of all files in 2.1.4 whatsoever.
– LM_Fielding
Jul 11 '17 at 14:56
1
1
thanks. I've found the
PRODUCT_HAS_WEIGHT
as well, but could not figure out how it hits the database. Ultimately, I'm looking for a SQL UPDATE
command to set has weight
to true for all products in the catalog. I was unsuccessful in finding it in EAV attributes. Do you have any ideas in mind how to find it?– Dyin
Jul 11 '17 at 13:38
thanks. I've found the
PRODUCT_HAS_WEIGHT
as well, but could not figure out how it hits the database. Ultimately, I'm looking for a SQL UPDATE
command to set has weight
to true for all products in the catalog. I was unsuccessful in finding it in EAV attributes. Do you have any ideas in mind how to find it?– Dyin
Jul 11 '17 at 13:38
Weight is definitely in the eav_attribute table in Magento 2.1.4, I'm looking at it now. In my install it is attribute_id 82 however this could be different in yours? From my experience I've never set anything to "has weight" it's either virtual or not, and then either has a weight > 0 or weight === 0... Forgive my inexperience.
– LM_Fielding
Jul 11 '17 at 13:48
Weight is definitely in the eav_attribute table in Magento 2.1.4, I'm looking at it now. In my install it is attribute_id 82 however this could be different in yours? From my experience I've never set anything to "has weight" it's either virtual or not, and then either has a weight > 0 or weight === 0... Forgive my inexperience.
– LM_Fielding
Jul 11 '17 at 13:48
PRODUCT_HAS_WEIGHT does not appear in a search of all files in 2.1.4 whatsoever.
– LM_Fielding
Jul 11 '17 at 14:56
PRODUCT_HAS_WEIGHT does not appear in a search of all files in 2.1.4 whatsoever.
– LM_Fielding
Jul 11 '17 at 14:56
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%2f182696%2fwhere-does-magento-store-the-product-has-weight-attribute%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
Magento version ?
– PЯINCƏ
Jul 8 '17 at 21:26
what is the magento version you are using
– Rama Chandran M
Jul 8 '17 at 21:27
I'm using Magento CE 2.1.6. Sorry for missing out this important detail. Thank you!
– Dyin
Jul 9 '17 at 8:34