VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: rizecorp on November 19, 2015, 10:58:32 AM

Title: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: rizecorp on November 19, 2015, 10:58:32 AM
Hi All,

I need to remove a part of the url from the virtuemart links.

When I unchecked the "SEO Disabled" option from Components => VirtueMart => Configuration => SEO tab

We are getting the virtuemart url's with the /lang/en-GB for all virtuemart page links.
Due to this "lang/en-GB" at the end of the virtuemart page links, all the virtuemart pages are redirecting to "Virtuemart Frontpage".

For Example:
here are the 'View Cart' Page links for the different languages as below:

http://www.domain.com/view-cart/lang/en-GB
http://www.domain.com/es/ver-cesta/lang/es-ES
http://www.domain.com/fr/voir-le-panier/lang/fr-FR

From the above url's i need to take off from the "/lang" till the end of the url. I have tested by removing the "/lang/en-GB" tags for some urls and they are working fine.
We do not want to use "Redirect 301" for each and every virtuemart page link, as we have 100's of page links. I need simple code to be able to remove the /lang/en-GB type tags from all the virtuemart page links.


Version Details:
Joomla : 3.4.5 (migrated from 2.5)
Virtuemart: 3.0.12
PHP: 5.5.30
MySql: 5.5.46


Thanks in advance,
rizecorp
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: GJC Web Design on November 19, 2015, 16:08:03 PM
it is only on your cart pages  ... have you made a joomla menu to it?
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: rizecorp on November 20, 2015, 06:37:01 AM
Thank you for reply GJC.

Yes i have created menu items.

Please suggest if there is an alternate  solution.

Thanks in advance,
rizecorp
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: GJC Web Design on November 20, 2015, 10:50:54 AM
Nope .. just tried..

on a std install with a menu titled Cart  I get

http://test.xxx.com/de/cart
http://test.xxx.com/en/cart

have you 3rd party sef ext or something?
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: rizecorp on November 20, 2015, 11:06:19 AM
Hi GJC,

Thanks for fast reply, i have not used any third party SEF extensions. I have used Falang for language translation, EasyCalcPlus+ plugin for captcha. Only those extensions are working parallelly with virtuemart. Other 3rd party components installed are FoxContact, Acymailing, Akeeba backup, Chronoforms, Google Map Locator, JCE Editor, jsecure authentication, Ohanah, Phoca Gallery.

Thanks in advance,
rizecorp
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: GJC Web Design on November 20, 2015, 11:09:19 AM
must be Falang then..  I never use any 3rd party "translation" on my sites.. just the standard Joomla/VM systems
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: rizecorp on November 25, 2015, 14:08:50 PM
Hi GJC,

Thanks for fast reply, These /lang/en-GB like string are getting only for virtuemart URL's.

Please let me know from which file they are adding. Am sure they will add to the URL only
When I unchecked the "SEO Disabled" option from Components => VirtueMart => Configuration => SEO tab

Please suggest the an alternate solution.

Thanks in advance,
rizecorp
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: Studio 42 on November 25, 2015, 21:38:58 PM
Hi rizecorp,
Why you use falang?
This is not need for VM and for Joomla, you have Josetta :
http://extensions.joomla.org/extensions/extension/languages/multi-lingual-content/josetta-community full integrate in your Site
Why "SEO disabled" ?
The simpliest way is to use SEO enabled. Then your links are correct.
http://www.domain.com/view-cart/
http://www.domain.com/es/ver-cesta/
http://www.domain.com/fr/voir-le-panier/
As you want.
Patrick
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: rizecorp on November 26, 2015, 07:06:30 AM
Hi Studio 42,

Thank you for your reply,
You are right SEO enabled will solve the issue, because of this "register (virtuemart)" not registering & "Product detail page" is not working when clicking on the other language flags to translate.

Please suggest any alternate solution.

Thanks in advance,
rizecorp
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: Studio 42 on November 26, 2015, 17:47:23 PM
Hi
If your problem is to switch flag links in front-end , i have wrote a module to solve this:
See http://shop.st42.fr/en/products/multi-language-for-virtuemart.htm .
It work for products,categories and manufacturer.
Regards,
Patrick K
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: Milbo on November 26, 2015, 23:14:41 PM
http://docs.virtuemart.net/manual/general-concepts/214-multilanguage-and-multlingual.html

The  joomla plugin "System - Language Filter" has an option to automatically change the language of a user who just logged in, when a menuitem is not set  for any language, the customer may be redirected to home. To prevent this, disable the feature "Automatic Language Change". Furthermore to prevent errors with payment plugins, the feature "Remove URL Language Code" should be enabled.
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: rizecorp on December 01, 2015, 10:09:50 AM
Hi Milbo,

