0

我想用 facebook like 按钮在 addto 按钮/链接中更改比较按钮,以及 addto wishlist 添加到购物车链接/按钮。

/app/design/frontend/default/theme/template/catalog/product/view/addto.phtml

我想改变类别和产品视图。

这是addto.phtml的代码

 ?>

<?php $_product = $this->getProduct(); ?>
<?php $_wishlistSubmitUrl = $this->helper('wishlist')->getAddUrl($_product); ?>

<ul class="add-to-links">
<?php if ($this->helper('wishlist')->isAllow()) : ?>
    <li><a rel="tooltip" data-placement="top" title="<?php echo $this->__('Add to Wishlist') ?>" href="<?php echo $_wishlistSubmitUrl ?>" onclick="productAddToCartForm.submitLight(this, this.href); return false;" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
<?php endif; ?>
<?php
    $_compareUrl = $this->helper('catalog/product_compare')->getAddUrl($_product);
?>
<?php if($_compareUrl) : ?>
    <li><a rel="tooltip" data-placement="top" title="<?php echo $this->__('Add to Compare') ?>" href="<?php echo $_compareUrl ?>" class="link-compare"><?php echo $this->__('Add to Compare') ?></a></li>
<?php endif; ?>
</ul>

提前致谢

4

1 回答 1

0
<?php $_product = $this->getProduct(); ?>
<?php $_wishlistSubmitUrl = $this->helper('wishlist')->getAddUrl($_product); ?>

<ul class="add-to-links">
<?php if ($this->helper('wishlist')->isAllow()) : ?>
    <li><a rel="tooltip" data-placement="top" title="<?php echo $this->__('Add to Wishlist') ?>" href="<?php echo $_wishlistSubmitUrl ?>" onclick="productAddToCartForm.submitLight(this, this.href); return false;" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
<?php endif; ?>
    <li>
        <!-- put fb code here eg -->
        <iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fmageigniter.com&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=true&amp;font&amp;colorscheme=light&amp;action=like&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>
    </li>
</ul>
于 2013-01-29T22:33:36.077 回答