Page 1 of 1

How to get form return value to stay on same page for cart module

Posted: 15 Oct 2018, 19:01
by maintainthedomain
Hi

I added a delete button to the cart module (extracted from cart_checkout.php) ...it seemed to work at first, but now I realized that the page jumps back to index.php (without parameters) every time I delete an item because the return value of the form is not set...

I tried to set it to $_SERVER['PHP_SELF'] and JUri(...) and what not without luck...the best result so far I got with $_SERVER['HTTP_REFERRER']...
(all base64 encoded...)

Also tried to use PhocacartRoute::getCategoryRoute(....); but got nowhere...

I didnt set any form action (action="") as well.

Can you give me noob again a heads-up how to solve this, so that I stay on the same page, when an item is deleted??

Thanks in advance! :)

Re: How to get form return value to stay on same page for cart module

Posted: 16 Oct 2018, 23:35
by maintainthedomain
okay, solved this with jquery...

just used something like jQuery(".ph-cart-small-box input[name=return]").val(btoa(window.location.href))....

Re: How to get form return value to stay on same page for cart module

Posted: 24 Oct 2018, 13:45
by Jan
Ok, thank you for the info.

Jan