VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: divined on June 11, 2017, 19:15:40 PM

Title: Product categories not working
Post by: divined on June 11, 2017, 19:15:40 PM
Hello everybody

I have this problem with a site I'm building using Virtuemart 3. Everything was working fine but suddenly the category layout stopped displaying the product categories hierarchies and is displaying all products flatly regardless of the category they belong to. I can see that all products belong to the correct category in the backend.

This is all very troubling since everything was working fine till yesterday. The only thing I upgraded was a German translation plugin.

Any ideas people?
Title: Re: Product categories not working
Post by: divined on June 11, 2017, 19:38:38 PM
This is the URL of the site. I've been building this for some time and it's demoralizing to see things break with no apparent reason.

http://www.gpb.gr

Title: Re: Product categories not working
Post by: Jörgen on June 11, 2017, 19:56:38 PM
Check the german translation plugin since this was the only thing you changed.

What vm, Joomla and php versions?

Jörgen @ Kreativ Fotografi
Title: Re: Product categories not working
Post by: divined on June 11, 2017, 20:06:28 PM
I'm using VM 3 and 3.7.2 Joomla.
Title: Re: Product categories not working
Post by: jenkinhill on June 11, 2017, 23:48:00 PM
Quote from: divined on June 11, 2017, 20:06:28 PM
I'm using VM 3

Is not accurate enough!  Precisely which version?  http://forum.virtuemart.net/index.php?topic=79799.0
Title: Re: Product categories not working
Post by: divined on June 12, 2017, 06:40:24 AM
Sorry for the previous inaccurate info. Here are the details:

joomla: 3.7.2
virtuemarkt: 3.2.2
php: 7.0.19

The problem is that now all products are displayed directly on the Category Layout (set to the Top Category level). Furthermore, when someone presses on the Details of a specific product I get a 404 error.

This is a live version of the site: http://www.gpb.gr

I believe it has something to do with the multipla language support but how could that possibly interfere with the products?
Title: Re: Product categories not working
Post by: jjk on June 12, 2017, 12:53:11 PM
After selecting the Greek flag, I see mixed languages. Please check in your database with phpmyadmin if your greek product descriptions are in the greek VM product tables. Just to make sure you didn't enter your greek language into the english product tables. Also, what exactly do you mean with 'German translation plugin'?
Title: Re: Product categories not working
Post by: divined on June 12, 2017, 13:34:19 PM
So what you mean to say is that there are two product tables. One for each language. I believe this behaviour commenced when I associated the two (English and Greek) category layout pages.

Running some queries on the database returned:

Greek product tables: 0 entries
English product tables: 25 entries
generic product tables: 25 entries

I have to say that I added the dual language support after entering several entries. But I'm still at mist as to the behaviour of the system.
Title: Re: Product categories not working
Post by: divined on June 12, 2017, 19:05:54 PM
Could my problem possibly be related to this:

http://forum.virtuemart.net/index.php?topic=137335.msg480777#msg480777

Title: Re: Product categories not working
Post by: jjk on June 12, 2017, 22:16:03 PM
Quote from: divined on June 12, 2017, 19:05:54 PM
Could my problem possibly be related to this:
http://forum.virtuemart.net/index.php?topic=137335.msg480777#msg480777
That's something you can check.  Eventually download and install the Greek language pack again from http://virtuemart.net/community/translations.

But from your description I think it is more likely that you added Greek product descriptions into the English (...en_gb) database tables. Use the mysql tool 'phpmyadmin' or i.e. 'HeidiSQL' to check that).

Check the data in these tables if the content is in the correct language:

xxxxx_virtuemart_categories_en_gb
xxxxx_virtuemart_manufacturercategories_en_gb
xxxxx_virtuemart_manufacturers_en_gb
xxxxx_virtuemart_paymentmethods_en_gb
xxxxx_virtuemart_products_en_gb
xxxxx_virtuemart_shipmentmethods_en_gb
xxxxx_virtuemart_vendors_en_gb

xxxxx_virtuemart_categories_el_gr
xxxxx_virtuemart_manufacturercategories_el_gr
xxxxx_virtuemart_manufacturers_el_gr
xxxxx_virtuemart_paymentmethods_el_gr
xxxxx_virtuemart_products_el_gr
xxxxx_virtuemart_shipmentmethods_el_gr
xxxxx_virtuemart_vendors_el_gr

In case you actually entered Greek into the English tables, you can export the table(s) with phMyAdmin, open the file with an editor like for example 'Notepad++' and exchange 'en'  language tags with 'it'. Then rename for example the file xxxxx_virtuemart_products_en_gb to xxxxx_virtuemart_products_el_gr and import it again.
Title: Re: Product categories not working
Post by: divined on June 13, 2017, 16:14:35 PM
Thank you very much

This is exactly what happened. One thing I still don't get though, is where do I select whether the product category/product description is for the English or Greek language. The only language setting I found is in the Shop settings section in which I added 'English/Greek' as languages.
Title: Re: Product categories not working
Post by: jjk on June 13, 2017, 19:01:14 PM
Quote from: divined on June 13, 2017, 16:14:35 PM
One thing I still don't get though, is where do I select whether the product category/product description is for the English or Greek language. The only language setting I found is in the Shop settings section in which I added 'English/Greek' as languages.

A little bit old, but still valid: https://docs.virtuemart.net/tutorials/multilingual-store/99-multilanguage-setup.html (https://docs.virtuemart.net/tutorials/multilingual-store/99-multilanguage-setup.html)
Perhaps also watch one or the other tutorial video on YouTube: https://www.google.de/search?q=virtuemart+multilanguage+setup&ie=utf-8&oe=utf-8&client=firefox-b&gfe_rd=cr&ei=KBlAWYC7ForZ8AeS5KCIDg#q=virtuemart+multilanguage+setup&tbm=vid (https://www.google.de/search?q=virtuemart+multilanguage+setup&ie=utf-8&oe=utf-8&client=firefox-b&gfe_rd=cr&ei=KBlAWYC7ForZ8AeS5KCIDg#q=virtuemart+multilanguage+setup&tbm=vid)
Title: Re: Product categories not working
Post by: divined on June 16, 2017, 18:53:10 PM
That was exactly it. After exporting and importing the products and product_categories English tables into the corresponding Greek ones everything worked.

Thank you very much!