Author Topic: Category problem with multilanguage site  (Read 3483 times)

zeroscorte

  • Beginner
  • *
  • Posts: 11
Category problem with multilanguage site
« on: April 03, 2012, 19:39:06 pm »
Hi there,
i'm using virtuemart as multilanguage catalogue where a few products have some joomla modules in them. The structure will be:

FRONT PAGE ITA
-- FIRST CATEGORY LAYOUT ITA
-- SECOND CATEGORY LAYOUT ITA
---- PRODUCT 1 ITA
---- PRODUCT 2 ITA

FRONT PAGE ENG
-- FIRST CATEGORY LAYOUT ENG
-- SECOND CATEGORY LAYOUT ENG
---- PRODUCT 1 ENG
---- PRODUCT 2 ENG

The problem is that when i'm creating in Joomla the menu link about "product details layout" i see in the final url the id strings, e.g.: ?virtuemart_product_id=26&virtuemart_category_id=2

How can i make that string disappear?

I've started with 2.0.1 K passing to the 2.0.2 as a normal Joomla extension installation, do i have to do something to allineate the database to the new version or this bug stays in all releases?


Many thanks,




jjk

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3648
  • using Matomo instead of Google Analytics
Re: Category problem with multilanguage site
« Reply #1 on: April 05, 2012, 14:13:53 pm »
The problem is that when i'm creating in Joomla the menu link about "product details layout" i see in the final url the id strings, e.g.: ?virtuemart_product_id=26&virtuemart_category_id=2

Make shure you have both languages selected in VM2 configuration. See here: http://forum.virtuemart.net/index.php?topic=99817.msg329974#msg329974
Check if all english and italian menu items are correctly assigned to "it" or "gb" (not "all")
You need a menu item in both languages pointing to your categories and your cart and in your case to the product details pages. (Don't forget to select the specific product when you set the menu item in Joomla 2.5.4)
Products can only be associated switch from english product description to second language product description) if there is a menu item pointing to the product in all published languages (switch from english product description to second language product description), because Joomla 2.5.x language switcher works with menu items.

If you got this correct, the SEF url should be back.
(It works for me - Only difference is that I use "Categories Layout" instead of "Category Layout 1, Category Layout 2")
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

zeroscorte

  • Beginner
  • *
  • Posts: 11
Re: Category problem with multilanguage site
« Reply #2 on: April 27, 2012, 09:09:11 am »
Hi,

I've made the correction you suggested making the web structure has you said, i've also update vituemart to 2.0.6 but I'm still getting the URL probs. Do you have any other ideas? Thanks!

mrmagoo

  • Beginner
  • *
  • Posts: 14
Re: Category problem with multilanguage site
« Reply #3 on: April 27, 2012, 12:14:26 pm »
I have the same problem.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4335
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Category problem with multilanguage site
« Reply #4 on: April 27, 2012, 17:02:06 pm »
Hi,
do you have the correct link+?virtuemart_product_id=26&virtuemart_category_id=2  on SEF only ?
I think the product Route in menu is not finish.
For category, if you can try the category Module from Vm, i mean it's better especially if you activate cache or use multilanguage.

zeroscorte

  • Beginner
  • *
  • Posts: 11
Re: Category problem with multilanguage site
« Reply #5 on: May 03, 2012, 10:16:20 am »
Yes Electrocity,

my link is exactly as you said with SEO on. About the structure i've respected the jjk's indications and i've tried to activate the VM categories module but nothing has changed!

Maybe if i can send you, in private, a direct url to the site you can give a better look!

Thanks

zeroscorte

  • Beginner
  • *
  • Posts: 11
Re: Category problem with multilanguage site
« Reply #6 on: May 08, 2012, 12:33:23 pm »
I partially solved by modifying the .htaccess file (is not the best)

Code: [Select]
RewriteEngine On

#Redirect per virtuemart urk schifosi
RewriteCond %{QUERY_STRING} (.*)(^virtuemart_product_id=[a-zA-Z0-9]+&?|^&virtuemart_product_id=[a-zA-Z0-9]+&|&virtuemart_product_id=[a-zA-Z0-9]+)(&?.*)
RewriteRule (.*) %{REQUEST_URI}?%1%3 [L,R=301]
RewriteCond %{QUERY_STRING} (.*)(^virtuemart_category_id=[a-zA-Z0-9]+&?|^&virtuemart_category_id=[a-zA-Z0-9]+&|&virtuemart_category_id=[a-zA-Z0-9]+)(&?.*)
RewriteRule (.*) %{REQUEST_URI}?%1%3 [L,R=301]

zeroscorte

  • Beginner
  • *
  • Posts: 11
Re: Category problem with multilanguage site
« Reply #7 on: May 09, 2012, 09:51:51 am »
With this change I had some problems with Virtuemart product

The code below is more correct for the Italian and English

Code: [Select]
#Redirect per virtuemart url schifosi
#it
RewriteCond %{QUERY_STRING} (.*)(^virtuemart_product_id=[a-zA-Z0-9]+&?|^&virtuemart_product_id=[a-zA-Z0-9]+&|&virtuemart_product_id=[a-zA-Z0-9]+)(&?.*)
RewriteRule (^it.*) %{REQUEST_URI}?%1%3 [L,R=301]
RewriteCond %{QUERY_STRING} (.*)(^virtuemart_category_id=[a-zA-Z0-9]+&?|^&virtuemart_category_id=[a-zA-Z0-9]+&|&virtuemart_category_id=[a-zA-Z0-9]+)(&?.*)
RewriteRule (^it.*) %{REQUEST_URI}?%1%3 [L,R=301]
#en
RewriteCond %{QUERY_STRING} (.*)(^virtuemart_product_id=[a-zA-Z0-9]+&?|^&virtuemart_product_id=[a-zA-Z0-9]+&|&virtuemart_product_id=[a-zA-Z0-9]+)(&?.*)
RewriteRule (^en.*) %{REQUEST_URI}?%1%3 [L,R=301]
RewriteCond %{QUERY_STRING} (.*)(^virtuemart_category_id=[a-zA-Z0-9]+&?|^&virtuemart_category_id=[a-zA-Z0-9]+&|&virtuemart_category_id=[a-zA-Z0-9]+)(&?.*)
RewriteRule (^en.*) %{REQUEST_URI}?%1%3 [L,R=301]