Thank you for your feedback.

I have verified my settings as per you post, my settings is also same as you mentioned. More over language switching is not working only on product detail pages and that to only for some products. For some products language switching is also working fine. Other than product detail pages, remaining all other pages are working fine including language translations as well.

Please suggest any alternate solution.

Thanks in advance,
rizecorp
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: Studio 42 on December 01, 2015, 10:23:56 AM
Hi rizexorp,
Rememer to translate all products, categories, manufacturers ... to be sure you have no issue
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: rizecorp on December 03, 2015, 08:47:16 AM
Hi Studio 42,

Thanks for you feedback!

As per you suggestion, we have gone through the translations of the below tables with their all respective language tables:

#_virtuemart_categories
#_virtuemart_manufacturercategories
#_virtuemart_manufacturers
#_virtuemart_paymentmethods
#_virtuemart_products
#_virtuemart_shipmentmethods
#_virtuemart_vendors

I have verified and found only "#_virtuemart_products" & "#_virtuemart_shipmentmethods" language tables are not equal translations and we have added all the translations and checked the language switching from front end, still there is an issue on product detail pages only for some products.

In my research i have found that renaming router.php to @router.php at "/components/com_virtuemart/", entire site is working fine except the virtuemart urls are not SEF as we have renamed the router file.

Please suggest any alternative solution for this.

Thanks in advance,
rizecorp
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: GJC Web Design on December 03, 2015, 11:38:43 AM
well as we have all said.. on a std install the urls are fine...

so the difference? I assume your Falang if your still using it..
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: jjk on December 03, 2015, 17:04:48 PM
Do you have the Joomla 'System language filter' plugin enabled or still the 'Falang language filter'? Also, did you clear Joomla site cache and browser cache?
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: Studio 42 on December 03, 2015, 18:52:26 PM
Quote from: rizecorp on December 03, 2015, 08:47:16 AM
Hi Studio 42,

Thanks for you feedback!

As per you suggestion, we have gone through the translations of the below tables with their all respective language tables:

#_virtuemart_categories
#_virtuemart_manufacturercategories
#_virtuemart_manufacturers
#_virtuemart_paymentmethods
#_virtuemart_products
#_virtuemart_shipmentmethods
#_virtuemart_vendors

I have verified and found only "#_virtuemart_products" & "#_virtuemart_shipmentmethods" language tables are not equal translations and we have added all the translations and checked the language switching from front end, still there is an issue on product detail pages only for some products.

In my research i have found that renaming router.php to @router.php at "/components/com_virtuemart/", entire site is working fine except the virtuemart urls are not SEF as we have renamed the router file.

Please suggest any alternative solution for this.

Thanks in advance,
rizecorp


If some switching is not working, then you have 2 potential problem:
Your Joomla menu is bad set or you have name collision for some routes/alias.
Of course, if you remove the router.php, it's not possible to have this problem, because this use the ID and it's always unique.

This is not any alternative as setting corretly your alias and menu. I have Shops with thousands of product and have not your problem, it's only a bad understand.
If you use faLang, this can be a potential problem too. Using Josetta component is more safe.

If you cannot solve your problem, you have many developper here that can do it for you in some hours. As GJC, Me or the Virtuemart team itself do paid support.

Regards,
Patrick
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: rizecorp on December 07, 2015, 09:51:25 AM
Hi jjk,

Thank you for your reply,

Yes we have 'System language filter' plugin enabled but there is no plugin installed for "Falang language filter". Is this setting in the Falang extensions. My site has the following extensions regarding "FALANG".

FaLang Package
FaLang (component)
FaLang Language Switcher(module)
System - FaLang Database Driver (plugin)
System - FaLang Quick Jump (plugin)

Thanks in advance,
rizecorp
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: rizecorp on December 07, 2015, 09:57:48 AM
Hi Studio 42,

Thank you for your reply,

If some switching is not working, then you have 2 potential problem:
Your Joomla menu is bad set or you have name collision for some routes/alias.

I have checked the menus and aliases and found there is some duplicates for viewcart, register from virtuemart links.
1.  We have checked by unpublishing duplicate menu item types.
2.  We have checked by trashing duplicate menu item types.
3.  We have emptied from the trash as well.

But still issue remains the same. Any suggestions please.

Thanks in advance,
rizecorp
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: GJC Web Design on December 07, 2015, 12:20:45 PM
either 1. get rid of falang

or 2. ask falang
Title: Re: Need to remove part of the url(/lang/en-GB) from the virtuemart links
Post by: Studio 42 on December 07, 2015, 17:48:08 PM
Quote from: GJC Web Design on December 07, 2015, 12:20:45 PM
either 1. get rid of falang

or 2. ask falang
+1 :)