Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

mbrailer

Archived
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Real Name
    Mike Brailer

mbrailer's Achievements

  1. Yes, that worked. My most recent test resulted in the coupons_id and orders_id values properly paired in the discount_coupons_to_orders table, and the "number used" for that coupon incremented by one in the report. Thank you again!
  2. My discount_coupons_to_orders table isn't completely empty, but the coupons_id column is, which would explain why the reports can't produce an accurate count. It also explains the cause of that more serious error I encountered in earlier testing. The system was attempting to enter the values of '' and an orders_id number into discount_coupons_to_orders, but those values were already there. Here's the code from order_process.php, which I pasted in the correct spot. It looks like the conditional code is being executed, because every time I redeem a coupon, a new entry appears in discount_coupons_to_orders, with the correct order number in the orders_id column, and no data in the coupons_id column. //kgt - discount coupons if( tep_session_is_registered( 'coupon' ) && is_object( $order->coupon ) ) { $sql_data_array = array( 'coupons_id' => $order->coupon->code, 'orders_id' => $insert_id ); tep_db_perform( TABLE_DISCOUNT_COUPONS_TO_ORDERS, $sql_data_array ); } //end kgt - discount coupons If it helps you to see this, here are some details of my discount_coupons_to_orders table, according to PhpMyAdmin: Field Type Null Default coupons_id varchar(32) No orders_id int(11) No 0 Indexes: Keyname: PRIMARY Type: PRIMARY Cardinality: 4 Field: coupons_id orders_id
  3. Thanks for the prompt feedback. That tip didn't work, but I think the problem was that I had elements of version 2.0 mingled in with the new code. I restored the whole site from backups I'd made before installation and tried again, and now the coupon system works properly. I have another question, much less important, though: I've redeemed a few coupons in testing, but the coupons report ("Discount Coupon Codes Usage Information") doesn't show the "number used" incrementing with each use. Is it supposed to? My test coupon has values of 0 for Max Use and Number Available. Anyway, it's a great add-on, just what my client was looking for. Thanks so much. Mike
  4. Hello: I just installed Discount Coupons 3 on a site in development. I briefly was testing the system using version 2.0, but deleted the two database files and started fresh by manually editing my template-based site to version 3. (I added the seven new database tables manually using PhpMyAdmin.) I'm getting this error message when I proceed to checkout_process.php: 1062 - Duplicate entry '27' for key 1 insert into discount_coupons_to_orders (coupons_id, orders_id) values ('', '27') [TEP STOP] It appears that the value for the coupons_id is not being properly passed on this line of checkout_process.php: //kgt - discount coupons if( tep_session_is_registered( 'coupon' ) && is_object( $order->coupon ) ) { $sql_data_array = array( 'coupons_id' => $order->coupon->code, 'orders_id' => $insert_id ); tep_db_perform( TABLE_DISCOUNT_COUPONS_TO_ORDERS, $sql_data_array ); } //end kgt - discount coupons What did I do incorrectly? Can this be corrected?
×
×
  • Create New...