Total : 0.00 €

Before contacting us, please make sure to check our F.A.Q

Please, login or register to our website in order to be able to post a presale question in the forum.

× WooPrice Calculator PRO

[SOLVED]Remember options in session

More
8 months 3 weeks ago #1216 by Marnick Menting
Marnick Menting replied the topic: [SOLVED]Remember options in session
Awesome, thanks!

Please Log in or Create an account to join the conversation.

More
9 months 7 hours ago - 9 months 7 hours ago #1197 by Enrico
Enrico replied the topic: [SOLVED]Remember options in session
Hi Marnick,

If you have a little of PHP knowledge you could get the calculator fields which are saved in the WooCommerce cart session:

So for example if you write this code in your custom theme:
<?php
		global $woocommerce;

		$items = $woocommerce->cart->get_cart();

        foreach($items as $item => $values) { 
           if(!empty($values['simulator_id'])){
             print_r($values['simulator_fields_data']);
           }
        } 
?>

This simple piece of code will print the saved cart values of the calculator.

Of course you need some more work to rewrite this code for get the value and set values in your calculator fields.

Kind Regards,
Enrico
AT139
Last Edit: 9 months 7 hours ago by Enrico.

Please Log in or Create an account to join the conversation.

More
9 months 1 week ago #1128 by Marnick Menting
Marnick Menting created the topic: [SOLVED]Remember options in session
Hi, is it possible to remember the options in session? I want to be able to direct the user back to the product page from the cart page, and let them change options in case they change their mind. Or using GET parameters like WooCommerce does with handling product attributes.

Please Log in or Create an account to join the conversation.

Moderators: david
Time to create page: 0.957 seconds

Cart

Total : 0.00 €