OSCOMMERCE SUPPORT CALL 702-453-3332

 

Help - Search - Members - Calendar
Full Version: Deny new purchases for customers with open orders
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > Contributions / Add-Ons > Order Total Modules
magicjebb
Hello, there.

My doubt is pretty much what the title says: since I sell single trading cards, some customers tend to keep creating one order after the other for these cards, asking me to put these items all together with their first order, and there's nothing more timewasting and annoying than that, since I have to suspend many of my other activities to keep modifying their requests.

Enough said. What I'm looking for, plain and simply: Is there a mod or another way to deny a customer the option to fill a new chart and buy more if that customer still has an open order awaiting payment?

Thank in advance for any help.
FWR Media
Something like the following would do it.

CODE
$sql =
<<<SQLTEXT
SELECT COUNT(orders_id) FROM orders
WHERE customers_id = '$customers_id'
AND orders_status = '$status'
SQLTEXT;
$result = tep_db_query($sql) or die('Query failed ' . mysql_error());
$row = tep_db_fetch_array($result);
if($row['COUNT(orders_id)'] > 0) {
  // There is an order with this customer_id and this status.
} else {
  // There are no orders with this customer_id and this status.
}
tep_db_free_result($result);
magicjebb
Seems nice, but I'm a seller, and even though I installed my own shop I'm not much of a programmer, so where should I place this code?
FWR Media
QUOTE (magicjebb @ May 19 2008, 10:08 PM) *
Seems nice, but I'm a seller, and even though I installed my own shop I'm not much of a programmer, so where should I place this code?


Well i'm happy to provide pointers but you wont get bespoke coding for free.

Support on these forums is free but is provided for the core oscommerce code and functions. Other than that there are 1000s of free contributions.
magicjebb
QUOTE (FWR Media @ May 19 2008, 06:54 PM) *
Well i'm happy to provide pointers but you wont get bespoke coding for free.

Support on these forums is free but is provided for the core oscommerce code and functions. Other than that there are 1000s of free contributions.



What do you mean? Can't you say on which file should I place this code?
magicjebb
So, anybody to point out a REAL solution? Can be a MOD, even a paid one, or else, instead of some weird piece of code that does nothing at all.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.