diff --git a/Config/module.xml b/Config/module.xml
index c93d26a..9bd25c4 100644
--- a/Config/module.xml
+++ b/Config/module.xml
@@ -13,7 +13,7 @@
en_US
fr_FR
- 2.2.3
+ 2.2.4
Nicolas Barbey
diff --git a/Smarty/Plugins/BetterSeoMicroDataPlugin.php b/Smarty/Plugins/BetterSeoMicroDataPlugin.php
index 8ba4e84..55cd801 100644
--- a/Smarty/Plugins/BetterSeoMicroDataPlugin.php
+++ b/Smarty/Plugins/BetterSeoMicroDataPlugin.php
@@ -28,7 +28,6 @@
use Thelia\Model\Category;
use Thelia\Model\CategoryQuery;
use Thelia\Model\ConfigQuery;
-use Thelia\Model\Content;
use Thelia\Model\ContentQuery;
use Thelia\Model\Folder;
use Thelia\Model\FolderQuery;
@@ -251,6 +250,8 @@ protected function getProductMicroData(Product $product, Lang $lang, $relatedPro
$microData['gtin13'] = $pse->getEanCode();
}
+ $brandTitle = null;
+
if ($brand = $product->getBrand()) {
$brandTitle = BrandI18nQuery::create()
->filterById($brand->getId())
@@ -263,6 +264,11 @@ protected function getProductMicroData(Product $product, Lang $lang, $relatedPro
$microData['brand']['name'] = $brandTitle;
}
+
+ if ($weight = $pse->getWeight()) {
+ $microData['shipping_weight'] = $weight . ' ' .'kg';
+ }
+
if ($relatedProducts) {
foreach ($relatedProducts as $relatedProductId) {
$relatedProduct = ProductQuery::create()->filterById($relatedProductId)->findOne();
@@ -368,4 +374,4 @@ protected function getContentMicroData($contentId, Lang $lang)
return $microData;
}
-}
+}
\ No newline at end of file