Forum Archive - add to cart dont work with translated pages

add to cart dont work with translated pages
Sep 4, 2013 10:57 am by nohayestilo
Hi, my site is www.thecrazyfifties.es, works with joomla & virtuemart. I'm unable to add products to my cart in any language other than Spanish. fr.thecrazyfifties.es, en.thecrazyfifties.es and everyone else, dont add products to my cart. what should i do? Thanks.
Re: add to cart dont work with translated pages
Sep 5, 2013 8:20 am by nohayestilo
Hello, Any idea about this?
virtuemart add to cart dont work in gtranslate enterprise
Sep 6, 2013 5:39 pm by tope
Hello, my site is www.thecrazyfifties.es , works with joomla & virtuemart &gtranslate enterprise. I'm unable to add products to my virtuemart cart in any language other than Spanish. Spanish is the default language. fr.thecrazyfifties.es, en.thecrazyfifties.es and everyone else, dont add products to my cart. Can you help me? Thanks.
Re: virtuemart add to cart dont work in gtranslate enterpris
Sep 9, 2013 11:09 am by Yana
Hi, You will need to change vmSiteurl javascript variable and set vmSiteurl = '/' ; instead of vmSiteurl = 'http://www.thecrazyfifties.es/' ; Also if the response is JSON, then you need to use Content-Type: application/json header instead of text/html.
Re: virtuemart add to cart dont work in gtranslate enterpris
Sep 9, 2013 6:10 pm by tope
Can you tell me where I should change the variable vmSiteurl? can't find it at any place. Thank you very much
Re: virtuemart add to cart dont work in gtranslate enterpris
Sep 10, 2013 6:12 am by Yana
Hi, You should be able to find it in the source code of virtuemart plugin.
Re: virtuemart add to cart dont work in gtranslate enterpris
Sep 10, 2013 6:00 pm by tope
Hello, I've managed to change the variable vmSiteurl, Now add the product to cart but no popup appears informing that was added to the cart and the options to continue shopping or view cart.
Re: virtuemart add to cart dont work in gtranslate enterpris
Sep 11, 2013 10:35 am by Edvard
Good to hear that. When you add to cart it sends a request to http://www.thecrazyfifties.es/index.php ... mat=json... with the item details you are putting into cart. After that if it was done successfully it sends a response in JSON format. However the Content-Type header is set to a wrong value text/html. You will need to change it to be application/json. To do that you will need to find the script which responds with the JSON format and add header("Content-Type: application/json"); before the output. Thank you! P.S. If you do it successfully, please share your experience and details about what you have changed.

SIMILAR TOPICS

GT doesn't work...error 404 pageJan 28, 2019 5:36 pmReplies: 1Post by: vincenzodinuzzo
Add links to all translated posts on every Wordpress postJan 14, 2019 8:51 pmReplies: 5Post by: ptsniper
Combining manually translated French pages with GTranslateOct 16, 2018 2:24 pmReplies: 3Post by: oxygensmith
Any ideas on what I need to configure this to work correctlySep 15, 2018 4:44 pmReplies: 1Post by: milangomes
Cart stopped workingSep 1, 2018 12:10 pmReplies: 3Post by: willsonjayram

Try GTranslate with a free 15 day trial