Hi guys, I hope you can help me,
I connected some Fabric screens with redirects to build a taylor made shopping cart. In the first attempt to register and buy something, a session variable is set in the first page but not accessible in the next pages. However if the shopping cart is selected a second or more times after in the same session, everything runs well. Please find the screen flow below
session_start();
$_SESSION['shoppingcart_id'] = $this->data['cexman_shoppingcart_header___id_raw'];
while (!is_numeric($_SESSION['shoppingcart_id'])) {
$_SESSION['shoppingcart_id'] = $this->data['cexman_shoppingcart_header___id_raw'];
} The While is only for testing, to make absolutely sure that the variable is set.
return $_SESSION['shoppingcart_id'];
The first time in a session I run these screens, value of Test is empty, in subsequent runs in the same session, the right shoppingcart header id is shown. Please have a look at
http://www.aviationcompetencecentre.nl/registration-test/
Can anyone suggest how I can get this work in a first attempt?, thanks.
I connected some Fabric screens with redirects to build a taylor made shopping cart. In the first attempt to register and buy something, a session variable is set in the first page but not accessible in the next pages. However if the shopping cart is selected a second or more times after in the same session, everything runs well. Please find the screen flow below
- Start with ?Register as a new Student?
- After submit, a shopping cart header record is created
- In a php (end of form submission) plugin the header record id is saved in a session variable:
session_start();
$_SESSION['shoppingcart_id'] = $this->data['cexman_shoppingcart_header___id_raw'];
while (!is_numeric($_SESSION['shoppingcart_id'])) {
$_SESSION['shoppingcart_id'] = $this->data['cexman_shoppingcart_header___id_raw'];
} The While is only for testing, to make absolutely sure that the variable is set.
- Go to the shopping cart list with a redirect plugin :
- Jump page: index.php/shopping-cart
- Append jump url and Use as search data set to No
- ?Shopping Cart list?
- Custom Add url : ./index.php/shopping-cart-filter
- ?Shopping Cart filter?
- Has for the time being a calc element ?Test?. Calculation is:
return $_SESSION['shoppingcart_id'];
The first time in a session I run these screens, value of Test is empty, in subsequent runs in the same session, the right shoppingcart header id is shown. Please have a look at
http://www.aviationcompetencecentre.nl/registration-test/
Can anyone suggest how I can get this work in a first attempt?, thanks.