Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by kgt

  1. Double check the code you have in includes/classes/order.php with the installation instructions. Most likely that is where the error is.
  2. I'm not sure why the USPS Methods module would interfere. And it's odd that the shipping attributes display when you try to edit this. I have not seen that problem before. Since it was working, I assume the problem arose when you installed the USPS Methods. Does that make changes to admin/modules.php? Also look in your database and be sure you have entries in the configuration table for configuration_key's starting with MODULE_ORDER_TOTAL_DISCOUNT_COUPON. I don't know what else to suggest. Does it work when you try to use a coupon during checkout? If not, what happens?
  3. See the README. SQL statements are listed in the Common Problems section. The module should install the tables when you install the module in your osCommerce admin section. You only need to run the statements yourself if your user doesn't have CREATE TABLE privileges or you're getting an error.
  4. You should be able to install the latest version without installing the previous ones first.
  5. Not really. These are coupons, not gift certificates, and there is a pretty important distinction between them. You want CCGV.
  6. The discount is actually applied in includes/classes/order.php. Compare the version of that file you have with the version in the installation zip. You can take a look at the README file in the install zip for instructions on how to turn on and use debugging.
  7. Double-check includes/classes/order.php. That is where the discount is truly being applied to the order totals. If you have any other contributions that affected that file, then that is a possible problem. Run a compare program on the order.php you have and the order.php included in the DCC install zip.
  8. It would be possible, and shouldn't require a huge change. I can tell you the places you'd need to make that change: includes/classes/discount_coupon.php includes/classes/order.php checkout_payment.php checkout_confirmation.php Internally, the discount is calculated for each item and stored, so it's not a stretch to simply do this for more than one coupon. What's missing is the ability to enter more than one coupon. I don't really have the time to help you out on this though. If you find someone to help you, I am available to answer specific questions.
  9. You're using a template, I gather, so keep in mind your code is now different from stock osCommerce code. I can only guess as to what exactly you need to add. I typed up my instructions for doing this and added them to the README when I released that last version. Take a look in there.
  10. What version are you using? Use phpMyAdmin to get the correct field name for that field in the table discount_coupons.
  11. The suggested fix for errors not displaying in STS is nothing more than a suggestion, since the very nature of STS means you've now got completely custom code. It's sounds like you'll need to tweak the formatting and code a bit to get the display to work. That's all I can tell you.
  12. Change lines 72-78 in includes/classes/discount_coupon.php from this: $check_user_query = tep_db_query($sql = 'SELECT dc2z.geo_zone_id FROM '.TABLE_DISCOUNT_COUPONS_TO_ZONES.' dc2z LEFT JOIN '.TABLE_ZONES_TO_GEO_ZONES.' z2g USING( geo_zone_id ) WHERE ( z2g.zone_id='.$delivery['zone_id'].' or z2g.zone_id = 0 or z2g.zone_id IS NULL ) AND ( z2g.zone_country_id='.$delivery['country_id'].' or z2g.zone_country_id = 0 ) AND dc2z.coupons_id="'.tep_db_input( $code ).'"' ); to this: $check_user_query = tep_db_query($sql = 'SELECT dc2z.geo_zone_id FROM '.TABLE_DISCOUNT_COUPONS_TO_ZONES.' dc2z LEFT JOIN '.TABLE_ZONES_TO_GEO_ZONES.' z2g USING( geo_zone_id ) WHERE ( z2g.zone_id = '.(int)$delivery['zone_id'].' or z2g.zone_id = 0 or z2g.zone_id IS NULL ) AND ( z2g.zone_country_id='.(int)$delivery['country_id'].' or z2g.zone_country_id = 0 ) AND dc2z.coupons_id="'.tep_db_input( $code ).'"' );
  13. This is a little different than what I thought you had first reported. When you enter a coupon, do you get to the confirmation page or just stay on the payment page? If you stay on the payment page, then that is another type of error. If you stay on the payment page, see if there's an error message in the URL in your browser. See the REDAME for help with that problem. If you get to the confirmation page when entering a code, then the problem is likely within the code in includes/classes/order.php or checkout_confirmation.php or you do not have a unique sort order for the module in Modules > Order Total in your admin section.
  14. Quite frankly, I don't know exactly what will happen (what symptoms you'll get) if you don't install the module in Modules > Order Total in the admin section, but I am certain DCC will never work without doing that step.
  15. The version doesn't matter. Since version 1.0 you've had to make changes to the order.php file. You can avoid making manual changes if you have no other contributions installed and you just uploaded all the files found in the install zip.
  16. You are correct. You can get the SQL to update your tables from version 3.0 of the DCC contributions page. Since you have version 2.* installed, the upgrade instructions for version 3.3 will not be correct for you. You will need to install 3.3 from the new installation instructions.
  17. This might work: boxes/shopping_cart.php replace this: $info_box_contents = array(); $info_box_contents[] = array('text' => $cart_contents_string); if ($cart->count_contents() > 0) { $info_box_contents[] = array('text' => tep_draw_separator()); $info_box_contents[] = array('align' => 'right', 'text' => $currencies->format($cart->show_total())); } new infoBox($info_box_contents); with this: $info_box_contents = array(); $info_box_contents[] = array('text' => $cart_contents_string); $discount = 0; if(tep_session_is_registered('coupon') && is_object($order->coupon)) $discount = array_sum($order->coupon->applied_discount); if ($cart->count_contents() > 0) { $info_box_contents[] = array('text' => tep_draw_separator()); $info_box_contents[] = array('align' => 'right', 'text' => $currencies->format(($cart->show_total() - $discount))); } new infoBox($info_box_contents);
  18. There's no SQL to manually run - it's run automatically when you install the module. I don't see a problem here. Do you have a testing site? I am afraid the only thing to do is go through and see if we can figure out why those entries aren't going into the discount_coupons_to_orders table. I'll need you to add some output statements to that file. Does the rest of the order procedure with a coupon work fine? IE, the discount is applied and you can see the discount on the order in the admin section?
  19. So it sounds like everything works fine EXCEPT for the express checkout? I'm not familiar with how the express checkout actually works, so I'd be making a guess as to what's the problem. Did express checkout work with coupons before you switched? Send me an email or PM with the contents of includes/modules/payment/your_paypal_module.php.
  20. There were posts about this on the same day you posted. If they didn't work for you, then you'll need to give a better explanation of what's not working.
  21. You don't need to edit your payment module - it's only if it takes over the processing from checkout_process.php does it need to be edited. The coupon and order id must be inserted into the discount_coupons_to_orders table for orders to be registered as having used a coupon. That normally happens in checkout_process.php. You may post that file for me to look at if you need.
  22. What is happening is that you are getting a fatal error that is halting script execution. Add this to the top of admin/includes/application_top.php: ini_set('display_errors', 1); error_reporting(E_ALL); You should now see an error message when you try to access your admin section.
  23. You've uploaded files to the wrong place. Note that there is a difference between includes/modules/order_total/ot_discount_coupon.php and includes/languages/english/modules/order_total/ot_discount_coupon.php. There are two DIFFERENT files with the same name that must go in two different places. Getting them mixed up causes this error. Re-upload the files, specifically the languages files found in the install zip.
  24. Can you PM or email me a debug output? Please see the README for help with capturing debug output.