Problem getting additional Checkbox in the checkout_shipping.php into $Session variable
Posted: Wed Jan 19, 2022 8:43 am
Hi All
I made a hook, where I placed a checkbox before the submit button on the checkout_shipping.php (optional shipping addition)
Everything appears fine, it's inside the <form> but my problem is, I cannot get it in the $_SESSION so I can work with it on orders_total.
What do I have to do, that the POST of the checkout_shipping.php will be in the $_Session? ( i saw that the checkout_shipping.php post the option chose to itself, but I do not get where it's processed and where I have to write the $_POST['transport_insurance'] into the $_Session['transport_insurance']
my idea is, to make a additional hook for the checkout_shipping.php where the session variable is written (input_fields are processed) and write there something like:
but I don't know which hook I can use which is before the redirect to checkout_payment.php
thank you for helping me out
I made a hook, where I placed a checkbox before the submit button on the checkout_shipping.php (optional shipping addition)
Everything appears fine, it's inside the <form> but my problem is, I cannot get it in the $_SESSION so I can work with it on orders_total.
What do I have to do, that the POST of the checkout_shipping.php will be in the $_Session? ( i saw that the checkout_shipping.php post the option chose to itself, but I do not get where it's processed and where I have to write the $_POST['transport_insurance'] into the $_Session['transport_insurance']
my idea is, to make a additional hook for the checkout_shipping.php where the session variable is written (input_fields are processed) and write there something like:
Code: Select all
if (tep_not_null($_POST['transport_insurance'])) {
$_SESSION['transport_insurance'] = isset($_POST['transport_insurance']) ? true : false;
}thank you for helping me out