This is a discussion on Purchase Without Account within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; This is a simple version.. probably can be improved but for a quick fix untill someone pro comes along, this ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| This is a simple version.. probably can be improved but for a quick fix untill someone pro comes along, this should help you if customers who purchased using PWA can see each others orders / addresses etc. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Installation: BACKUP!! checkout_sucess.php FIND: require('includes/application_top.php'); BELOW ADD: include('includes/orderciddbupdate.php'); admin/orders.php FIND: if ($orders['customers_id']==0) $orders['customers_name'] = '!! ' . $orders['customers_name']; BELOW ADD: if ($orders['customers_id']==-1) $orders['customers_name'] = '!!+ ' . $orders['customers_name']; UPLOAD orderciddbupdate.php to catalog/includes/ What does this do? Now, when a customer reachs the Success Page, a database query will be performed to change all customer ID's in the database that are set to "0" and change them to "-1". The customer_id 0 is the guest ID, so the customer is classed as a guest throughout the checkout process untill the end, where at the last page checkout_sucess.php it will update the customer_id to -1, so its no longer a visible order and since the customer is still a guest (0) they cannot view orders which have a different customer_id numbers (which in this case is now -1) The orders can still be viewed in the Admin panel etc, everything is still normal :) Legend: !!+ Means the order is from a customer who hasn't registered and has the -1 ID (Hidden ID) !! Means the order is from a customer who hasn't registered, but for some reason still has the 0 ID (Visible ID) More...
__________________ Michael Sasek osCMax Developer
|
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Purchase Without Account | michael_s | New osCommerce Contributions | 0 | 09-24-2007 06:14 AM |
| Purchase Without Account | michael_s | New osCommerce Contributions | 0 | 02-08-2007 09:50 AM |
| Purchase Without Account | michael_s | New osCommerce Contributions | 0 | 01-31-2007 11:00 AM |
| Purchase Without Account | michael_s | New osCommerce Contributions | 0 | 01-31-2007 01:50 AM |
| purchase without account | jloyzaga | osCMax v1.7 Discussion | 5 | 09-21-2003 09:47 AM |