VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: XFaktor on July 03, 2012, 11:20:53 AM

Title: How to get product link by id,sku or etc ?
Post by: XFaktor on July 03, 2012, 11:20:53 AM
How to get product link by id,sku or etc ?

For example i am in one product detail page (product1), i have others product id as variable (product2), and i need to have a link to product2 in product1 page :)

p.s. Damn this forum is slowest i have ever seen :)

Thanks.
Title: Re: How to get product link by id,sku or etc ?
Post by: XFaktor on July 03, 2012, 14:23:37 PM
Anyone ? how to get product link (url) by any one parameter of it (id,sku,name) ?
Title: Re: How to get product link by id,sku or etc ?
Post by: srajca on July 04, 2012, 21:03:08 PM
try something like this
<?php echo JHTML::link(JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$product->virtuemart_product_id.'&virtuemart_category_id='.$product->virtuemart_category_id), $product->product_name, array('title' => $product->product_name)); ?>
and try changing this (.$product->virtuemart_product_id.) with your product id (shown in vm config).

ALSO

Quote from: XFaktor on July 03, 2012, 11:20:53 AM
p.s. Damn this forum is slowest i have ever seen :)
Thanks.

THIS is NOT by any means going to help you get answers or solutions to your problems.