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?
Okay, I found a solution that is exactly what I want to achieve:
<a href="http://google.com/<?php $_product = Mage::getModel('catalog/product')->load($_product->getId()) ?><?php echo $_product->getUrlKey(); ?>">ProductName</a>
Then the URL link will be shown as google.com/ProductName
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다