hkoren Posted June 21, 2007 Posted June 21, 2007 Hi there, I am selling software from my store. I wish to have it so that once an order is completed, I can run a script for each product purchased to create the software license. All it has to do is hit a URL with the customer information encoded on the query string. Before I dig into the code and try to figure out where this would go I figured I would ask here. What files should I be looking to modify to accomplish this? Are you aware of any existing add-on components that could help me do this? Thank you, -Henry Koren
Guest Posted June 21, 2007 Posted June 21, 2007 there are many contributions that have the code to do that. Even the stock osC (search the files for CartID for instance). Once you generate the number (and if you want to merge it with the customers name) you can store it in the dbase with the order_products table. Then you can notify the customer via email or through his account to retrieve the license. There is also a module like this: http://www.oscommerce.com/community/contributions,3883 http://www.oscommerce.com/forums/index.php?showtopic=186485 it can give you some idea.
hkoren Posted June 22, 2007 Author Posted June 22, 2007 there are many contributions that have the code to do that. Even the stock osC (search the files for CartID for instance). Once you generate the number (and if you want to merge it with the customers name) you can store it in the dbase with the order_products table. Then you can notify the customer via email or through his account to retrieve the license. There is also a module like this: http://www.oscommerce.com/community/contributions,3883 http://www.oscommerce.com/forums/index.php?showtopic=186485 it can give you some idea. Thanks for your response, but I am confused... Searching for cartID showed me a lot about the cart but I don't know if any of the files are the ones I should be looking in. I checked out the virtual unique products contribution, I think that is pretty far from what I'm looking for.... It's just a plugin for the administrator. I need something that will run automatically once the payment has been processed on the order... I am thinking of maybe modify the checkout_process.php somewhere around the time when it is sending the post-order e-mail. However I am not sure if this is the best place, because what if the order is done by check or purchase order I don't want to prematurly create their license. Another solution I am considering is to bypass modifying OScommerce code in favor of simply having some sort of cron job that would periodically query the database looking for new orders and assigning them their licenses and marking some sort of flag once complete. Thanks, Any more tips would be appreciated!
Guest Posted June 22, 2007 Posted June 22, 2007 because what if the order is done by check or purchase order I don't want to prematurly create their license. that shouldn't matter because they should not be able to download/view a license or license key unless the order is set to delivered. By default orders go into pending status. So once payment is confirmed, the order status can be updated from the admin and the license key is generated at that time. The cartID is generated randomly. That was the reason I pointed that out. You can do that by cron-job too is going to be the same thing with some latency in that case.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.