0

これが私のコードです:

<script type="text/javascript">
(function() {
window.PinIt = window.PinIt || { loaded:false };
if (window.PinIt.loaded) return;
window.PinIt.loaded = true;
function async_load(){
    var s = document.createElement("script");
    s.type = "text/javascript";
    s.async = true;
    if (window.location.protocol == "https:")
        s.src = "https://assets.pinterest.com/js/pinit.js";
    else
        s.src = "http://assets.pinterest.com/js/pinit.js";
    var x = document.getElementsByTagName("script")[0];
    x.parentNode.insertBefore(s, x);
}
if (window.attachEvent)
    window.attachEvent("onload", async_load);
else
    window.addEventListener("load", async_load, false);
})();
</script>

 <!-- Customize and include for EACH button in the page -->
  <a href="http://pinterest.com/pin/create/button/?url=<?php echo $this->helper('core/url')-       >getCurrentUrl(); ?>&media=<?php echo $this->helper('catalog/image')->init($_product, 'image')->resize(500); ?>&description=<?php echo $_product->getShortDescription(); ?>" class="pin-it-button" count-layout="none">Pin It</a> 

phpはすべての要素を正常に収集し、ボタンをクリックするとモーダルウィンドウがポップアップ表示されます。

ただし、後続のモーダルウィンドウでは、ログイン時にボードに固定されません。

Scriptタグとリンクは両方ともリストアイテム内にあります。

どんな助けでもいただければ幸いです。

ありがとう、MoisesM。

4

1 に答える 1

2

あなたの説明から、問題はあなたがパラメータをURLエンコードしていないこと、つまり?url=の後のすべてであるように聞こえます

これで発生する問題がそれだけかどうかはわかりませんが、現在発生している問題は修正されるはずです。

于 2012-05-14T08:51:06.260 に答える