resoman Posted October 30, 2007 Share Posted October 30, 2007 Hello everyone, After browsing I didnt see a similar issue so I will post. I currently have a website bavender.com with osc ms 2.2 with numerous contribs installed including Discount Coupon Codes. It works fantastic, however it does not apply to the order total, just the subtotal. I want to have a customer to be able to use the coupon code to be able to purchase an item entirely free. How is it I can apply the coupon to the complete order? Also, I saw someone ask previously in the forum, has anyone developed a system to use 2 codes at once? Say they have a 10% off and a $5.00 coupon, is that possible? Quote Jesse Rooney Link to comment Share on other sites More sharing options...
pure11 Posted October 30, 2007 Share Posted October 30, 2007 installed and everything works except the discount is not subtracted in checkout shows: United States Postal Service (1 x 5lbs) (Priority Mail): $6.30 Sub-Total: $45.51 CA TAX 7.75%: $3.53 Discount Coupon coupon1 applied: -$2.40 Total: $55.33 as you can see discount shows, but discount not being applied its weird because this was working before, not sure why its not now. how do i fix ? thanks Quote Link to comment Share on other sites More sharing options...
pure11 Posted October 30, 2007 Share Posted October 30, 2007 installed and everything works except the discount is not subtracted in checkout shows: United States Postal Service (1 x 5lbs) (Priority Mail): $6.30 Sub-Total: $45.51 CA TAX 7.75%: $3.53 Discount Coupon coupon1 applied: -$2.40 Total: $55.33 as you can see discount shows, but discount not being applied its weird because this was working before, not sure why its not now. how do i fix ? thanks edited... nevermind the above!! it does work, its just confusing thats why i thought the discount wasnt being applied see here: 1 x FX The Video $19.97 1 x Graffit'Instincts vol.1 (DVD) $24.94 1 x Pilot Permanent Ink - Color: Red $2.99 United States Postal Service (1 x 5lbs) (Priority Mail): $6.30 Sub-Total: $45.51 CA TAX 7.75%: $3.53 Discount Coupon pureg applied: -$2.40 Total: $55.33 copy and pasted as you can see, its not showing the correct SUB TOTAL because the sub total should read: $54.02 with shipping included but its just showing: $45.51 (ITS APPLYING THE DISCOUNT ALREADY) so then this is very confusing, how do i change the discount to show before United States Postal Service line is showed? and the TAX shown after the discount thanks Quote Link to comment Share on other sites More sharing options...
resoman Posted October 30, 2007 Share Posted October 30, 2007 No, because this discount happens before tax. If it happened after tax, then there wouldn't be this issue. (If it happens after tax, then it's more of a gift certificate.) How do you get it to calculate after tax & shipping have been totaled? So it does act similar to a gift cert... Quote Jesse Rooney Link to comment Share on other sites More sharing options...
agrafuese Posted October 30, 2007 Share Posted October 30, 2007 How do you get it to calculate after tax & shipping have been totaled? So it does act similar to a gift cert... resoman, check out a contribution called CCGV(trad)...i haven't tried it myself, but it sounds more like what you're looking for. as far as i know, DCC won't discount after calculating shipping (i could be wrong though), and whether or not you can legally discount after tax depends on where you are doing business from. for example, in california, we can't do that because it goes against our business laws, so we have to apply tax after the discount. anyway, i'm not sure how or if you can do it anyway, even if it is legal where you are. good luck, agra Quote Link to comment Share on other sites More sharing options...
gaspower Posted October 30, 2007 Share Posted October 30, 2007 Hello, I am using the coupon discount and it works great. Was wondering if there was a way to link it to new accounts so when they register, and automatic coupon gets emailed to them? Thanks JR Quote Link to comment Share on other sites More sharing options...
resoman Posted October 30, 2007 Share Posted October 30, 2007 resoman, check out a contribution called CCGV(trad)...i haven't tried it myself, but it sounds more like what you're looking for. as far as i know, DCC won't discount after calculating shipping (i could be wrong though), and whether or not you can legally discount after tax depends on where you are doing business from. for example, in california, we can't do that because it goes against our business laws, so we have to apply tax after the discount. anyway, i'm not sure how or if you can do it anyway, even if it is legal where you are. good luck, agra Thanks for the response, I dont believe its illegal to pay for tax with a paid for gift card (which is what I am trying to do). But thanks for letting me know, I will consult my client on that. I had this contrib installed for coupons but tried to extend it to gift cards (yeah, im lazy....) Hopefully CCGV traditional will work in tandem with discount coupons, wish meh luck! Quote Jesse Rooney Link to comment Share on other sites More sharing options...
ScampNZ Posted October 31, 2007 Share Posted October 31, 2007 Discount Coupons 1054 - Unknown column 'cd.date_end' in 'order clause' select * from discount_coupons cd order by cd.date_end, date_start limit 0, 20 [TEP STOP] I am still getting the above error. I have redone the sql query (both tables already existed). below is the sql statements I am using - so maybe there is an error in there? CREATE TABLE discount_coupons ( coupons_id varchar(32) NOT NULL default '', coupons_description varchar(64) NOT NULL default '', coupons_discount_percent decimal(7,4) default NULL, date_start datetime default NULL, date_end datetime default NULL, max_use int(3) NOT NULL default 0, min_order decimal(15,4) NOT NULL default '0.0000', PRIMARY KEY (coupons_id) ); CREATE TABLE discount_coupons_to_orders ( discount_coupons_to_orders_id int(11) NOT NULL auto_increment, coupons_id varchar(32) default NULL, orders_id int(11) default 0, PRIMARY KEY (discount_coupons_to_orders_id) ); I really need to get this sorted as I have now got discount vouchers waiting to be used by customers. Quote Link to comment Share on other sites More sharing options...
mbuswell Posted October 31, 2007 Share Posted October 31, 2007 Discount Coupons 1054 - Unknown column 'cd.date_end' in 'order clause' select * from discount_coupons cd order by cd.date_end, date_start limit 0, 20 [TEP STOP] In my install the field is not date_start but rather coupons_date start so this query works select * from discount_coupons cd order by cd.coupons_date_end, coupons_date_start limit 0, 20 Quote Link to comment Share on other sites More sharing options...
mbuswell Posted October 31, 2007 Share Posted October 31, 2007 If you are using the PWA - Proceed without an Account contribution you will need to be aware of a couple of things with this contribution. PWA doesnt by default store a seperate shipping to billing address so you need to modify catalog/includes/classes/discount_coupons.php where it checks the shipping zone to use the billto value ie: //shipping zone exclusions //MB: modified for PWA which only uses billto if ($customer_id>0) { $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 ).'"' ); } else { if (! $billto['country_id']) { $billto['country_id'] = 0; } $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 = 0 or z2g.zone_id IS NULL ) AND ( z2g.zone_country_id='.$billto['country_id'].' or z2g.zone_country_id = 0 ) AND dc2z.coupons_id="'.tep_db_input( $code ).'"' ); } //MB: end PWA modify I couldnt find the zone_id in billto attributes so for now i default to 0. That should get your store working for people that select to PWA. What you also need to be aware of though, is you cannot use One coupon per customer with PWA, because all customer_ids for PWA accounts are created as customer_id=0. There will need to be another fix made to DCC that basically skips checking if customer_id=0 or even excludes the coupon if a person did not register, but I didn't have time to get that updated yet. When I do I will make a proper update to the contribution for it - but for now I wanted to add this to the forum in case anyone else was having issues. Quote Link to comment Share on other sites More sharing options...
ScampNZ Posted October 31, 2007 Share Posted October 31, 2007 In my install the field is not date_start but rather coupons_date start so this query works select * from discount_coupons cd order by cd.coupons_date_end, coupons_date_start limit 0, 20 How do I change it? I tried changing the query to say coupons_date start and end but it is still giving me this error Quote Link to comment Share on other sites More sharing options...
mbuswell Posted October 31, 2007 Share Posted October 31, 2007 How do I change it? I tried changing the query to say coupons_date start and end but it is still giving me this error coupons_date start = coupons_date_start (the sql query I did included was correct though) can you do a describe discount_coupons; in sql and let me know the results Quote Link to comment Share on other sites More sharing options...
ScampNZ Posted October 31, 2007 Share Posted October 31, 2007 coupons_date start = coupons_date_start (the sql query I did included was correct though) can you do a describe discount_coupons; in sql and let me know the results Field Type Null Key Default Extra coupons_id varchar(32) PRI coupons_description varchar(64) coupons_discount_percent decimal(7,4) YES NULL coupons_date_start datetime YES NULL coupons_date_end datetime YES NULL max_use int(3) 0 min_order decimal(15,4) 0.0000 Is that what you are meaning? Quote Link to comment Share on other sites More sharing options...
mbuswell Posted November 1, 2007 Share Posted November 1, 2007 Field Type Null Key Default Extracoupons_id varchar(32) PRI coupons_description varchar(64) coupons_discount_percent decimal(7,4) YES NULL coupons_date_start datetime YES NULL coupons_date_end datetime YES NULL max_use int(3) 0 min_order decimal(15,4) 0.0000 Is that what you are meaning? Yes so your date_start is definately called coupons_date_start, I bolded it above in your quote. Just try the query select * from discount_coupons cd order by cd.coupons_date_end, coupons_date_start limit 0, 20 that should work Quote Link to comment Share on other sites More sharing options...
ScampNZ Posted November 1, 2007 Share Posted November 1, 2007 Yes so your date_start is definately called coupons_date_start, I bolded it above in your quote. Just try the query select * from discount_coupons cd order by cd.coupons_date_end, coupons_date_start limit 0, 20 that should work Still get this error Discount Coupons 1054 - Unknown column 'cd.date_end' in 'order clause' select * from discount_coupons cd order by cd.date_end, date_start limit 0, 20 [TEP STOP] I think I am doing something wrong but have no idea what. Quote Link to comment Share on other sites More sharing options...
Benjjj6 Posted November 1, 2007 Share Posted November 1, 2007 Hi Is there a way to get this contribution to work with the PayPal IPN module when using the 'Per Item' option in PayPal? Currently the discount is only applied if I choose to send the items to PayPal using the 'Aggregate' mode. I would much rather use the per item option although this means the discount that was applied by Discount Coupon Codes is not passed onto PayPal. I see in the contribution history someone may have managed to do this although that was back in December 2006 and using PayPal IPN version 1.4. Currently the module is on version 2.3 So I doubt it would work now. Does anyone have a solution to this? Thanks, Ben Quote Link to comment Share on other sites More sharing options...
Tradesman300 Posted November 2, 2007 Share Posted November 2, 2007 I installed Discount Coupon codes last night, I got most of it up and running including the admin panel and setting up coupons, but when I actually go to open the catalog I get the following error: Warning: main(includes/filenames.php): failed to open stream: No such file or directory in /home/code72ne/public_html/osCommerce/catalog/includes/application_top.php on line 53 Warning: main(includes/filenames.php): failed to open stream: No such file or directory in /home/code72ne/public_html/osCommerce/catalog/includes/application_top.php on line 53 Fatal error: main(): Failed opening required 'includes/filenames.php' (include_path='.:/usr/local/lib/php') in /home/code72ne/public_html/osCommerce/catalog/includes/application_top.php on line 53 can anyone help me? Thanks Erik Quote Link to comment Share on other sites More sharing options...
goodwinpro Posted November 2, 2007 Share Posted November 2, 2007 Works Great... One problem though.... When I have two items in the cart (one from my 'exclusions' list, and one that I can use a coupon with), my coupon code box does not show up. I get a coupon code option if ALL of the items in the cart are eligible for the coupon. But one non-eligible item makes the coupon option disappear completely. Any thoughts on this problem? Thanks Quote Link to comment Share on other sites More sharing options...
ScampNZ Posted November 3, 2007 Share Posted November 3, 2007 just a small update - all is working fine. just for future reference to anyone who encounters the same issue. This is NOT an issue with SQL simply a case of missing admin files. basically as a last resort before removing it, I went through and made sure all the files were copied over and refresh my admin page to check things were working or not working. I have no idea which file was causing the problem as it asked to overwrite each one but whatever happened it is now working!!!!! it feels good having it working and I know NOTHING about coding!!! Quote Link to comment Share on other sites More sharing options...
Kopite Posted November 3, 2007 Share Posted November 3, 2007 Hi, All seems to be working good except EXCLUSIONS. None seem to be working. I created a discounted shipping code for 1 product. I excluded all other manufacturers, categories and products. But I can apply the code to all products. Thanks. Quote Link to comment Share on other sites More sharing options...
mbuswell Posted November 3, 2007 Share Posted November 3, 2007 Still get this error Discount Coupons 1054 - Unknown column 'cd.date_end' in 'order clause' select * from discount_coupons cd order by cd.date_end, date_start limit 0, 20 [TEP STOP] I think I am doing something wrong but have no idea what. date_end and date_start are not the names of the fields so anywhere you see that you will get an error it needs to be coupons_date_start and coupons_date_end where are you getting these incorrect queries from? Quote Link to comment Share on other sites More sharing options...
ScampNZ Posted November 4, 2007 Share Posted November 4, 2007 date_end and date_start are not the names of the fields so anywhere you see that you will get an error it needs to be coupons_date_start and coupons_date_end where are you getting these incorrect queries from? Thought I had posted but I have fixed this problem and the problem was NOT with SQL but a file hadn't uploaded correctly and was coursing the problem. Quote Link to comment Share on other sites More sharing options...
businessowner123 Posted November 5, 2007 Share Posted November 5, 2007 This is a wonderful contribution. You did an awesome job!!! =) I was wondering if there is a chance that somehow there will one day be an addition to this contribution, such as an automatic discount after a certain minimum price is achieved at checkout? And not having it entered manually by a customer. I'm currently looking for this right now, such as 15% off any order $35.00 and over. However, I'm not having any luck. Any help would be greatly appreciated!!! Have a wonderful day! Quote Link to comment Share on other sites More sharing options...
LooInSpain Posted November 5, 2007 Share Posted November 5, 2007 Hi all, kgt this is a fantastic contribution, nice work. I'm having a slight problem with it though, the codes work fine, everything works brilliant throughout the shop, BUT when looking at the orders in admin, all orders that have had the discount code applied do not show the order confirmation, comments etc. boxes. The order cannot be edited from pending to delivered, which is a problem. Have I missed soemthing from the install, or is this a common thing. Is there a way I can get the order edit selection back, as it is fine with all orders not placed with a discount, only with orders placed with a discount do I lose the comments table Any help would be great Sorry to have to post this again, but it's driving me nuts. I just can't figure out why anything that has had a discount applied to it cannot be edited afterwards... Please Help me Guys Quote Link to comment Share on other sites More sharing options...
bobbyours Posted November 5, 2007 Share Posted November 5, 2007 hello is it possible to put the url of the coupon code in the url ? example : www.site.com/product_info.php?coupon= .... or the same into a category listing ? thanks 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.
Note: Your post will require moderator approval before it will be visible.