0
我有magento心愿单,我想分享它,AddThis插件会很好,因为您可以与所有社交应用程序共享它。但在Magento wishlist url不同于共享愿望清单地址,那么是否有可能分享不同于当前url用户的url?是否可以为AddThis插件提供自定义网址?
我有magento心愿单,我想分享它,AddThis插件会很好,因为您可以与所有社交应用程序共享它。但在Magento wishlist url不同于共享愿望清单地址,那么是否有可能分享不同于当前url用户的url?是否可以为AddThis插件提供自定义网址?
我设法做我自己,这里是代码:
<?php
// app/design/frontend/base/default/template/wishlist/view.phtml (override this in your template)
$wishlist = $this->_getWishlist();
$shareWishListUrl = Mage::getUrl('*/shared/index', array('code' => $wishlist->getSharingCode()));
$shareAttributes = "addthis:url='$shareWishListUrl' addthis:title=" . $this->__('My Wishlist') . " addthis:description='' ";
?>
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style " style="float: left;">
<div class="text-align: left !important;"><?php echo $this->__('Share My Wishlist'); ?>:</div>
<a class="addthis_button_preferred_1" <?php echo $shareAttributes; ?>></a>
<a class="addthis_button_preferred_2" <?php echo $shareAttributes; ?>></a>
<a class="addthis_button_preferred_3" <?php echo $shareAttributes; ?>></a>
<a class="addthis_button_preferred_4" <?php echo $shareAttributes; ?>></a>
<a href="http://www.addthis.com/bookmark.php" class="addthis_button_compact" <?php echo $shareAttributes; ?>></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js"></script>
<!-- AddThis Button END -->
有关最新前页代码,使用数据链接和数据称号。有关更多信息,请参阅here。
与[this]类似的问题(http://stackoverflow.com/q/7127578/610832)SO帖子。 – zacharydl