jubez Posted August 4, 2009 Share Posted August 4, 2009 I have had that happen to me before with a different module.. I just tried reinstalling this module, and it's still the same... Thanks for the tip :) OMG! It's working!! I love this contrib!! I had to go into my SPPC Customer groups and enable the module to the groups order total module. I can choose which groups (wholesale, retail, vip) get to have the coupon codes... Great stuff!! Thanks PWS! Quote Link to comment Share on other sites More sharing options...
PWS Posted August 4, 2009 Share Posted August 4, 2009 (edited) OMG! It's working!! I love this contrib!! I had to go into my SPPC Customer groups and enable the module to the groups order total module. I can choose which groups (wholesale, retail, vip) get to have the coupon codes... Great stuff!! Thanks PWS! well done. I have a different SPPC since i cannot chose OT for my groups, but only shipping and payment modules. Chek also if copons exclusions work with groups or you won't be able to separate coupons by group. @rselonke I do not trust very much in in_array function so first you have to check if the code fall into this condition. You can do it by inserting this 2 lines print "yes, i'm falling here"; exit; just after the if (in_array('ot_discount_coupon', $order_total_array)) { statement. the position seems to be right, it's just what i meant. let me know Bye i forgot to tell you that dumping the array can help you print_r($order_total_array) put this just before the return $ot_total_array Edited August 4, 2009 by PWS Quote Link to comment Share on other sites More sharing options...
Thinkmarriage.org Posted August 4, 2009 Share Posted August 4, 2009 I am sure someone has asked this already, but I cannot find in the the post list, so. . . Is there a way to change the install directories so that this will work with OC version 3.0? thanks much --Jack Quote Link to comment Share on other sites More sharing options...
BigJ Posted August 4, 2009 Share Posted August 4, 2009 Hi Forum folks, I have a website with free shipping standard for all products. Now I want to offer a 20% discount coupon and add a $5.00 shipping fee if you use the coupon code. Is this possible? BigJ Quote Link to comment Share on other sites More sharing options...
rselonke Posted August 5, 2009 Share Posted August 5, 2009 (edited) i forgot to tell you that dumping the array can help you print_r($order_total_array) put this just before the return $ot_total_array Hmm, now i'm really confused! i used print_r() as you suggested, and got the array. So i then used it both before AND after the unset() function. print_r($order_total_array); if ($order_total_array[0] = 'ot_quantity_discount') { echo "yes, i'm falling here "; unset($order_total_array[2]); echo ' |---| '; } print_r($order_total_array); It does indeed remove the ot_quantity_discount from the array. however the calculations have all been done and are in the array as values which have been reduced by the ot_quantity_discount in the SECOND print_r() AFTER the unset ahs been called. How do i recalculate the values? Any ideas? I was thinking maybe pre-empt the modules from doing ->output = array... or something else in the "function process() {" to prevent the calculations if the discount_coupon held data in the 'value' field. thanks again, you're a great help to me. rich Edited August 5, 2009 by rselonke Quote Link to comment Share on other sites More sharing options...
PWS Posted August 5, 2009 Share Posted August 5, 2009 please, paste here the array first and after so that I can see the difference Quote Link to comment Share on other sites More sharing options...
beckiehawk Posted August 9, 2009 Share Posted August 9, 2009 I've installed the module and see "Discount Coupons" under "Catalog" in the admin area, but when I click the "Discount Coupons" link, I get a "Page Not Found" error: 404 Not Found The requested URL /bookstore/admin/FILENAME_DISCOUNT_COUPONS does not exist. I've run the SQL you provided in the instructions, I've double checked to make sure I uploaded all the files into all the right directories. Any ideas about what's happening here? Quote Link to comment Share on other sites More sharing options...
CutPriceClothing Posted August 9, 2009 Share Posted August 9, 2009 Hi, Does anyone know which version I would need to download to get it working on v2.2RC2? Using the latest version distorts the checkout pages. Thanks Quote Link to comment Share on other sites More sharing options...
Jonnoa2 Posted August 11, 2009 Share Posted August 11, 2009 I have Oscommerce V2.2.RC2 with ot_discount_coupon_codes_3_34 installed and PayPal Website Payments Standard. Everything works fine until I go to confirm order. With No discount code applied when I confirm order it goes straight through to PayPal, but with a discount code applied I get the following error. 'This invoice has already been paid. For more information, please contact the merchant' Can anyone please help Quote Link to comment Share on other sites More sharing options...
oxdog Posted August 14, 2009 Share Posted August 14, 2009 Hi There, I've had this contribution running for about a year now but keep getting complaints from my users. Right now the coupon is entered after the credit card info. If the discount changes the shipping cost the screen resets back to the shipping page and the customer has to re-enter their CC info again. I've spent hours looking for an answer but have found none. Anyone know if the entry can be moved before the shipping page and how to do it? Thanks, OX Quote Link to comment Share on other sites More sharing options...
appstyle Posted August 14, 2009 Share Posted August 14, 2009 I've installed the module and see "Discount Coupons" under "Catalog" in the admin area, but when I click the "Discount Coupons" link, I get a "Page Not Found" error: 404 Not Found The requested URL /bookstore/admin/FILENAME_DISCOUNT_COUPONS does not exist. I've run the SQL you provided in the instructions, I've double checked to make sure I uploaded all the files into all the right directories. Any ideas about what's happening here? Did you add to admin/includes/filenampes.php at the bottom of the page before the closing ?> //kgt - discount coupons define('FILENAME_DISCOUNT_COUPONS','coupons.php'); define('FILENAME_DISCOUNT_COUPONS_MANUAL', 'coupons_manual.html'); define('FILENAME_DISCOUNT_COUPONS_EXCLUSIONS', 'coupons_exclusions.php'); //end kgt - discount coupons Quote Link to comment Share on other sites More sharing options...
appstyle Posted August 14, 2009 Share Posted August 14, 2009 I had an SQL error... #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 'DEFAULT CHARSET=latin1' at line 13 My SQL databse knowledge and operation is very little. Please can someone tell me what I should do. Thanks Quote Link to comment Share on other sites More sharing options...
TracyS Posted August 14, 2009 Share Posted August 14, 2009 Do a google search by pasting this into the search box (including the quotes): site:www.oscommerce.com/forums "Warning: Cannot modify header information - headers already sent" This should bring up a whole list of spots in the forums where people have come accross this error and how to fix it as it's a common one :) anyone knows how to fix the following error caused by discount_coupon.php.... Warning: Illegal offset type in /homepages/13/d269723143/htdocs/store/includes/classes/discount_coupon.php on line 361 Warning: Illegal offset type in isset or empty in /homepages/13/d269723143/htdocs/store/includes/classes/discount_coupon.php on line 364 Warning: Illegal offset type in /homepages/13/d269723143/htdocs/store/includes/classes/discount_coupon.php on line 365 Warning: Cannot modify header information - headers already sent by (output started at /homepages/13/d269723143/htdocs/store/includes/classes/discount_coupon.php:361) in /homepages/13/d269723143/htdocs/store/includes/functions/general.php on line 33 Quote ~Tracy Link to comment Share on other sites More sharing options...
TracyS Posted August 14, 2009 Share Posted August 14, 2009 In your admin panel, go under modules, Order Total and under the discount coupons area there is a setting to exclude specials from the coupons :) The contribution works!!!One question though: how do I add CATEGORY SPECIALS to exclusion list? I am thinking that those are on sale anyway and would like to exclude those products from further discount. Thanks alot for the contribution!!! Quote ~Tracy Link to comment Share on other sites More sharing options...
ChilliNr1 Posted August 18, 2009 Share Posted August 18, 2009 Hi, the Coupon is working fine for me, except one little thing: I set the min. order amount at 20Euro and give a discount over 10Euro. If your cart has an amount from 1-9Euro, you`ll get an error message! From 10-xxxEuro, you`ll get the discount. But you shouldn`t! Only for 20Euro and up... Why is there a 10Euro "discount hole"? If I set the amount to 30Euro, it works fine!!! The only thing is, under 20Euro cart worth, the error message says: "Min. amount is 30Euro!" Not right but working this way. Where`s the hook? Is it in includes/classes/discount_coupon.php? Maybe here somewhere: function check_coupons_min_order() { switch( $this->coupon['coupons_min_order_type'] ) { //minimum number of products: case 'quantity': global $cart; $total = $this->cart_info['valid_products']['count']; if( $this->coupon['coupons_min_order'] > $total ) { //make sure there are enough products in the cart $this->message( sprintf( ENTRY_DISCOUNT_COUPON_MIN_QUANTITY_ERROR, $this->coupon['coupons_min_order'] ) ); if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Failed to pass check_coupons_min_order(): $total='.$total, 'debug' ); return false; } break; //minimum price: case 'price': default: global $order, $currencies; $total = $this->cart_info['valid_products']['total']; //if we display the subtotal without the discount applied, then just compare the subtotal to the minimum order if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' && $this->coupon['coupons_min_order'] > $total ) { $this->message( sprintf( ENTRY_DISCOUNT_COUPON_MIN_PRICE_ERROR, $currencies->format( $this->coupon['coupons_min_order'], true, $order->info['currency'], $order->info['currency_value'] ) ).'.' ); if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Failed to pass check_coupons_min_order(): $total='.$total, 'debug' ); return false; //if we display the subtotal with the discount applied, then we need to compare the subtotal with the discount added back in to the minimum order } else if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'true' ) { $subtotal = $total; foreach( $this->applied_discount as $discount ) { $subtotal += $discount; } if( $this->coupon['coupons_min_order'] > $subtotal ) { $this->message( sprintf( ENTRY_DISCOUNT_COUPON_MIN_PRICE_ERROR, $currencies->format( $this->coupon['coupons_min_order'], true, $order->info['currency'], $order->info['currency_value'] ) ).'.' ); if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DEBUG == 'true' ) $this->message( 'INFO: Failed to pass check_coupons_min_order(): $subtotal='.$subtotal, 'debug' ); return false; } } break; } return true; } I`m not sure... Thank you for your time! ChilliNr1 Quote Link to comment Share on other sites More sharing options...
pickyourbag Posted August 20, 2009 Share Posted August 20, 2009 Step 3 of the instructions tells you that you need to run two statements via phpMyAdmin (generally available via your host's control panel). You need to select your OSC database, then click the SQL tab along the top. Copy and paste the following two statements into the text area provided and click Go. Is it possible for someone to fill me in the other steps that are involved in this process. I installed this code as it says in the instructions but when I go to my admin>catalog, I do not see the discount coupon config to install it. What am I missing? I am not knowledgeable at all in this and a step by step scenario would really help me to figure out how to install this. Thank you everyone for your time. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 23, 2009 Share Posted August 23, 2009 Discount Coupon value gets added to the sub total rather then deduct from subtotalanyone knows how to fix this? I also have the exact same problem. I have Oscommerce V2.2.RC2 with ot_discount_coupon_codes_3_34 installed. I do not see anywhere where its answered directly. I have checked my installation and all seems well. Any answers? Quote Link to comment Share on other sites More sharing options...
Stroker396 Posted August 26, 2009 Share Posted August 26, 2009 I think I have a contribution confict here. When I go to click on the admin link it tried to take me to FILENAME_COUPON_ADMIN?selected_box=gv_admin and I get nothing, could this be because of the Ultimate SEO contrib or the Header Tags SEO? or is this somthing that has been encountered before and i need to go back and read up Quote The Site can be viewed at www.performanceautopartsonline.com The site is live (despite these minor glitches) please respect that and do not sign up etc... maybe a contribution one day when I get this site the way I want it. I don't make spelling mistakes! I have dyslecsic fingers. Link to comment Share on other sites More sharing options...
Stroker396 Posted August 27, 2009 Share Posted August 27, 2009 Ok I got it working. Do we have any programmers following this thread? This is not as sophisticated as the CCGV contribution and I was wondering if a couple of those files could be modified to work with this contribution. Namely: being able to limit the products or categories that the discount coupon can be applied to you could give someone a discount on an expensive item say $100 off and if they apply that to a cheaper item that only cost $125 you end up giving it away (if you honor it) Quote The Site can be viewed at www.performanceautopartsonline.com The site is live (despite these minor glitches) please respect that and do not sign up etc... maybe a contribution one day when I get this site the way I want it. I don't make spelling mistakes! I have dyslecsic fingers. Link to comment Share on other sites More sharing options...
Stroker396 Posted August 27, 2009 Share Posted August 27, 2009 again my bad I just noticed that it is applied after the coupon is created, disregard. Doh Excellent contribution. Quote The Site can be viewed at www.performanceautopartsonline.com The site is live (despite these minor glitches) please respect that and do not sign up etc... maybe a contribution one day when I get this site the way I want it. I don't make spelling mistakes! I have dyslecsic fingers. Link to comment Share on other sites More sharing options...
Stroker396 Posted August 27, 2009 Share Posted August 27, 2009 Major Problem! So as I am going though all of the testing i now find that the amount for the total after the payment information is entered is being doubled and i cannot seem to find out why. Quote The Site can be viewed at www.performanceautopartsonline.com The site is live (despite these minor glitches) please respect that and do not sign up etc... maybe a contribution one day when I get this site the way I want it. I don't make spelling mistakes! I have dyslecsic fingers. Link to comment Share on other sites More sharing options...
ChilliNr1 Posted August 27, 2009 Share Posted August 27, 2009 Do we have any programmers following this thread? Hi, same question from me? "Is there anybody out there, help us..." :blink: Greets! Quote Link to comment Share on other sites More sharing options...
true-tigger Posted August 27, 2009 Share Posted August 27, 2009 Ok, so need some help. installed the module, but its not giving me the box to put the code in. Changed the if statement on checkout_payment.php to if status is not true, and it comes up, but says coupon code not valid. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 31, 2009 Share Posted August 31, 2009 I installed this contrib on yesterday and all seemed to go well until the end. When I login to the admin panel and go to modules -> order total, I can see the coupon module (good). When I highlight it and click the install button on the right, nothing happens (bad). Is there a file I missed or some common issue before I try to uninstall and start over? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
kajano Posted September 2, 2009 Share Posted September 2, 2009 Everything is working great until I want to edit or delete existing coupon. When I try to edit it, I get this error and I cann: Warning: reset() [function.reset]: Passed variable is not an array or object in /home1/xxxxxx/public_html/trgovina/admin/includes/classes/object_info.php on line 17 Warning: Variable passed to each() is not an array or object in /home1/xxxxxxx/public_html/trgovina/admin/includes/classes/object_info.php on line 18 And when I confirm the delete of existing coupon, it just reloads and nothing happens. Coupon is still there. What could be the problem? Recently I migrated my store to another server (hosting) and I had some PHP5 or MySQL5 upgrade errors, which I have already solved. 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.