VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: Allen_K on November 23, 2023, 11:00:09 AM

Title: Wrong URL provided in purchased product link on invoice
Post by: Allen_K on November 23, 2023, 11:00:09 AM
Hi,

We're running 4.2.0 10905.

I just learned that the product URLs provided in the product link on a customer invoice are linking to the non-sef internal VM component page, rather than the site's proper SEF page.

For example, a recent purchase of a new membership provided a product link to https://www.certifiedinfosec.com/index.php?option=com_virtuemart&view=productdetails&virtuemart_category_id=19&virtuemart_product_id=1&Itemid=6080. It should have linked to https://www.certifiedinfosec.com/estore/cis-membership/cis-body-of-certified-professionals-detail.

Any ideas on what I need to fix?

Thanks,

Allen
Title: Re: Wrong URL provided in purchased product link on invoice
Post by: hazael on November 23, 2023, 13:45:30 PM
Just modify your invoice template,
try to change JURI::root().'index.php?option=com_virtuemart...'  to JRoute::_('index.php?option=com_virtuemart...')

You can also automatically redirect to the SEF landing page

PS.
The script responsible for quantity controls is not working in your cart
If you have quantity limits, why do you use the option to add more products? - just the "add to cart" button is enough