News:

Looking for documentation? Take a look on our wiki

Main Menu

redirect after post a review

Started by badvoicila, March 15, 2013, 19:18:49 PM

Previous topic - Next topic

badvoicila

Before      http://www.example.com/bratari/bratari-shamballa/bratara-shambala-cu-7-margele-detalii

post review

After         http://www.example.com/component/virtuemart/bratara-shambala-cu-7-margele-detalii

I have some modules .... disappear after post comments. because I do not see component/virtuemar in the menu.

some help??



help

component/virtuemart    - category/child category   ???

romatvirtue

Hi there. I am having the same issue. Were you able to figure this out?

Does anyone else know the answer?

Please help. I need to fix this for customer.

Thank you in advance.

romatvirtue

Quote from: Don LeeJust use the default joomla template, which is standard, to test. If the same issue happens with that template, we will know that it's a problem of VM, otherwise it is problem of Gavick template.

So I guess the problem is here:

<form method="post" action="<?php echo JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$this->product->virtuemart_product_id.'&virtuemart_category_id='.$this->product->virtuemart_category_id) ; ?>" name="reviewForm" id="reviewform">

I just don't know how to let it stay on the same page.

phihong89

has anyone solved this problem yet?
I also encountered similar cases.
my way is to create a menu of products.
one or more other ways not

romatvirtue

Quote from: phihong89 on July 05, 2013, 11:46:21 AM
has anyone solved this problem yet?
I also encountered similar cases.
my way is to create a menu of products.
one or more other ways not

Hey. What do you mean by
Quotemy way is to create a menu of products.
one or more other ways not
?

phihong89

 ;) You crate menu each product in com virtuemart type product details.

phihong89

Hack components virtuemart -> controller -> file productdetails.php
function review()
replace

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

with

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

romatvirtue

Quote from: phihong89 on July 06, 2013, 06:54:10 AM
Hack components virtuemart -> controller -> file productdetails.php
function review()
replace

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

with

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

So to answer your own questions, YOU did solve it! Your solution perfectly work. I didn't like creating the menu items for each product simply because it is a lot of work. But the code worked just fine. You saved my life. Thank you so much!!! :)

So this was a solution to VM 2.0.20b version. To me this was a bug and I am surprised no one from VM team responded.

Thanks again!

romatvirtue

Quote from: phihong89 on July 06, 2013, 06:54:10 AM
Hack components virtuemart -> controller -> file productdetails.php
function review()
replace

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

with

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

Do you know how to create an override for this? I tried to use Joomla documentation on this, but could not get this to work.

Thank you in advance.