Skip to content

Commit

Permalink
Issue fix #20010 Wrong price amount in opengraph
Browse files Browse the repository at this point in the history
Issue fix #20010 Wrong price amount in opengraph
  • Loading branch information
milindsingh authored and mage2pratik committed Feb 13, 2019
1 parent a951912 commit 85cdc9d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<meta property="og:image" content="<?= $block->escapeUrl($block->getImage($block->getProduct(), 'product_base_image')->getImageUrl()) ?>" />
<meta property="og:description" content="<?= $block->escapeHtmlAttr($block->stripTags($block->getProduct()->getShortDescription())) ?>" />
<meta property="og:url" content="<?= $block->escapeUrl($block->getProduct()->getProductUrl()) ?>" />
<?php if ($priceAmount = $block->getProduct()->getFinalPrice()):?>
<?php if ($priceAmount = $block->getProduct()->getPriceInfo()->getPrice(\Magento\Catalog\Pricing\Price\FinalPrice::PRICE_CODE)->getAmount()):?>
<meta property="product:price:amount" content="<?= /* @escapeNotVerified */ $priceAmount ?>"/>
<?= $block->getChildHtml('meta.currency') ?>
<?php endif;?>

0 comments on commit 85cdc9d

Please sign in to comment.