zador Posted August 17, 2014 Share Posted August 17, 2014 i put this code in classes/order/orderhistory.php if ($new_os->paid == 1) { echo '<script>window.open("mycode.php","mywindow","menubar=1,resizable=1,width=350,height=250");</script>';} for pass vars and launch my own code out of PS classes.. when condition payment acepted is ture, code launch mycode.php but admin page PS put in blank, anybody know why? thank you Link to comment Share on other sites More sharing options...
vekia Posted August 17, 2014 Share Posted August 17, 2014 where exactly you pasted this code? Link to comment Share on other sites More sharing options...
zador Posted August 17, 2014 Author Share Posted August 17, 2014 in orderhistory.php in function public function changeIdOrderState($new_order_state, $id_order, $use_existing_payment = false) just after line: if ($new_os->paid == 1){ Link to comment Share on other sites More sharing options...
vekia Posted August 17, 2014 Share Posted August 17, 2014 i don't see there any $new_os object, so if you use object that doesnt exist - website will spawn errors, and you will see white page you defined this object? Link to comment Share on other sites More sharing options...
zador Posted August 17, 2014 Author Share Posted August 17, 2014 if ($new_os->paid == 1){ is from PS code i think that this object is defined. my pasted line is: echo '<script>window.open("mycode.php","mywindow","menubar=1,resizable=1,width=350,height=250");</script>'; but, where i can define any object? Link to comment Share on other sites More sharing options...
vekia Posted August 18, 2014 Share Posted August 18, 2014 yes but note that it's defined inside the function, not at the begining so if you use this code at the begining of function - it will spawn error because $new_os object doesnt exist you have to define it first. $new_os = new OrderState((int)$new_order_state, $order->id_lang); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now