View Single Post
  #3  
Old 02-05-2003, 11:48 AM
  minorgod's Avatar 
minorgod minorgod is offline
 

X-Adept
  
Join Date: Sep 2002
Location: Arivaca, AZ
Posts: 402
 

Default thanks, but...

Thanks for the help. Unfortunately, this doesn't quite answer my question. It would be really nice if we could talk the x-cart developers into writing a brief explanation of how the checkout process works. I've been tweaking this cart for months and built entire modules without fully understanding the way x-cart places orders.

It seems like xcart first calls the func_place_order() and does all the payment processing.

Then it looks like xcart calls the func_process_order() function and does some more stuff.

Then there's another function called func_complete_order() which does some other stuff, but from what I can tell, is never called by anything during a normal checkout.

What I'd like, is some kind of explanation of how all the functions are supposed to work together. Like a walkthrough that explains what happens with each function depending on what the $status and $order_status variables are set to.

At the moment, I'm trying to reimplement a digital subscription module that does things if an order is successfully processed. I have put the conditional inside the func_place_order() function, which worked great in xcart 3.1.3a, but now in version 3.3.1, it no longer works. Here's the old code that worked in version 3.1.3a:

Inside the func_place_order() function I added the following code below the regular subscription module code...
Code:
# # Insert into subscription_customers table (for subscription products) # if ($active_modules["Subscriptions"]) include "../modules/Subscriptions/subscriptions_cust.php"; # Insert into digital_subscription_customers table (for digital subscription products) # if ($active_modules["DigitalSubscriptions"] && ($order_status=="P" || $order_status=="C")) include "../modules/DigitalSubscriptions/digital_subscriptions_cust.php";

I've also tried changing the conditional to test $status instead of $order_status, but to no avail.

I'm wondering if this code should be placed in the func_process_order() function instead, but I can't tell since I don't know how the orders are really being placed. Anyone?
__________________
www.brettbrewer.com
Getting back into x-cart dev after a long hiatus. Modded lots of x-carts from version 3.1.x to 4.1.x. Developer of ImageScaler mod, Pre-login per user coupon mod, Wordpress feed mod, DigitalSubscriptions mod, Phonetic bulk download keys addon for DownloadExpander mod, Serial Number Generator for ESD products, Custom CMS/LMS integrations, external products mod, and more.
Reply With Quote