Skip to content

Include shipping weight details in product data - #107

Open
Andrew998 wants to merge 7 commits into
outeredge:masterfrom
Andrew998:Include-Shipping-Weght
Open

Include shipping weight details in product data#107
Andrew998 wants to merge 7 commits into
outeredge:masterfrom
Andrew998:Include-Shipping-Weght

Conversation

@Andrew998

Copy link
Copy Markdown

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

vseager commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
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

vseager commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

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

vseager commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Author

Thank you. I'll get there eventually!

@Andrew998
Andrew998 marked this pull request as draft June 3, 2026 13:27
@Andrew998
Andrew998 marked this pull request as ready for review June 3, 2026 13:28
@Andrew998
Andrew998 marked this pull request as draft August 7, 2026 12:22
Updated weight formatting to use 6 decimal places instead of 4.

@Andrew998 Andrew998 left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ready for review. Shipping weight is the one thing missing for Google Merchant account to pick up all details without needing a feed.

@Andrew998
Andrew998 marked this pull request as ready for review August 7, 2026 12:31
Comment thread Model/Type/Product.php
Comment thread Model/Type/Product.php
Comment thread Model/Type/Product.php
@kilo-code-bot

kilo-code-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown

Code Review Summary

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 3
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
Model/Type/Product.php 374 The new shipping-details output bypasses the existing include_weight configuration.
Model/Type/Product.php 375 The code uses four decimal places while the change claims six.
Model/Type/Product.php 378 weight is not a valid property of OfferShippingDetails, so consumers will not receive a schema-valid shipping weight.
Files Reviewed (1 file)
  • Model/Type/Product.php - 3 issues

Fix these issues in Kilo Cloud

Previous Review Summary (commit bb689e3)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit bb689e3)

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 3
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
Model/Type/Product.php 374 The new shipping-details output bypasses the existing include_weight configuration.
Model/Type/Product.php 375 The code uses four decimal places while the change claims six.
Model/Type/Product.php 378 weight is not a valid property of OfferShippingDetails, so consumers will not receive a schema-valid shipping weight.
Files Reviewed (1 file)
  • Model/Type/Product.php - 3 issues

Fix these issues in Kilo Cloud


Reviewed by gpt-5.6-luna · Input: 30 · Output: 9.3K · Cached: 234.2K

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