PinIt Pinterest按钮不显示图像

Gar*_*ine 1 media button magento query-string pinterest

我在http://www.harmonics.co.uk有一个Magento商店,我在产品上有PinIt按钮.

问题是当您单击它时,即使URL正确,它也不会从查询字符串中的media属性中获取图像.

我正在使用以下代码生成我的图像和产品页面上的PinIt按钮:

<?php
    $_helper = $this->helper('catalog/output');
    $_product = $this->getProduct();
    $image = $this->helper('catalog/image')->init($_product, $_product->getImageUrl(), 'image')->resize(150, 150);
?>

// PinIt Anchor
<a class="pinterest" href="http://pinterest.com/pin/create/button/?url=<?php echo $_product->getProductUrl(); ?>&amp;media=<?php echo $image; ?>&amp;description=<?php echo $_product->getName(); ?>" title="Share on Pinterest">&nbsp;</a>
Run Code Online (Sandbox Code Playgroud)

它曾经工作,但我认为Pinterest改变了按钮的工作方式,但我看不出如何.生成的代码看起来几乎相同,除了生成的URL替换:%3A和/%2F.

我已经尝试过替换字符串,但这也不起作用.任何想法的人.干杯.

Ana*_*uch 5

尝试更换

<a class="pinterest" href="http://pinterest.com/pin/create/button/?url=<?php echo $_product->getProductUrl(); ?>&amp;media=<?php echo $image; ?>&amp;description=<?php echo $_product->getName(); ?>" title="Share on Pinterest">&nbsp;</a>
Run Code Online (Sandbox Code Playgroud)

<a class="pinterest" href="http://pinterest.com/pin/create/button/?url=<?php echo urlencode($_product->getProductUrl()); ?>&amp;media=<?php echo urlencode($image); ?>&amp;description=<?php echo urlencode($_product->getName()); ?>" title="Share on Pinterest">&nbsp;</a>
Run Code Online (Sandbox Code Playgroud)