News:

Support the VirtueMart project and become a member

Main Menu

error after update

Started by Grisu74, October 05, 2016, 22:59:58 PM

Previous topic - Next topic

Studio 42

Joomla Menu item type, is virtuemart>user

For the path, yes its JOOMLASITE/components/com_virtuemart/controllers/productdetails.php

Grisu74

Quote from: Studio 42 on November 18, 2016, 15:15:28 PM
Joomla Menu item type, is virtuemart>user

For the path, yes its JOOMLASITE/components/com_virtuemart/controllers/productdetails.php

I do not find the code.


Joomla 3.6.2
If you want to save money buy online at Veneziane & Plissé
www.venezianeplisse.com

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Grisu74

Joomla 3.6.2
If you want to save money buy online at Veneziane & Plissé
www.venezianeplisse.com

Studio 42

Hi Max, using for reviews link :
$virtuemart_category_id = vRequest::getInt('virtuemart_category_id',0);
// $this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id, FALSE), $msg);
$this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id.'&virtuemart_category_id='.$virtuemart_category_id, FALSE), $msg);

tested and work.

Studio 42

For the other problem, this is the breaking line :
if ( isset($jmenu['user']) and !isset($query['Itemid']) ) $query['Itemid'] = $jmenu['user'];
itemId is always set, so this never work
I checked for existing menu link and it exist "virtuemart-account-maintenance", but "user" is always used and redirect as a non existing category by Joomla com_content, but cart have a itemid too, but is not set so Joomla use default main page itemid .

So i changed in router file
// if ( isset($jmenu['user']) and !isset($query['Itemid']) ) $query['Itemid'] = $jmenu['user'];
if ( isset($jmenu['user']) ) $query['Itemid'] = $jmenu['user'];


And all is working now.         

Milbo

Hmm Patrick, I wonder which router file do you edit. The router in the svn has

case 'user';

if ( isset($jmenu['user'])) $query['Itemid'] = $jmenu['user'];
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

Quote from: Studio 42 on November 21, 2016, 17:27:27 PM
Hi Max, using for reviews link :
$virtuemart_category_id = vRequest::getInt('virtuemart_category_id',0);
// $this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id, FALSE), $msg);
$this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id.'&virtuemart_category_id='.$virtuemart_category_id, FALSE), $msg);

tested and work.

Where? Do you mean controllers/productdetails.php
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

This is vm 3.0.18, September 20 2016 from the http://www.venezianeplisse.com/test site

Studio 42

Quote from: Milbo on November 21, 2016, 19:37:26 PM
Quote from: Studio 42 on November 21, 2016, 17:27:27 PM
Hi Max, using for reviews link :
$virtuemart_category_id = vRequest::getInt('virtuemart_category_id',0);
// $this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id, FALSE), $msg);
$this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id.'&virtuemart_category_id='.$virtuemart_category_id, FALSE), $msg);


Yes product details controller in public function review () {
tested and work.

Where? Do you mean controllers/productdetails.php

Yes in controller public function review () {

Milbo

Quote from: Milbo on November 21, 2016, 18:57:19 PM
Hmm Patrick, I wonder which router file do you edit. The router in the svn has

case 'user';

if ( isset($jmenu['user'])) $query['Itemid'] = $jmenu['user'];

Quote from: Studio 42 on November 21, 2016, 19:41:27 PM
This is vm 3.0.18, September 20 2016 from the http://www.venezianeplisse.com/test site

Then it did not update. You fixed old code. :-(
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

Quote from: Studio 42 on November 21, 2016, 19:42:32 PM
Quote from: Milbo on November 21, 2016, 19:37:26 PM
Quote from: Studio 42 on November 21, 2016, 17:27:27 PM
Hi Max, using for reviews link :
$virtuemart_category_id = vRequest::getInt('virtuemart_category_id',0);
// $this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id, FALSE), $msg);
$this->setRedirect (JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id.'&virtuemart_category_id='.$virtuemart_category_id, FALSE), $msg);


Yes product details controller in public function review () {
tested and work.

Where? Do you mean controllers/productdetails.php

Yes in controller public function review () {

okey, I add it, cant hurt.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/