I know this is an old post, but I have a similar redirect issue I'm trying to overcome with Cookielist, so hope this is the appropriate place to air my problem.
I have a store where I'm using cookielist to add items to the basket. I also want to have a 'buy it now' button to add the item to cookeList and then redirect to the basket page.
cookielist doesn't have a &redirectTo parameter and I think that would be the best way to solve the problem. Maybe it is for the login scenario too?
This is what I'd like to do in my call:
[[!addToCookieList?
&tpl=`chnk_addtoBasket_Button`
&addText=`Buy it Now`
&redirectTo=`123`
]]
Here's a segment of the code from cookieList plugin
if($addValue || $removeValue) {
$error = (isset($c['cl_check'])) ? false : true;
$url = $cookielist->url($error);
// Creates/updates the cookie and its value
$value = implode(',', $cookieValues);
$duration = time() + $modx->getOption('cookielist.cookie.duration',null,2592000);
setcookie($cookieName, $value, $duration, '', false, false);
$modx->sendRedirect($url);
}
Now, I think somewhere in here I can pull in the redirectTo parameter to:
$url = $modx->makeUrl(redirectURL);
So, I want to makeUrl if &redirect para is populated.
Any help with my coding would be greatly appreciated. If I figure it out, I'll post my code.