Page 1 of 1
Ajax add to cart - non SEF links in cart
Posted: 01 Nov 2023, 20:57
by mino182
Ahoj, keď pridám tovar do košíka cez ajax, adresy v košíku sa zmenia na "nie SEF". Čo by nebol až taký problém ale tie adresy nie sú platné a idú rovno do 404
video:
https://i.imgur.com/TRyIADZ.mp4
Re: Ajax add to cart - non SEF links in cart
Posted: 01 Nov 2023, 21:38
by Nidzo
I can confirm that. But after page refresh or when visit another page it becomes SEF.
Re: Ajax add to cart - non SEF links in cart
Posted: 03 Nov 2023, 17:46
by Jan
Ahoj, díky za info.
Stáhni si následující soubor
https://www.phoca.cz/forumfiles/cart_cart.php.zip
a nakopíruj soubor cart_cart.php ze ZIPu do následující složky:
components/com_phocacart/layouts/
Mělo by to být opraveno, viz zde:
https://www.phoca.cz/phocacartdemo/
Dej m prosím vědět.
===
Download the following file
https://www.phoca.cz/forumfiles/cart_cart.php.zip
and copy the cart_cart.php file from the ZIP to the following folder:
components/com_phocacart/layouts/
It should be fixed, see here:
https://www.phoca.cz/phocacartdemo/
Please let me know.
Díky/Thanks.
Re: Ajax add to cart - non SEF links in cart
Posted: 03 Nov 2023, 18:53
by mino182
Ahoj, súbor sa mi nedá stiahnuť. error 500.
Re: Ajax add to cart - non SEF links in cart
Posted: 03 Nov 2023, 18:55
by christine
Hi mino,
have already informed Jan before your post. Thank you.
Kind regards
Christine
Re: Ajax add to cart - non SEF links in cart
Posted: 03 Nov 2023, 22:05
by mino182
pomohlo mi zmeniť v tom súbore
Code: Select all
PhocacartRoute::getItemRoute((int)$v['id'], (int)$v['catid'], $v['alias']);
na
Code: Select all
Route::_(PhocacartRoute::getItemRoute((int)$v['id'], (int)$v['catid'], $v['alias']));
Re: Ajax add to cart - non SEF links in cart
Posted: 06 Nov 2023, 02:44
by Jan
Hi, thank you for the info, the server has some specific protection, the new link is:
https://www.phoca.cz/forumfiles/cart_cart.zip
Yes, the Router class added to the link is the right way.
Jan
Re: Ajax add to cart - non SEF links in cart
Posted: 06 Nov 2023, 13:26
by Nidzo
Works great! Thanks!
Re: Ajax add to cart - non SEF links in cart
Posted: 07 Nov 2023, 01:03
by Jan
Hi, thank you for the info.