News:

Looking for documentation? Take a look on our wiki

Main Menu

Hide product in one but not all languages

Started by bpuschl, February 20, 2015, 13:05:35 PM

Previous topic - Next topic

bpuschl

I have an danish/english webshop with a couple of danish books, which I want to show in the danish webshop but not in the english.

I virtuemart 2.0.x/ joomla 2.5.x this is easy. Just don't translate it.

This seems not to be the case in Virtuemart 3.0/jooma 3.3.x. If this is the case, can anybody tell me how to do it?

jjk

Looks like the new behaviour is to display the (in your case) danish description to the british readers/customers. At the moment I don't know a solution to get the old behaviour back. I'll discuss that with the developers...
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

MKI-Miro

have you found the solution ?

I also need to hide some products in some languages

Studio 42

#3
Hi,
apparently this is posible by adding a settings in the config in Virtuemart 3.0.8 + :
simply adding one line of code in file administrator\components\com_virtuemart\views\config\tmpl\default_shop.php
after
<?php
echo VmHTML::row('checkbox','COM_VIRTUEMART_ADMIN_CFG_ENABLE_ENGLISH','enableEnglish',VmConfig::get('enableEnglish',1));
?>

add
<?php
echo VmHTML::row('checkbox','prodOnlyWLang','prodOnlyWLang',VmConfig::get('prodOnlyWLang',0));
?>

after adding the code :
>go in the config
>select first tab Shop
> go down to Language Settings
> and search for prodOnlyWLang and check it

I don't have full try all but this work in the category list. I think it's the more important.

If you need to add/remove translation and edit you can use my component
Tutorial : https://www.youtube.com/watch?list=PLYQ9rB_F7nGO3gNplLRDZl7jvfdcxO0tH&v=JFFKv2u4meY
Download : http://shop.st42.fr/en/products/vm-be-pro-batch-product-edit.htm
Greets,
Patrick

MKI-Miro

thank you, I added the script to the file and checked in configuation

but what now ? how does it work ?

Studio 42

MKI-Miro

TO not see a product in Virtuemart in a language, simply don't translate it.

If you need to remove the product in a language you have to use my tool and use the delete language function, virtuemart do not permit to remove a translation.
My tool use directly the list of product, you don't need to remove products one by one.(check the video)

Quote from: MKI-Miro on June 15, 2015, 21:37:41 PM
thank you, I added the script to the file and checked in configuation

but what now ? how does it work ?