Need to remove part of the url(/lang/en-GB) from the virtuemart links

Started by rizecorp, November 19, 2015, 10:58:32 AM

Previous topic - Next topic

rizecorp

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

GJC Web Design

it is only on your cart pages  ... have you made a joomla menu to it?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

rizecorp

Thank you for reply GJC.

Yes i have created menu items.

Please suggest if there is an alternate  solution.

Thanks in advance,
rizecorp

GJC Web Design

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?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

rizecorp

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

GJC Web Design

must be Falang then..  I never use any 3rd party "translation" on my sites.. just the standard Joomla/VM systems
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

rizecorp

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

Studio 42

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

rizecorp

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

Studio 42

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

Milbo

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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

rizecorp

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

Studio 42

Hi rizexorp,
Rememer to translate all products, categories, manufacturers ... to be sure you have no issue

rizecorp

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

GJC Web Design

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..
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation