VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Rsn on August 20, 2018, 11:49:16 AM

Title: Error in the links to the products
Post by: Rsn on August 20, 2018, 11:49:16 AM
VM 3.2.14
Joomla 3.8.10

In product module links are formed normally.
But when viewing a category or VM main page, sef URLs of products are generated not correctly.

When I fixed the code in the template, the links started working correctly.

File: /components/com_virtuemart/sublayouts/products.php (products_horizon, products_slim)

<a title="<?php echo $product->product_name ?>" href="<?php echo $product->link.$ItemidStr?>">

missing JRoute::_(...) in href
Title: Re: Error in the links to the products
Post by: Milbo on August 20, 2018, 13:36:32 PM
all right, the other product->links are done with the Jhtml::link function (which executes the JRoute::_)
Title: Re: Error in the links to the products
Post by: Rsn on August 20, 2018, 14:23:28 PM
When I did:
<a title="<?php echo $product->product_name ?>" href="<?php echo JRoute::_($product->link.$ItemidStr); ?>">
the links became correct.

Maybe it makes sense to foresee this point in the next update?

Title: Re: Error in the links to the products
Post by: Milbo on August 20, 2018, 22:50:24 PM
already done, just not committed.
Title: Re: Error in the links to the products
Post by: Rsn on August 21, 2018, 06:18:26 AM
Thank you for efficiency