News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Multi lang and VM2.0.22b

Started by tevez15, September 04, 2013, 17:06:09 PM

Previous topic - Next topic

tevez15

Hello friends..

I work in a new project with VM 2.0.22b, with two languages (EN and PT), but I have a problem with SEF.

The problem is, I have the website with PT language as default, and EN is secundary. When I enter in the website in PT, I navigate without any problem, the links are correct, goes to the correct menu ("Loja online" in PT), the products well to.
So, I change the language to EN, the problem begins. The links in VM are all wrong, show me something like "http://www.site.com/en/component/virtuemart/CATEGORY/PRODUCT?Itemid=283". In PT this don't happen.

If I disable the SEF, everthing works fine, and both languages.

I need fix this, someone can help me? Thank you.

Maxim Pishnyak

Maybe follow multilingual tutorial provided by virtuemart.net?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

tevez15

#2
I did that.. multiple times!

Yesterday, I found the problem, and the problem is in router.php.
I just need found where the link is generated to $products->link, because VM include in the link this two virtuemart_product_id=1&virtuemart_category_id=1.

If I can remove, in link to product the virtuemart_category_id, is work's well, in two languages.

Can you help find where the link is generated and set in array?

PS: In administrator/com_virtuemart/models/product.php I change this

$child->link = JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id . '&virtuemart_category_id=' . $child->virtuemart_category_id, FALSE);

to this:
$child->link = JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $virtuemart_product_id, FALSE);

In category view, is ok, but virtuemart do that in other views individually.

For the product, I can fix the problem, but to category I can't.

I don't understand what is wrong in this, to dont work with SEF:
$caturl = JRoute::_ ('index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $category->virtuemart_category_id, FALSE);