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.
Maybe follow multilingual tutorial provided by virtuemart.net?
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);