dragon5 0 Posted December 15, 2006 TTHANKS! Great support! Installed and in the process of testing locally. One question comes to mind. Are codes 'case' sensitive? Will '1234DEC' work the same as '1234dec'? Tom Share this post Link to post Share on other sites
kgt 3 Posted December 15, 2006 TTHANKS! Great support! Installed and in the process of testing locally. One question comes to mind. Are codes 'case' sensitive? Will '1234DEC' work the same as '1234dec'?Tom Codes are case insensitive. abc = ABC Contributions Discount Coupon Codes Donations Share this post Link to post Share on other sites
dragon5 0 Posted December 15, 2006 Thanks. New problem. Fatal error: Cannot redeclare class discount_coupon in c:\EasyPHP1-8\www\catalog\includes\classes\discount_coupon.php on line 14 Yes, I read the docs. Problem: Fatal error: Cannot redeclare class discount_coupon in ***path to shop***/includes/classes/discount_coupon.php on line 14. Solution: Edit the file includes/classes/discount_coupon.php and comment out the line require_once( DIR_FS_CATALOG.DIR_WS_CLASSES.'discount_coupon.php' ); I would do this, but 'require_once( DIR_FS_CATALOG.DIR_WS_CLASSES.'discount_coupon.php' );' is NOT in the file to comment out? Tom using 2.1 & new install of this contrib. Share this post Link to post Share on other sites
kgt 3 Posted December 15, 2006 Thanks. New problem. Fatal error: Cannot redeclare class discount_coupon in c:\EasyPHP1-8\www\catalog\includes\classes\discount_coupon.php on line 14 Yes, I read the docs. Problem: Fatal error: Cannot redeclare class discount_coupon in ***path to shop***/includes/classes/discount_coupon.php on line 14. Solution: Edit the file includes/classes/discount_coupon.php and comment out the line require_once( DIR_FS_CATALOG.DIR_WS_CLASSES.'discount_coupon.php' ); I would do this, but 'require_once( DIR_FS_CATALOG.DIR_WS_CLASSES.'discount_coupon.php' );' is NOT in the file to comment out? Tom using 2.1 & new install of this contrib. That should read Solution: Edit the file includes/modules/order_total/ot_discount_coupon.php and comment out the line require_once( DIR_FS_CATALOG.DIR_WS_CLASSES.'discount_coupon.php' ); Contributions Discount Coupon Codes Donations Share this post Link to post Share on other sites
dragon5 0 Posted December 15, 2006 THANKS! That did it! Best support I've ever received in all the years I've been involved with osc. Wish I could return the favor. Tom Share this post Link to post Share on other sites
kgt 3 Posted December 15, 2006 THANKS !This seems to work fine for the discount line itself. However, the next lines (e.g. subtotal) are still calculated without this rounding. Could some logic be applied to the subtotal (and total ?) please ? I guess the new rounded discount value needs to picked up when displaying the subtotal line rather then the original not-rounded amount. e.g. products : 104.00 discount 5% : 5.00 (original 5.22) subtotal : 98.78 (this should be in fact 99 now because 104-5=99) shipping: 6.20 Total : 104.98 (this should be in fact 105.20 now) Could you help me with this or would it require a total re-design of the standard subtotal/total oscommerce logic ? If this were easy to do, the discounts would never have a chance of being off in the first place. I am working on a version (almost complete) that will be more accurate. Indeed, I haven't been able to figure out how to get inaccurate totals with it yet - a good sign. With that version, you should be able to do what you want easily enough. Contributions Discount Coupon Codes Donations Share this post Link to post Share on other sites
kgt 3 Posted December 15, 2006 THANKS! That did it! Best support I've ever received in all the years I've been involved with osc. Wish I could return the favor.Tom I will need tester(s) for a new version soon. Contributions Discount Coupon Codes Donations Share this post Link to post Share on other sites
dragon5 0 Posted December 15, 2006 kgt, Everything is working fine locally, BUT, I'm getting a lousy 1064 error in admin on the live site after installing. Discount Coupons NOTICE: Click here to read the Discount Coupon Codes manual for help editing coupons. 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-12, 12' at line 1 select * from discount_coupons cd order by cd.coupons_date_end, coupons_date_start limit -12, 12 Update for anyone else having this problem. Found the solution here: http://www.oscommerce.com/community/bugs,1605 (look for the post dated april 15 05) This is a bug in oscommerce admin->includes->classes->split_page_result.php file. Error code : Approximate Line : 34 Function : splitPageResults LOOK FOR $offset = ($max_rows_per_page * ($current_page_number - 1)); $sql_query .= " limit " . $offset . ", " . $max_rows_per_page; This creates a problem if there is no record in database. Fix ( Replace the above two lines with this code ) $offset = 0; if($current_page_number > 0){ $offset = ($max_rows_per_page * ($current_page_number - 1)); } $sql_query .= " limit " . $offset . ", " . $max_rows_per_page; Seems to be working now. Share this post Link to post Share on other sites
Aunt Clara 0 Posted December 18, 2006 Is it possible to change the coupon box from checkout_payment to checkout_shipping? I am using a shortened checkout and paypal ipn. My customers never go go checkout_payment. Share this post Link to post Share on other sites
Aunt Clara 0 Posted December 18, 2006 Actually, I figured it out myself. This is a wonderful contribution. Thanks a lot for sharing it with us. Share this post Link to post Share on other sites
data10 0 Posted December 18, 2006 I have installed the coupon module (it is great, thanx to whom ever did this!). I'm having a problem though: I have created 1 discount coupon of '12345'. The 'Do you have a promotional code or discount coupon?' appears on my Payment Information screen. When i press 'continue' The page refreshes and my CC info and Coupon Code is no longer there. I notice the URL is listed as: checkout_payment.php?error_message=The+coupon+code+you+have+entered+is+not+valid.&osCsid=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX It does not seem to be able to reference my coupon code, what am I doing wrong? Any help is appreciated - thanx Share this post Link to post Share on other sites
kgt 3 Posted December 19, 2006 I have created 1 discount coupon of '12345'. The 'Do you have a promotional code or discount coupon?' appears on my Payment Information screen. When i press 'continue' The page refreshes and my CC info and Coupon Code is no longer there. I notice the URL is listed as: checkout_payment.php?error_message=The+coupon+code+you+have+entered+is+not+valid. It does not seem to be able to reference my coupon code, what am I doing wrong? This can happen if you enter your dates in the incorrect format. The format expected is taken from admin/includes/languages/english.php. If the format in that file is mm/dd/yyyy, then you will have this problem if you try to enter a date as dd/mm/yyyy. Contributions Discount Coupon Codes Donations Share this post Link to post Share on other sites
Guest Posted December 19, 2006 Hi All, I was wondering if anyone has expanded on this contribution to allow it to offer a coupon code that will offer free shipping and just drop the shipping charge when the coupon code is entered? Any help is appriciated. Regards, Jp Share this post Link to post Share on other sites
James.Dixon 0 Posted December 19, 2006 Hello rogertvr / kgt, I am also having the problem whereby I've set the max-use for a discount code but all customers paying via the paypal ipn mod have infinite goes at using the discount code. I've set the auto return on etc. Did you resolve the problem that was occurring? Was there an error in the checkout.process.php file that was sent? If so, could you share this with me as I've run out of ideas. Many Thanks, James Share this post Link to post Share on other sites
dragon5 0 Posted December 20, 2006 (edited) kgt, got a syntax error when installing the 'reports' code. syntax error, unexpected ')' in /home/xxxxxx/public_html/catalog/admin/includes/boxes/reports.php on line 32 admin/includes/boxes/reports.php ---------------------------------------------- line 26 replace '<a href="' . tep_href_link(FILENAME_STATS_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_ORDERS_TOTAL . '</a>'); with //kgt - discount coupons report '<a href="' . tep_href_link(FILENAME_STATS_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_ORDERS_TOTAL . '</a><br>' . '<a href="' . tep_href_link(FILENAME_STATS_DISCOUNT_COUPONS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_DISCOUNT_COUPONS . '</a>'); //end kgt - discount coupons report Don't know if this has been visited already, but the fix for me is in BOLD below. with //kgt - discount coupons report '<a href="' . tep_href_link(FILENAME_STATS_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_ORDERS_TOTAL . '</a><br>' . '<a href="' . tep_href_link(FILENAME_STATS_DISCOUNT_COUPONS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_DISCOUNT_COUPONS . '</a><br>' . //end kgt - discount coupons report Tom Edited December 20, 2006 by dragon5 Share this post Link to post Share on other sites
newtech 0 Posted December 20, 2006 Hi All, I was wondering if anyone has expanded on this contribution to allow it to offer a coupon code that will offer free shipping and just drop the shipping charge when the coupon code is entered? Any help is appriciated. Regards, Jp This is exactly what I want. That is the main reason I want to offer special discounts at times. My shipping is based upon total of order so there is no specific discount I could give to all customers that would make the shipping 0. Share this post Link to post Share on other sites
Aunt Clara 0 Posted December 20, 2006 I am having a serious problem after installing this contribution. I hope that you guys can help me. I am using paypal ipn, and when returning from the paypal payment page to checkout_process.php I get this error: Parse error: syntax error, unexpected T_STRING in /home/shopdom/public_html/includes/languages/espanol/checkout_process.php on line 16 No confirmation email is sent and the shopping cart retains the paid items. Any idea how to solve this? I will really appreciate it. Share this post Link to post Share on other sites
kgt 3 Posted December 20, 2006 Parse error: syntax error, unexpected T_STRING in /home/shopdom/public_html/includes/languages/espanol/checkout_process.php on line 16 You have a syntax error in includes/languages/espanol/checkout_process.php. Whatever changes you made to that file caused an error. Contributions Discount Coupon Codes Donations Share this post Link to post Share on other sites
kgt 3 Posted December 20, 2006 kgt, got a syntax error when installing the 'reports' code. syntax error, unexpected ')' in /home/xxxxxx/public_html/catalog/admin/includes/boxes/reports.php on line 32 admin/includes/boxes/reports.php ---------------------------------------------- line 26 replace '<a href="' . tep_href_link(FILENAME_STATS_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_ORDERS_TOTAL . '</a>'); with //kgt - discount coupons report '<a href="' . tep_href_link(FILENAME_STATS_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_ORDERS_TOTAL . '</a><br>' . '<a href="' . tep_href_link(FILENAME_STATS_DISCOUNT_COUPONS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_DISCOUNT_COUPONS . '</a>'); //end kgt - discount coupons report Don't know if this has been visited already, but the fix for me is in BOLD below. with //kgt - discount coupons report '<a href="' . tep_href_link(FILENAME_STATS_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_ORDERS_TOTAL . '</a><br>' . '<a href="' . tep_href_link(FILENAME_STATS_DISCOUNT_COUPONS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_DISCOUNT_COUPONS . '</a><br>' . //end kgt - discount coupons report Tom It's because you have another contribution installed. Contributions Discount Coupon Codes Donations Share this post Link to post Share on other sites
kgt 3 Posted December 20, 2006 I was wondering if anyone has expanded on this contribution to allow it to offer a coupon code that will offer free shipping and just drop the shipping charge when the coupon code is entered? The newest version will have this capability. Contributions Discount Coupon Codes Donations Share this post Link to post Share on other sites
Bassie 0 Posted December 20, 2006 The newest version will have this capability. When do you expect to have the new version ready as it seems that a lot of things will be improved. I guess we can download it from contribution list page once it's ready? Share this post Link to post Share on other sites
Aunt Clara 0 Posted December 20, 2006 You have a syntax error in includes/languages/espanol/checkout_process.php. Whatever changes you made to that file caused an error. Thank you very much! I have found another problem: I am using paypal ipn and the discount although it shows in checkout_confirmation.php it is not being passed on to paypal. Any idea why? Share this post Link to post Share on other sites
Aunt Clara 0 Posted December 20, 2006 You have a syntax error in includes/languages/espanol/checkout_process.php. Whatever changes you made to that file caused an error. Thank you very much! I have found another problem: I am using paypal ipn and the discount although it shows in checkout_confirmation.php it is not being passed on to paypal. Any idea why? Share this post Link to post Share on other sites
Aunt Clara 0 Posted December 20, 2006 You have a syntax error in includes/languages/espanol/checkout_process.php. Whatever changes you made to that file caused an error. Thank you very much! I have found another problem: I am using paypal ipn and the discount although it shows in checkout_confirmation.php it is not being passed on to paypal. Any idea why? Share this post Link to post Share on other sites
kgt 3 Posted December 20, 2006 When do you expect to have the new version ready as it seems that a lot of things will be improved.I guess we can download it from contribution list page once it's ready? There should be some major improvements. It's mostly done, just needs to go through testing. If anyone is willing to help out with testing, please email or PM me. Contributions Discount Coupon Codes Donations Share this post Link to post Share on other sites