#358 – Link to original product

Posted in ‘Catproduct’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
 
is it possible to have a link to the original product in the catproduct view for example like in the cat product content plugin

Best regard

Claude
claude-2537
Hi,

Go to [root]/plugins/vmcustom/catproduct/catproduct/tmpl

and choose teplate you are using for your catproduct. If you use main template, then you need to go to group_layouts folder and open default.php.

Then search for this line:

if ($parametri["show_name"] == 1) { echo $currency->showTableField('td','cell_name',$product['child']['product_name'], 'data-title="'.JText::_('CATPRODUCT_TABLE_NAME_FIELD').'"');}

replace it with

if ($parametri["show_name"] == 1) { echo $currency->showTableField('td','cell_name','<a href="index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$product['child']['virtuemart_product_id'].'">'.$product['child']['product_name'].'</a>', 'data-title="'.JText::_('CATPRODUCT_TABLE_NAME_FIELD').'"');}

This will add link to product name field. Use similar if you want to add link to some other field.

Best Regards,
Maja
maja_mlinar

About the author

Who‘s behind this

Demo

Maja Mozina Mlinar

founder
Demo

Sandi Mlinar

procurator

info@sm-planet.net

Skype: maja.mozina1