Hi I’m trying to change a value on some content on the current page before my page routes. I was wondering if it is possible?
Here’s my code. Im using $page->decrement(‘Quantity’, 1); to change the value.
c::set('routes', array(
array(
'pattern' => c::get('stripe_redirect_to_page'),
'action' => function() {
$data = array(
'stripeAmount' => s::get('stripeAmount')
);
$page->decrement('Quantity', 1);
return array('stripe-checkout-complete', $data);
})
));