Home › Forums › Quform WordPress › Redirect To Woocommerce Variable Product › Reply To: Redirect To Woocommerce Variable Product
February 15, 2021 at 3:00 pm #32542
patdundee
Participant
Hi Ally
As aboce i have now told the form to go direct to the product page (See code)
function my_success_redirect_url8($url, Quform_Confirmation $confirmation, Quform_Form $form)
{
$sytem='Windows';
$managed=$form->getValue('quform_x_x');
$user=$form->getValue('quform_x_x');
$pchoice=$form->getValueText('quform_x_x');
$pchoice=str_replace(',',' - ',$pchoice);
if ($managed == 'Managed') {
if ($user == 1 ) {
$cartID = xxxx;
} elseif($user == 5){
$cartID = xxxx;
} else {
$cartID = xxxx;
}
} else {
if ($user == 1) {
$cartID = xxxx;
} elseif($user == 5) {
$cartID = xxxx;
} else {
$cartID = xxxx;
}
}
$url=('https://www.mydomain.co.uk/product/palmtest);
echo $url;
return $url;
}
add_action('quform_confirmation_redirect_url_8_1', 'my_success_redirect_url8', 10, 3);
Whenever i post the form it still is going to
https://www.mywebaddress/?add-to-cart=6588
but the action tells it to do something different.
I have tried this on different browsers on 5 different machines that have never been to my site and the result is the same
I have cleared all server cache, system cache, %temp% on system and all browser cache
I am really puzzeled now 🙂
Thanks
Patrick