runwayfi Posted July 8, 2006 Share Posted July 8, 2006 Hello, I am new at this and am having the following problem with the ot_discount_coupon_code_1.4 I have uploaded all the files, ran the SQL, when I click on anything in the admin page, I get a "page cannot be found error" THe site is still up but I can't access anything in the Admin section. Please help. Otherwise it was a smooth simple installation. I also installed the coupon.php fix but still same error. Quote Link to comment Share on other sites More sharing options...
mm9800s Posted July 8, 2006 Share Posted July 8, 2006 in admin/coupons.php find this code tep_db_query($sql = "insert into " . TABLE_DISCOUNT_COUPONS . " ( coupons_id, coupons_description, coupons_discount_percent, date_start, date_end, max_use, min_order) Change to this tep_db_query($sql = "insert into " . TABLE_DISCOUNT_COUPONS . " ( coupons_id, coupons_description, coupons_discount_percent, date_start, date_end, max_use, min_order, number_available) The number available is missing from the indert command Hope that helps Regards Mark Thanks crash !!!! You are GREATEST !!!! Saluti dall'Italia Quote Link to comment Share on other sites More sharing options...
runwayfi Posted July 9, 2006 Share Posted July 9, 2006 The installation on this contribution went smoothly. I am getting an error when I click the create coupon module under catalog in the admin section: Parse error: parse error, unexpected '=' in /home/runwayfi/public_html/osc/admin/includes/languages/english/coupons.php on line 181 how to I resolve this? Quote Link to comment Share on other sites More sharing options...
scheinarts Posted July 10, 2006 Share Posted July 10, 2006 Hi, I am getting the same error that other people have got with the discount not showing in the checkout confirmation page... I already triple check that the Discount module has its own unique sort order and that doesnt work.. I installed v1.4 how can i fix this Quote Link to comment Share on other sites More sharing options...
scheinarts Posted July 10, 2006 Share Posted July 10, 2006 The installation on this contribution went smoothly. I am getting an error when I click the create coupon module under catalog in the admin section: Parse error: parse error, unexpected '=' in /home/runwayfi/public_html/osc/admin/includes/languages/english/coupons.php on line 181 how to I resolve this? check the file admin/includes/languages/english/coupons.php for any typos Quote Link to comment Share on other sites More sharing options...
kgt Posted July 10, 2006 Author Share Posted July 10, 2006 The installation on this contribution went smoothly. I am getting an error when I click the create coupon module under catalog in the admin section: Parse error: parse error, unexpected '=' in /home/runwayfi/public_html/osc/admin/includes/languages/english/coupons.php on line 181 Revisit the install instructions for admin/includes/languages/english/coupons.php My guess is that you may have mixed up the install files. There should not be an "=" in this file, and it should not be anywhere near 180 lines long. It should only be around 35 lines long, and have a series of statements that look like this: define('HEADING_TITLE', 'Discount Coupons'); define('TEXT_DISCOUNT_COUPONS_ID', 'Coupon Code:'); define('TEXT_DISCOUNT_COUPONS_ID_HINT', '(This is the code given to the customer. Leave blank to generate a random code.)'); define('TEXT_DISCOUNT_COUPONS_DESCRIPTION', 'Description:'); etc. Quote Contributions Discount Coupon Codes Donations Link to comment Share on other sites More sharing options...
kgt Posted July 10, 2006 Author Share Posted July 10, 2006 I am getting the same error that other people have got with the discount not showing in the checkout confirmation page... I already triple check that the Discount module has its own unique sort order and that doesnt work.. I installed v1.4 What other contributions do you have installed, if any? Quote Contributions Discount Coupon Codes Donations Link to comment Share on other sites More sharing options...
scheinarts Posted July 11, 2006 Share Posted July 11, 2006 What other contributions do you have installed, if any? Master Products, Admin Access with Levels, easypopulate, user tracking, header tags... none of these interfere with the checkout process.. I did have ccgv but i uninstalled it to install your contribution, since it looked a lot simpler.. and I DONT have fast easy checkout Quote Link to comment Share on other sites More sharing options...
kgt Posted July 11, 2006 Author Share Posted July 11, 2006 Master Products, Admin Access with Levels, easypopulate, user tracking, header tags... none of these interfere with the checkout process.. I did have ccgv but i uninstalled it to install your contribution, since it looked a lot simpler.. and I DONT have fast easy checkout I think Master Products affects the order class, which does affect the checkout process, and a change in that file would be what prevents the coupon from displaying in the confirmation. Can you PM or email me the code you have for: includes/classes/order.php Quote Contributions Discount Coupon Codes Donations Link to comment Share on other sites More sharing options...
scheinarts Posted July 11, 2006 Share Posted July 11, 2006 I think Master Products affects the order class, which does affect the checkout process, and a change in that file would be what prevents the coupon from displaying in the confirmation. Can you PM or email me the code you have for: includes/classes/order.php I just pm you my order.php, hope thats the problem Quote Link to comment Share on other sites More sharing options...
Pilly Posted July 14, 2006 Share Posted July 14, 2006 Morning all, I was just thinking of an idea, I dont know if this has been mentioned yet, but how about an addon to the script that reports on who used what coupons and when etc. ? Quote Link to comment Share on other sites More sharing options...
WingingIt Posted July 14, 2006 Share Posted July 14, 2006 Just writing to say that the contribution is so nice - all of the problems I ran into when i put it into my code (and there really weren't very many) were actually my errors - overlooking the install of a file here or there, or running into truncated code, probably due to the back and forth ftp activity. The delightful thing is this: installing this contribution and reading the thread taught me tons about how this mysterious store thing works. I bought a Php book, and am trying (in my spare time - - choking with laughter, here) to be more respsonsible as a user. KGT - you have the patience of a saint, and you're briliant as well. Thank you for your on-going help, and your willingness to help us all. I know that you are doing it on your own time, and I think you are amazing. Just wanted to say it - Thank you. Quote Link to comment Share on other sites More sharing options...
thoneycutt Posted July 15, 2006 Share Posted July 15, 2006 I have added the contribution but I am receiving this error when trying to create the coupon. Any suggestions on a fix? Error Received: 1136 - Column count doesn't match value count at row 1 insert into discount_coupons ( coupons_id, coupons_description, coupons_discount_percent, date_start, date_end, max_use, min_order) values ('test001', '10off', '.10', null, null, 1, 0, 0) [TEP STOP] Thanks for any suggestions provided. Terry Quote Link to comment Share on other sites More sharing options...
thoneycutt Posted July 15, 2006 Share Posted July 15, 2006 Never mind....Issue resolved. I just noticed there was an update fix for this posted. I have added the contribution but I am receiving this error when trying to create the coupon.Any suggestions on a fix? Error Received: 1136 - Column count doesn't match value count at row 1 insert into discount_coupons ( coupons_id, coupons_description, coupons_discount_percent, date_start, date_end, max_use, min_order) values ('test001', '10off', '.10', null, null, 1, 0, 0) [TEP STOP] Thanks for any suggestions provided. Terry Quote Link to comment Share on other sites More sharing options...
Guest Posted July 21, 2006 Share Posted July 21, 2006 (edited) I just installed this contribution and I am receiving the following error on checkout: 1146 - Table 'mylestones.TABLE_DISCOUNT_COUPONS' doesn't exist select * from TABLE_DISCOUNT_COUPONS where coupons_id = 'radiopromo' [TEP STOP] Edited July 21, 2006 by bk24 Quote Link to comment Share on other sites More sharing options...
kgt Posted July 21, 2006 Author Share Posted July 21, 2006 I just installed this contribution and I am receiving the following error on checkout: 1146 - Table 'mylestones.TABLE_DISCOUNT_COUPONS' doesn't exist select * from TABLE_DISCOUNT_COUPONS where coupons_id = 'radiopromo' You missed a step in the installation: catalog/includes/database_tables.php ------------------------------------------ add //kgt - discount coupons define('TABLE_DISCOUNT_COUPONS', 'discount_coupons'); define('TABLE_DISCOUNT_COUPONS_TO_ORDERS', 'discount_coupons_to_orders'); //end kgt - discount coupons Quote Contributions Discount Coupon Codes Donations Link to comment Share on other sites More sharing options...
Guest Posted July 21, 2006 Share Posted July 21, 2006 You missed a step in the installation: Thaks! Now I am getting an error that says "the coupon code you have entered is not valid" in a red bar at the top of the page. Did I miss another step? Quote Link to comment Share on other sites More sharing options...
kgt Posted July 21, 2006 Author Share Posted July 21, 2006 Thaks! Now I am getting an error that says "the coupon code you have entered is not valid" in a red bar at the top of the page. Did I miss another step? You get that error message when the Coupon code you entered doesn't produce a match in the database table. A match is a coupon record that meets the following criteria: 1. The code entered on checkout_payment.php matches a coupon code in the database. 2. The start date for the matching code is either not set (unlimited) or it's a date today or in the past. 3. The end date for the matching code is either not set or is a date today or in the future. Make sure the code you're entering has been created and that it has valid dates if the dates are set. Quote Contributions Discount Coupon Codes Donations Link to comment Share on other sites More sharing options...
Guest Posted July 21, 2006 Share Posted July 21, 2006 You get that error message when the Coupon code you entered doesn't produce a match in the database table. A match is a coupon record that meets the following criteria: 1. The code entered on checkout_payment.php matches a coupon code in the database. 2. The start date for the matching code is either not set (unlimited) or it's a date today or in the past. 3. The end date for the matching code is either not set or is a date today or in the future. Make sure the code you're entering has been created and that it has valid dates if the dates are set. Here is what I have for the coupons in the admin: Coupon Code: Discount: Start: End: Max Use: Min Order: Available: bktest 10% 07/19/0006 07/25/0006 10 unlimited unlimited Info radiopromo 20% 07/20/0006 07/28/0006 50 unlimited 50 Info 123test ( test coupon1 ) 5% 07/20/2006 07/27/2006 10 unlimited 50 I tried it with all three coupons and received the same error. ANy ideas? Quote Link to comment Share on other sites More sharing options...
kgt Posted July 21, 2006 Author Share Posted July 21, 2006 Here is what I have for the coupons in the admin:Coupon Code: Discount: Start: End: Max Use: Min Order: Available: bktest 10% 07/19/0006 07/25/0006 10 unlimited unlimited Info radiopromo 20% 07/20/0006 07/28/0006 50 unlimited 50 Info 123test ( test coupon1 ) 5% 07/20/2006 07/27/2006 10 unlimited 50 I tried it with all three coupons and received the same error. ANy ideas? Well the first two have dates with year '0006'. I think we're well beyond that date. ;) Are you sure you tried the third one and it gives you the exact same error? Quote Contributions Discount Coupon Codes Donations Link to comment Share on other sites More sharing options...
jacenstuff Posted July 22, 2006 Share Posted July 22, 2006 Nice contrib, at elast I think so, but i have an error coming up ebfore I can test it. Says it's a parse error syntax error, unexpected $end in ../dweebweaver.com/shop/admin/includes/boxes/catalog.php on line 45 this is whats in the file: // kgt - discount coupons '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a><br>' . '<a href="' . tep_href_link(FILENAME_DISCOUNT_COUPONS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_DISCOUNT_COUPONS . '</a><br>' ) ; // end kgt - discount coupons line 45 is after <!-- catalog_eof // --> : $box = new box; echo $box->menuBox($heading, $contents); ?> </td> </tr> <!-- catalog_eof //--> I don't know PHP so I have no clue what i'm looking at here, but i'd like not only a fix, but what the answer was so I can hunt for stuff like that in the future. Quote We must be the change we wish to see in the world. ------------------------------------------------------------ p.s. BACKUP! Link to comment Share on other sites More sharing options...
jacenstuff Posted July 22, 2006 Share Posted July 22, 2006 haha NEVERMIND. was missing a bracket! oh my... can't believe my idiocy sometimes. Quote We must be the change we wish to see in the world. ------------------------------------------------------------ p.s. BACKUP! Link to comment Share on other sites More sharing options...
kgt Posted July 24, 2006 Author Share Posted July 24, 2006 haha NEVERMIND. was missing a bracket! oh my... can't believe my idiocy sometimes. When you get errors that occur on the very last line of the file, they're usually because you're missing a bracket. Just a little tip for future reference. ;) Quote Contributions Discount Coupon Codes Donations Link to comment Share on other sites More sharing options...
jacenstuff Posted July 25, 2006 Share Posted July 25, 2006 Ah, thanks for the tip, I will keep that in mind. And if you're the guy who made it(i think you are, same letters), I really appreciate it was you who responded, I have not recieved any response from others who made contribs that I m having difficulty with. It is most appreciated. Quote We must be the change we wish to see in the world. ------------------------------------------------------------ p.s. BACKUP! Link to comment Share on other sites More sharing options...
Lil Paws Posted July 30, 2006 Share Posted July 30, 2006 Do you have a modified header.php that does not contain some version of this code? <?php if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerError"> <td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td> </tr> </table> <?php } if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerInfo"> <td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td> </tr> </table> <?php } ?> If you have a template and have completely redone your includes/header.php, you might be missing this code. This contribution assumes the standard error message code works. KGT - My header.php doesn't have any of this code, so the people that built it for me must have modified and removed it - would it be possible for you to send me the header.php file you have so I can compare? Or if I can pass mine to you to check it OR if you have a different way I could display the error that doesn't have anything to do with the header.php file.... whatever would be easiest for you! Thanks so much for your time and effort with this contribution and the help on the message board! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.