VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: zeroscorte on April 03, 2012, 19:39:06 PM

Title: Category problem with multilanguage site
Post by: zeroscorte 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,



Title: Re: Category problem with multilanguage site
Post by: jjk on April 05, 2012, 14:13:53 PM
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 (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")
Title: Re: Category problem with multilanguage site
Post by: zeroscorte 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!
Title: Re: Category problem with multilanguage site
Post by: mrmagoo on April 27, 2012, 12:14:26 PM
I have the same problem.
Title: Re: Category problem with multilanguage site
Post by: Studio 42 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.
Title: Re: Category problem with multilanguage site
Post by: zeroscorte 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
Title: Re: Category problem with multilanguage site
Post by: zeroscorte on May 08, 2012, 12:33:23 PM
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]
Title: Re: Category problem with multilanguage site
Post by: zeroscorte 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

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