News:

Support the VirtueMart project and become a member

Main Menu

Category problem with multilanguage site

Started by zeroscorte, April 03, 2012, 19:39:06 PM

Previous topic - Next topic

zeroscorte

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

#1
Quote from: zeroscorte on April 03, 2012, 19:39:06 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

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


Studio 42

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

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

I partially solved by modifying the .htaccess file (is not the best)

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

#7
With this change I had some problems with Virtuemart product

The code below is more correct for the Italian and English

#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]