Jump to content
Sign in to follow this  
sh1977

(int)$orders['orders_id'] always equals zero?" Options Rating

Recommended Posts

Hello All

 

Could someone help me out with a little problem

 

Does anyone know why in checkout_success.php the value of

(int)$orders['orders_id'] always equals zero?".

 

Some more info.

 

I'm trying to install iDevAffiliate with % per sale. But when an affiliate makes a sale i'm getting an error in the iDevAiliate admin section.

The error is

 

Processing Error!

Check Cart Integration &

Processing Code Configuration

 

 

The helpdesk guy from iDevAffiliate suggested seeing if anyone here might be able to help out.

Below is his email

 

I haven't a clue. Every single time the order number is coming back as 0 in the confirmation. We have well over 400 osC users and use that cart ourselves. I've never seen of this or heard of it. The bottom line is when we go into the database to get the order details, it's trying to the details of order #0 which of course doesn't exist.

 

I'd check the osC forums and ask why the following always = 0.

 

(int)$orders['orders_id']

 

I'd say something like, "does anyone know why in checkout_success.php the value of

(int)$orders['orders_id'] always equals zero?".

 

 

 

 

Lucky me i always like to be the first one to have a error.

 

 

Anyone got any ideas?

 

 

Regards,

Scott

Share this post


Link to post
Share on other sites

around line 41 is where the querry to find the order_id is made

 

around line 41 is where the querry to find the order_id is made

Share this post


Link to post
Share on other sites

maybe you should put the code in checkout_process.php toward the end of the file where the cart is reset or the emails are sent i think that would be more accurate

Share this post


Link to post
Share on other sites

Hello Nana

 

Thanks for your reply.

 

I tried putting the code into the checkout_process.php file but i;m getting the same error.

 

 

Regards,

Scott

Share this post


Link to post
Share on other sites

try this

in checkout_process.php toward the end of the file right before

  $cart->reset(true);

put your code and instead of $orders[orders_id] use $insert_id

hope that works for you

Share this post


Link to post
Share on other sites

Hello

 

Thanks for your help.

 

The problem was to do with the database and not any of the code.

 

One of the three tables below had a problem.

Customer_Info

Customer_Basket

Customer_Basket_Attributes

 

After i cleared all three tables everything started working fine.

 

No idea what was wrong inside the tables, but who cares it works now.

 

 

Regards,

Scott

Share this post


Link to post
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
Sign in to follow this  

×