VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: siristru on February 26, 2013, 15:04:11 PM

Title: Wrong path after notify form submit
Post by: siristru on February 26, 2013, 15:04:11 PM
Virtuemart 2.0.18a.

After submitting product notify form user is suppose to be redirected to product details page. And he is but in path one parameter is omitted: product category id. And thus link is wrong and looks like that:

component/virtuemart/a-m-s-g-the-principle-of-evil-becomes-the-ideal-of-the-promethean-detail.html (with Joomla! SEF on).

In file: components/com_virtuemart/controllers/productdetails.php

around line: 350 is:

$this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $data['virtuemart_product_id']), $msg);

It should be:

$this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $data['virtuemart_product_id'] . '&virtuemart_category_id=' . $data['virtuemart_category_id']), $msg);

This line was missing:

'&virtuemart_category_id=' . $data['virtuemart_category_id']