VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: rishabhchd19 on March 09, 2017, 01:08:29 AM

Title: change of url in email layout when order confirmed
Post by: rishabhchd19 on March 09, 2017, 01:08:29 AM
please look for the attached image. i don't want to show keyword "virtuemart" when customer mouse hover ot click the hyperlink of order confirmation in an email.
Title: Re: change of url in email layout when order confirmed
Post by: kishoreonwork on March 09, 2017, 15:03:32 PM

Have you enabled SEF in Joomla Configuration ?
Title: Re: change of url in email layout when order confirmed
Post by: rishabhchd19 on March 09, 2017, 18:39:52 PM
Quote from: kishoreonwork on March 09, 2017, 15:03:32 PM

Have you enabled SEF in Joomla Configuration ?


Yes, but disabling it will affect SEO optimization?
Title: Re: change of url in email layout when order confirmed
Post by: kishoreonwork on March 09, 2017, 18:59:34 PM
Ok , You need to edit  the file components/com_virtuemart/views/invoice/tmpl/invoice_items.php

and near about  line no 98 is

$product_link = JURI::root().'index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=' . $item->virtuemart_category_id .
'&virtuemart_product_id=' . $item->virtuemart_product_id . '&Itemid=' . $menuItemID;




you need to replace above code with below

$product_link = JURI::root(). JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=' . $item->virtuemart_category_id .'&virtuemart_product_id=' . $item->virtuemart_product_id);




It's better if you use template override

Thanks
Kishore

Title: Re: change of url in email layout when order confirmed
Post by: rishabhchd19 on March 28, 2017, 11:04:53 AM
I have tried writing JRoute::_(' ............'). I'm still getting the below error.
Title: Re: change of url in email layout when order confirmed
Post by: rishabhchd19 on March 28, 2017, 12:59:40 PM
Quote from: kishoreonwork on March 09, 2017, 18:59:34 PM
Ok , You need to edit  the file components/com_virtuemart/views/invoice/tmpl/invoice_items.php

and near about  line no 98 is

$product_link = JURI::root().'index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=' . $item->virtuemart_category_id .
'&virtuemart_product_id=' . $item->virtuemart_product_id . '&Itemid=' . $menuItemID;




you need to replace above code with below

$product_link = JURI::root(). JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=' . $item->virtuemart_category_id .'&virtuemart_product_id=' . $item->virtuemart_product_id);




It's better if you use template override

Thanks
Kishore



Here it seems OK, but not at email order. PFA
Title: Re: change of url in email layout when order confirmed
Post by: rishabhchd19 on March 28, 2017, 23:02:11 PM
In one of my experiment by disabling Use full category tree for product links or Template override, don't remember, the link was removed and was just showing Menu aliases. Now disabling SEF and other options in SEO settings, an email is still showing the full tree URL