Appointment widget do not work properly
This support request was posted in Paeon by psluja
- psluja February 9, 2014 at 12:22 pm
Hi!
I have problem with refreshing home page, after I hit Submit Request. Everything is ok – I get an e-mail with form data, but my home page is waiting and never refresh.
There are 2 different behaviors depending on translation I think:
When I go to my page trough domain mysitename.pl – Works, but never refresh in full when hit Submit Request (Wyślij in polish). Default lang is Polish.
When I go to my page trough domains:
pl.mysitename.pl
en.mysitename.pl
Works, but nothing visualy happend after hiting Submit Request. Some Ajax problem?I use qTranslate plugin.
Do You know what can be wrong?
Best regards
Piotr Słuja
Juanfra Aldasoro February 9, 2014 at 3:53 pmHi Piotr,
Thanks for writing. I’ve been through your site and doing some tests it seems that the plugin is causing some conflict when using AJAX.
Is this the only plugin that you are using?
Best,
Juan.psluja February 9, 2014 at 5:43 pmHi Juanfra,
Thank You for fast anwer. I’m using qTranslate and qTranslate slug which may conflict with ajax calls.
I read that to fix it I need find call for example “nice_appointment_ajax.php” and add lang info: “nice_appointment_ajax?lang=”.qtrans_getLanguage() but I do not know is it right solution and where can I change it.
Can You tell me where can I try to add lang info?
Best regards,
Piotr Słuja
Juanfra Aldasoro February 9, 2014 at 6:53 pmHi Piotr,
It sounds like that is the problem.
The ajax functionality for the appointments use the ajax WordPress template (admin-ajax.php) with the jQuery ajax trigger. You can find the code in the function nice_appointment_js() in the file /includes/scripts.php
Regards,
Juan.psluja February 10, 2014 at 9:21 amHi Juanfra,
Now is working 🙂 Thank You. I changed line in nice_appointment_js() function
from:
url: “admin-ajax.php”,
to:
url: “admin-ajax.php?lang=”,Best regards.
Piotr Słuja
Juanfra Aldasoro February 10, 2014 at 1:53 pmAwesome 🙂
Thanks for the follow up. Check also that you make the same for the contact_js function, because I saw the same was happening there.
Have a nice day,
Juan.
You must be logged in to reply to this topic.