News:

Support the VirtueMart project and become a member

Main Menu

prodOnlyWLang no longer supported?

Started by Miku, July 15, 2016, 10:33:48 AM

Previous topic - Next topic

Miku

Hi
I've been using hidden configuration setting prodOnlyWLang in order to prevent not translated products from displaying on the multilanguage website.

Now using J! 3.5.1 VirtueMart 3.0.16 PHP Version: 5.6.21 the feature doesn't work - not translated products are visible on the front end. 

Is the setting obsolete?

Studio 42

I don't think, but if it's the case, this really remove a nice feature used by some multi language shops, because in some case you have product with another SKU depending the language for eg.

Milbo

please check the product model around line 287 ( begin function sortSearchListQuery)

$langFback = ( !VmConfig::get('prodOnlyWLang',false) and VmConfig::$defaultLang!=VmConfig::$vmlang and VmConfig::$langCount>1 );


Looks like the result is wrong here for your case. You could enable the debug in VM config and use below

$langFback = ( !VmConfig::get('prodOnlyWLang',false) and VmConfig::$defaultLang!=VmConfig::$vmlang and VmConfig::$langCount>1 );
vmdebug('My config and lang',(int)VmConfig::get('prodOnlyWLang',false),VmConfig::$defaultLang,VmConfig::$vmlang,VmConfig::$langCount);
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Miku

Hi,
Below is the result of debugging
vmdebug My config and lang Var1:

0

Var2:

pl_pl

Var3:

en_gb

Var4:

3

Actually there's no difference in debugging result whether I use the 'prodOnlyWLang' or not.. So, does it indicate that the setting doesn't work?

Milbo

When you activate the prodOnlyWLang, then you should get Var1: 1, but the rest is the same, right.

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