File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
app/code/Magento/Catalog/view/frontend/templates/product/view/opengraph Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 6
6
7
7
/** @var $block \Magento\Catalog\Block\Product\View */
8
8
/** @var $escaper \Magento\Framework\Escaper */
9
+
10
+ $ product = $ block ->getProduct ();
9
11
?>
10
12
11
13
<meta property="og:type" content="product" />
12
14
<meta property="og:title"
13
- content="<?= $ escaper ->escapeHtmlAttr ($ block ->stripTags ($ block -> getProduct () ->getName ())) ?> " />
15
+ content="<?= $ escaper ->escapeHtmlAttr ($ block ->stripTags ($ product ->getName ())) ?> " />
14
16
<meta property="og:image"
15
- content="<?= $ escaper ->escapeUrl ($ block ->getImage ($ block -> getProduct () , 'product_base_image ' )->getImageUrl ()) ?> " />
17
+ content="<?= $ escaper ->escapeUrl ($ block ->getImage ($ product , 'product_base_image ' )->getImageUrl ()) ?> " />
16
18
<meta property="og:description"
17
- content="<?= $ escaper ->escapeHtmlAttr ($ block ->stripTags ($ block -> getProduct () ->getShortDescription ())) ?> " />
18
- <meta property="og:url" content="<?= $ escaper ->escapeUrl ($ block -> getProduct () ->getProductUrl ()) ?> " />
19
- <?php if ($ block -> getProduct ()-> getCanShowPrice () !== false && $ priceAmount = $ block -> getProduct ()
19
+ content="<?= $ escaper ->escapeHtmlAttr ($ block ->stripTags ($ product ->getShortDescription ())) ?> " />
20
+ <meta property="og:url" content="<?= $ escaper ->escapeUrl ($ product ->getProductUrl ()) ?> " />
21
+ <?php if ($ product -> getCanShowPrice () !== false && $ priceAmount = $ product
20
22
->getPriceInfo ()
21
23
->getPrice (\Magento \Catalog \Pricing \Price \FinalPrice::PRICE_CODE )
22
24
->getAmount ()):?>
You can’t perform that action at this time.
0 commit comments