VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Miku on July 15, 2016, 10:33:48 AM

Title: prodOnlyWLang no longer supported?
Post by: Miku on July 15, 2016, 10:33:48 AM
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?
Title: Re: prodOnlyWLang no longer supported?
Post by: Studio 42 on July 15, 2016, 21:58:59 PM
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.
Title: Re: prodOnlyWLang no longer supported?
Post by: Milbo on July 19, 2016, 23:08:52 PM
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);
Title: Re: prodOnlyWLang no longer supported?
Post by: Miku on July 20, 2016, 07:53:54 AM
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?
Title: Re: prodOnlyWLang no longer supported?
Post by: Milbo on July 20, 2016, 08:25:24 AM
When you activate the prodOnlyWLang, then you should get Var1: 1, but the rest is the same, right.