Joomla 3.4, VM 3.0.6.2 More Category, Product Details lang localization problems

Started by prokops, March 16, 2015, 09:39:08 AM

Previous topic - Next topic

prokops

Hello!

I can't make Virtuemart to language localize on Category and Product detail level.

Example:

English cat page: http://www.liponordic.com/index.php?option=com_virtuemart&view=category&virtuemart_category_id=20&Itemid=489&lang=en

Points at Norwegian associated cat page: http://www.liponordic.com/index.php?lang=no&Itemid=750&option=com_virtuemart

This however does not work and the user is routed to Norwegian shop front page.

The correct link should be: http://www.liponordic.com/index.php?option=com_virtuemart&view=category&virtuemart_category_id=20&Itemid=750&lang=no

I assume that this is a routing bug on the part of Virtuemart. Can you confirm ?

Cheers,
prokop

Studio 42

Hi,
Have you add a menu for each Virtuemart shop Main page in all your languages ?
If not, the Joomla language switcher don't work properly.

prokops

Hello Studio42

If you are asking if I have a "Front Page" Virtuemart menu in every language in my main menu module, then the answer yes.
They all point to: "index.php?option=com_virtuemart&view=virtuemart&productsublayout=0"

Can you think of other shortcomings or do I report this as a VM bug ?

Cheers,
prokop

Studio 42

Look in your template how the category view set links.
Perhaps your template don't set the itemId

your link for producdetails  is : http://www.liponordic.com/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=116&virtuemart_category_id=20

but shoud be : http://www.liponordic.com/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=116&virtuemart_category_id=20&Itemid=489

vm 3.6 use this :
in YOURSITE\components\com_virtuemart\sublayouts\products.php
$link = empty($product->link)? $product->canonical:$product->link;
echo JHtml::link($link.$ItemidStr,vmText::_ ( 'COM_VIRTUEMART_PRODUCT_DETAILS' ), array ('title' => $product->product_name, 'class' => 'product-details' ) );


for info $ItemidStr is set before:

$ItemidStr = '';
$Itemid = shopFunctionsF::getLastVisitedItemId();
if(!empty($Itemid)){
$ItemidStr = '&Itemid='.$Itemid;
}

prokops

Hello Studio42,

Thanks for the speedy answer. It can't be my template as I test on default templates to make sure it is a cross-template issue.

I now believe, that this is a Joomla routing issue. See my ticket for an slightly different but related issue: http://forum.joomla.org/viewtopic.php?f=728&t=880294

You are right that my example is confusing. Here is a simpler example:

If I use the URL you suggest: http://www.liponordic.com/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=116&virtuemart_category_id=20&Itemid=489&lang=en and try to use the flags, they point me at:

da: http://www.liponordic.com/index.php?lang=da&Itemid=687&option=com_virtuemart
se: http://www.liponordic.com/index.php?lang=se&Itemid=712&option=com_virtuemart
no: http://www.liponordic.com/index.php?lang=no&Itemid=750&option=com_virtuemart

As you see, the "&view=productdetails", "&virtuemart_category_id=" and "&virtuemart_product_id=" are dropped from the routing URL's.
I suspect a buggy language switcher or core routing issues.

I made a Joomla new ticket here: http://forum.joomla.org/viewtopic.php?f=728&t=880554

Cheers,
prokop

Studio 42

This is not a Joomla language problem !

If you want switch correctly, then you have to associate the joomla menus per language and actiavte the plugin(if it's not done)

Virtuemart cannot make a language association with the joomla language switcher, because the joomla lang switcher, look only for menu(as i know)

prokops

Hi Studio42

Are you suggesting that I have to make a joomla menu in every language for every product in my shop, in order to correctly associate via the language switcher ?

Cheers,
prokop

Studio 42

I Wrote for some time a language switcher, but this not work in Virtuemart, because virtuemart router use an instance for all languages.
I have report it to valerie for 1 Year but this was never fixed(this is why you cannot buy it).
With a little change you can use it, but this need some core changes,

If you are interested, whe can look together to have a language switcher module for all your shop(product,categories ...). With a little change in the router file.

Milbo

Quote from: prokops on March 22, 2015, 11:24:19 AM
Hi Studio42

Are you suggesting that I have to make a joomla menu in every language for every product in my shop, in order to correctly associate via the language switcher ?

Cheers,
prokop

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

jjk

The problem probably is related to your menus not being identical in all your languages. In English you have a top menu plus one in the left sidebar. For Norwegian, Dansk and Swedish the sidebar menu and therefore the menu item ids Joomla uses for switching languages are missing. I would suggest to try adding the side menu also for the three other languages and check if the Joomla router works correctly afterwards.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

Milbo

Guys, to underline

I have no clue about the multilanguage stuff, but what I learned is "Create for any shit a shadow menu item". and j2.5 had a fallback, the new router strategy of Hannes Papenberg is even more strict, no itemid => fallback to home. That is a joomla decision, not ours
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lindapowers

Hi Max and CIA the menu's and products not leading to the translated item but to the vm frontpage is something most of us learned to deal with. Not ideal of course but not a drama.

However I'm reading more and more people https://forum.virtuemart.net/index.php?topic=128604.0 with problems showing additional languages.

Is a bit strange that a joomla 3.x website appears perfectly translated and only fails in the vm shop pages: front, products and categories. This is happening to many of us recently so there is either and issue with the language switcher module, a cache issue or with the route file but there must be something causing this errors.

Regards

Studio 42

I think,it has something to do with the joomla languagefilter plugin. I had some issu with this plugin. Look the code inside,
Another to think, is the joomla $app->input vs jrequest, a time vmrequest does not work anymore, because jinput do not set anymore the jrequest internally.

jjk

I wonder if this Joomla patch would solve the problem: https://github.com/joomla/joomla-cms/pull/6569
Can't test myself, because I don't have the problem. Perhaps somebody who does have the language problem with Joomla 3.4.1 can test the patch with with a copy of the site using the Joomla patch tester extension: https://docs.joomla.org/Component_Patchtester_for_Testers
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

lindapowers

Quote from: jjk on March 26, 2015, 13:26:30 PM
I wonder if this Joomla patch would solve the problem: https://github.com/joomla/joomla-cms/pull/6569
Can't test myself, because I don't have the problem. Perhaps somebody who does have the language problem with Joomla 3.4.1 can test the patch with with a copy of the site using the Joomla patch tester extension: https://docs.joomla.org/Component_Patchtester_for_Testers

Just tested and solves an error with language code url being removed but the issue of vm remains.

Starting to think is more a problem with vm caching