dsy19890123
dsy19890123
2015-01-28 22:05

如何在magento商店的phtml文件中制作动态产品URL密钥

  • php
  • url
  • magento

I want to make a "shop online" link on the B2B Magento shop product page (http://b2b.com/product1/) to redirect visitors to the B2C shop product page like: http://b2c.com/product1/

I only know that <?php echo $_product->getProductUrl() ?> is calling http://b2b.com/product1/ But how to call a dynamic URL key in the /product/view.phtml, so then in the URL structure only the domain is changed from b2b.com to b2c.com but the product key will stay the same according to which product is being viewed?

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答