Jump to content

admin page in blank when condition executing


zador

Recommended Posts

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...