Skip to content

Include shipping weight details in product data#107

Open
Andrew998 wants to merge 4 commits intoouteredge:masterfrom
Andrew998:Include-Shipping-Weght
Open

Include shipping weight details in product data#107
Andrew998 wants to merge 4 commits intoouteredge:masterfrom
Andrew998:Include-Shipping-Weght

Conversation

@Andrew998
Copy link

Added shipping weight details for Google Merchant, formatted as a string with 6 decimal places. Included condition to check for product weight before adding to data.

Added shipping weight details for Google Merchant, formatted as a string with 6 decimal places. Included condition to check for product weight before adding to data.
@vseager
Copy link
Contributor

vseager commented Feb 25, 2026

@Andrew998 Thanks for the contribution. This should respect the module config:

$this->getConfig('structureddata/product/include_weight')

Also, why rounding to 6 decimal places? Magneto rounds to 4 decimal places, so this seems unnecessary.

@Andrew998
Copy link
Author

Thanks. I'm not too familiar with coding for Magento so all comments are welcome.

Is the process that I make those changes to the contribution?

@vseager
Copy link
Contributor

vseager commented Feb 25, 2026

Hi Andrew,

Yes please go ahead and update your merge request and we will review it again for you. If not, we can put it in our roadmap to implement at a later date.

…y weight.

Updated weight formatting to use 4 decimal places instead of 6. Update check for display weight.
Corrected comment to specify weight formatting with 4 decimal places.
@vseager
Copy link
Contributor

vseager commented Feb 25, 2026

The latest commit removes the check for a valid weight on the product. As well as checking if the config allows weight to be included, you must still check that a weight existing on the product. See the short description as an example of this logic.

Add weight check to include shipping details for products.
@Andrew998
Copy link
Author

Thank you. I'll get there eventually!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants