25.05.2020 09:43
|
|
Warren84
Name: Thomas
08.09.2015
Posts: 64
|
Ajax Cart Probleme mit Warenkorb
Hi!
Ich habe den Ajax Cart erworben und das meiste klappt wunderbar.
Leider funktioniert das automatische Aktualisieren des Warenkorbs nicht. (Produkte wird erst nach Refresh angezeigt) und ebenso wird das Popup nicht dargestellt, obwohl in den Optionen aktiviert. Bild 1 im Anhang
Sobald das geht, werde ich mir noch die Darstellung anschauen müssen (siehe Bild 2 im Anhang), wo stelle ich das ein?
lg
288.jpg
Joomla: 3.9.18 JoomShopping: 4.18.4 PHP: 7.4.5 MySQL: 5.5.5-10.2.31 Website Url: https://www.kaesereitrachsel.ch/bestellen
|
|
25.05.2020 10:34
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25857
|
Aw: Ajax Cart Probleme mit Warenkorb
1. Use module Ajax cart or Advanced CartAjax
2.
Problem in server answer type
Try change
components\com_jshopping\lib\functions.php
chnage code:
function getOkMessageJson($cart){
$errors = JError::getErrors();
if (count($errors)){
return getMessageJson();
}else{
return json_encode($cart);
}
}
TO:
function getOkMessageJson($cart){
header('Content-Type: application/json');
$errors = JError::getErrors();
if (count($errors)){
return getMessageJson();
}else{
return json_encode($cart);
}
}
Last change: 25.05.2020 11:19
|
|
25.05.2020 10:42
|
|
Warren84
Name: Thomas
08.09.2015
Posts: 64
|
Aw: Ajax Cart Probleme mit Warenkorb
I'm using this module: JoomShopping - CartAjax
|
|
25.05.2020 11:19
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25857
|
Aw: Ajax Cart Probleme mit Warenkorb
2.
Problem in server answer type
Try change
components\com_jshopping\lib\functions.php
chnage code:
function getOkMessageJson($cart){
$errors = JError::getErrors();
if (count($errors)){
return getMessageJson();
}else{
return json_encode($cart);
}
}
TO:
function getOkMessageJson($cart){
header('Content-Type: application/json');
$errors = JError::getErrors();
if (count($errors)){
return getMessageJson();
}else{
return json_encode($cart);
}
}
|
|
25.05.2020 11:41
|
|
Warren84
Name: Thomas
08.09.2015
Posts: 64
|
Aw: Ajax Cart Probleme mit Warenkorb
Did the change, uploaded the file, cleared cache, but still the same behavior.
|
|
25.05.2020 12:03
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25857
|
Aw: Ajax Cart Probleme mit Warenkorb
https://www.kaesereitrachsel.ch/bestellen/cart/add?ajax=1&quantity=1&product_id=1&jshop_attr_id[1]=1&to=cart&_=1590400366547
Problem in utf-8 BOM
Save file as utf-8 without BOM (use example notepad ++)
Or
problem another file (example language file)
|
|
25.05.2020 13:01
|
|
Warren84
Name: Thomas
08.09.2015
Posts: 64
|
Aw: Ajax Cart Probleme mit Warenkorb
Worked with Atom, but now saved the file again with notepad++, did the same with de language file.
But still the same...
Everything else works fine, where do you see the error? and how can i solve it? never hab problems with anything like this before..
|
|
25.05.2020 13:25
|
|
Warren84
Name: Thomas
08.09.2015
Posts: 64
|
Aw: Ajax Cart Probleme mit Warenkorb
additional info: i re-installed the addon, its still doesnt work, but now, theres always a progress bar showing, which never goes away.. this also happens, when i want to delete something from the cart on the right side (by clicking on the X).
|
|
25.05.2020 14:30
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25857
|
Aw: Ajax Cart Probleme mit Warenkorb
You have a file saved as utf8+BOM
Response ajax
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Save file as Utf-8 without BOM (Which file have you changed yet?)
or
send me FTP access.(forum private msg.)
Last change: 25.05.2020 14:32
|
|
25.05.2020 14:52
|
|
Warren84
Name: Thomas
08.09.2015
Posts: 64
|
Aw: Ajax Cart Probleme mit Warenkorb
I recently changed the functions file, and the German language file in here: /com_jshopping/lang/override
Nothing else in my opinion..
I sent you a pm, thanks a lot for support.
|
|
25.05.2020 16:14
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25857
|
Aw: Ajax Cart Probleme mit Warenkorb
Fixed
file de-DE.php - saved as utf8+BOM
|
|
25.05.2020 16:52
|
|
Warren84
Name: Thomas
08.09.2015
Posts: 64
|
Aw: Ajax Cart Probleme mit Warenkorb
Wow, great, thanks a lot!
Last question, where do I change the missing break in here:
|
|
25.05.2020 17:00
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25857
|
Aw: Ajax Cart Probleme mit Warenkorb
Change your css
.ca_qty_input{
display: block;
}
|
|