TracyS Posted May 14, 2010 Share Posted May 14, 2010 This is my Checkout_payment.php file. I am assuming it is within this file that the error has occured but can't see where. You'll notice this bit in the code of that file: <?php /* kgt - discount coupons */ if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true' ) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo TABLE_HEADING_COUPON; ?></b></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo ENTRY_DISCOUNT_COUPON.' '.tep_draw_input_field('coupon', '', 'size="32"'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } /* end kgt - discount coupons */ This is the bit of code that displays the box to enter the coupon code. Notice it starts with an "if" statement: if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true' ) { This statement is checking to make sure that Discount Coupons have been enabled - which is done on the Admin side under Modules > Order Total > Discount Coupons. Have you enabled this module there? Quote ~Tracy Link to comment Share on other sites More sharing options...
marce6620 Posted May 15, 2010 Share Posted May 15, 2010 my problem is this when i go into my admin area and click on calaog no label for coupons is showing up. you help on this would be great. my catalog.php code is <!-- catalog //--> <tr> <td> <?php $heading = array(); $contents = array(); $heading[] = array('text' => BOX_HEADING_CATALOG, 'link' => tep_href_link(FILENAME_CATEGORIES, 'selected_box=catalog')); if ($selected_box == 'catalog' || $menu_dhtml == true) { $contents[] = array('text' => //Admin begin tep_admin_files_boxes(FILENAME_CATEGORIES, BOX_CATALOG_CATEGORIES_PRODUCTS) . tep_admin_files_boxes(FILENAME_PRODUCTS_ATTRIBUTES, BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES) . tep_admin_files_boxes(FILENAME_OPTIONS_IMAGES, BOX_CATALOG_OPTIONS_IMAGES) . tep_admin_files_boxes(FILENAME_PACKAGING, BOX_TOOLS_PACKAGING) . tep_admin_files_boxes(FILENAME_FEATURED, BOX_CATALOG_FEATURED_PRODUCTS) . tep_admin_files_boxes(FILENAME_PRODUCTS_MULTI, BOX_CATALOG_CATEGORIES_PRODUCTS_MULTI) . tep_admin_files_boxes(FILENAME_EASYPOPULATE, BOX_CATALOG_EASYPOPULATE) . tep_admin_files_boxes(FILENAME_QUICK_UPDATES, BOX_CATALOG_QUICK_UPDATES) . tep_admin_files_boxes(FILENAME_MANUFACTURERS, BOX_CATALOG_MANUFACTURERS) . tep_admin_files_boxes(FILENAME_REVIEWS, BOX_CATALOG_REVIEWS) . tep_admin_files_boxes(FILENAME_SPECIALS, BOX_CATALOG_SPECIALS) . tep_admin_files_boxes(FILENAME_SALEMAKER, BOX_CATALOG_SALEMAKER) . tep_admin_files_boxes(FILENAME_XSELL_PRODUCTS, BOX_CATALOG_XSELL_PRODUCTS) . tep_admin_files_boxes(FILENAME_STAR_PRODUCT, BOX_STAR_PRODUCT) . tep_admin_files_boxes(FILENAME_GET_1_FREE, BOX_CATALOG_GET_1_FREE) . tep_admin_files_boxes(FILENAME_PRODUCTS_EXPECTED, BOX_CATALOG_PRODUCTS_EXPECTED) . tep_admin_files_boxes(FILENAME_DISCOUNT_COUPONS, BOX_CATALOG_DISCOUNT_COUPONS) . tep_admin_files_boxes(FILENAME_PRODUCTS_EXTRA_IMAGES, BOX_CATALOG_CATEGORIES_PRODUCTS_EXTRA_IMAGES) . tep_admin_files_boxes(FILENAME_PRODUCTS_EXTRA_FIELDS, BOX_CATALOG_PRODUCTS_EXTRA_FIELDS)); //Admin end } $box = new box; echo $box->menuBox($heading, $contents); ?> </td> </tr> <!-- catalog_eof //--> What´s wrong ? Quote Link to comment Share on other sites More sharing options...
Guest Posted May 16, 2010 Share Posted May 16, 2010 You see no error message because of the template. For some reason, most people who create templates seem content to leave out some of the default OSC error messaging. The invalid coupon message will be displayed when: 1) The code is not found in the table 2) The start date is after today 3) The end date is before today In most cases this happens, the start or end date is before/after today. This can happen because the coupon admin expects dates in the format specified by your admin/includes/languages/english.php and you've entered the date in a different format. Hi, Excited to get this up and running, but have a similar issue to Mike999. My template does seem to support error messaging, but any errors generated are within "hidden fields". <input type="hidden" value="The coupon code you have entered is not valid." name="error_message"> I understand I could probably just echo this error message further down the page and take off the "hidden" attribute, however I'm not that technical yet! Any ideas?! Thanks, and I hope to hear from you soon. Mic Quote Link to comment Share on other sites More sharing options...
Guest Posted May 16, 2010 Share Posted May 16, 2010 Hi, Excited to get this up and running, but have a similar issue to Mike999. My template does seem to support error messaging, but any errors generated are within "hidden fields". <input type="hidden" value="The coupon code you have entered is not valid." name="error_message"> I understand I could probably just echo this error message further down the page and take off the "hidden" attribute, however I'm not that technical yet! Any ideas?! Thanks, and I hope to hear from you soon. Mic Please ignore - resolved it :) Quote Link to comment Share on other sites More sharing options...
JoeB Posted May 20, 2010 Share Posted May 20, 2010 Hi, I love this contribution everything works great. I wanted to know if someone could help me make a slight change. I have added a contribution called deposit payments for my test store. I have higher dollar value items that I sell and needed to have the ability to let the customer send in a deposit. Then make another or finish paying and the product is sent. I make custom drum sets. I need to make a slight change to some code in either checkout_payment or checkout confirmation or payment.php to be able to not allow the discount coupon code be used with either my 25% deposit payment plan or the 50% deposit payment plan. Does anyone know of a thread that may have something like this done before that would be customized for something else that I can look at and do the coding or if someone would be so kind to help with this coding to do it. I am hoping that it would not be too much coding. I would love to have it give the user an error when they use either deposit payments with the discount codes. Thanks for everyone help in advance. Quote Link to comment Share on other sites More sharing options...
actarus1011 Posted May 20, 2010 Share Posted May 20, 2010 HI... I'm still having troubles to apply coupons when the customer is a company with intracom VAT number (I've this contributions installed, so that customer with valid VAT number in EUROPE do not have to pay VAT). In this particular case, customer has the opportunity to enter the code, but it's never applied (probably due to the fact that no tax is applied)... Has anybody solved that problem ? Quote Link to comment Share on other sites More sharing options...
Guest Posted May 20, 2010 Share Posted May 20, 2010 You'll notice this bit in the code of that file: <?php /* kgt - discount coupons */ if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true' ) { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo TABLE_HEADING_COUPON; ?></b></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo ENTRY_DISCOUNT_COUPON.' '.tep_draw_input_field('coupon', '', 'size="32"'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } /* end kgt - discount coupons */ This is the bit of code that displays the box to enter the coupon code. Notice it starts with an "if" statement: if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true' ) { This statement is checking to make sure that Discount Coupons have been enabled - which is done on the Admin side under Modules > Order Total > Discount Coupons. Have you enabled this module there? Hi, Yes I have enabled the module. Quote Link to comment Share on other sites More sharing options...
marce6620 Posted May 20, 2010 Share Posted May 20, 2010 my problem is this when i go into my admin area and click on calaog no label for coupons is showing up. you help on this would be great. my catalog.php code is <!-- catalog //--> <tr> <td> <?php $heading = array(); $contents = array(); $heading[] = array('text' => BOX_HEADING_CATALOG, 'link' => tep_href_link(FILENAME_CATEGORIES, 'selected_box=catalog')); if ($selected_box == 'catalog' || $menu_dhtml == true) { $contents[] = array('text' => //Admin begin tep_admin_files_boxes(FILENAME_CATEGORIES, BOX_CATALOG_CATEGORIES_PRODUCTS) . tep_admin_files_boxes(FILENAME_PRODUCTS_ATTRIBUTES, BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES) . tep_admin_files_boxes(FILENAME_OPTIONS_IMAGES, BOX_CATALOG_OPTIONS_IMAGES) . tep_admin_files_boxes(FILENAME_PACKAGING, BOX_TOOLS_PACKAGING) . tep_admin_files_boxes(FILENAME_FEATURED, BOX_CATALOG_FEATURED_PRODUCTS) . tep_admin_files_boxes(FILENAME_PRODUCTS_MULTI, BOX_CATALOG_CATEGORIES_PRODUCTS_MULTI) . tep_admin_files_boxes(FILENAME_EASYPOPULATE, BOX_CATALOG_EASYPOPULATE) . tep_admin_files_boxes(FILENAME_QUICK_UPDATES, BOX_CATALOG_QUICK_UPDATES) . tep_admin_files_boxes(FILENAME_MANUFACTURERS, BOX_CATALOG_MANUFACTURERS) . tep_admin_files_boxes(FILENAME_REVIEWS, BOX_CATALOG_REVIEWS) . tep_admin_files_boxes(FILENAME_SPECIALS, BOX_CATALOG_SPECIALS) . tep_admin_files_boxes(FILENAME_SALEMAKER, BOX_CATALOG_SALEMAKER) . tep_admin_files_boxes(FILENAME_XSELL_PRODUCTS, BOX_CATALOG_XSELL_PRODUCTS) . tep_admin_files_boxes(FILENAME_STAR_PRODUCT, BOX_STAR_PRODUCT) . tep_admin_files_boxes(FILENAME_GET_1_FREE, BOX_CATALOG_GET_1_FREE) . tep_admin_files_boxes(FILENAME_PRODUCTS_EXPECTED, BOX_CATALOG_PRODUCTS_EXPECTED) . tep_admin_files_boxes(FILENAME_DISCOUNT_COUPONS, BOX_CATALOG_DISCOUNT_COUPONS) . tep_admin_files_boxes(FILENAME_PRODUCTS_EXTRA_IMAGES, BOX_CATALOG_CATEGORIES_PRODUCTS_EXTRA_IMAGES) . tep_admin_files_boxes(FILENAME_PRODUCTS_EXTRA_FIELDS, BOX_CATALOG_PRODUCTS_EXTRA_FIELDS)); //Admin end } $box = new box; echo $box->menuBox($heading, $contents); ?> </td> </tr> <!-- catalog_eof //--> What´s wrong ? any help?? Quote Link to comment Share on other sites More sharing options...
JoeB Posted May 20, 2010 Share Posted May 20, 2010 Hi, I love this contribution everything works great. I wanted to know if someone could help me make a slight change. I have added a contribution called deposit payments for my test store. I have higher dollar value items that I sell and needed to have the ability to let the customer send in a deposit. Then make another or finish paying and the product is sent. I make custom drum sets. I need to make a slight change to some code in either checkout_payment or checkout confirmation or payment.php to be able to not allow the discount coupon code be used with either my 25% deposit payment plan or the 50% deposit payment plan. Does anyone know of a thread that may have something like this done before that would be customized for something else that I can look at and do the coding or if someone would be so kind to help with this coding to do it. I am hoping that it would not be too much coding. I would love to have it give the user an error when they use either deposit payments with the discount codes. Thanks for everyone help in advance. Any Ideas anyone? Quote Link to comment Share on other sites More sharing options...
nabler Posted May 21, 2010 Share Posted May 21, 2010 perfect this totally not work..... may be i too fool to use this contib... :'( Vandaman 1 Quote Link to comment Share on other sites More sharing options...
JoeB Posted May 21, 2010 Share Posted May 21, 2010 (edited) Hi, I love this contribution everything works great. I wanted to know if someone could help me make a slight change. I have added a contribution called deposit payments for my test store. I have higher dollar value items that I sell and needed to have the ability to let the customer send in a deposit. Then make another or finish paying and the product is sent. I make custom drum sets. I need to make a slight change to some code in either checkout_payment or checkout confirmation or payment.php to be able to not allow the discount coupon code be used with either my 25% deposit payment plan or the 50% deposit payment plan. Does anyone know of a thread that may have something like this done before that would be customized for something else that I can look at and do the coding or if someone would be so kind to help with this coding to do it. I am hoping that it would not be too much coding. I would love to have it give the user an error when they use either deposit payments with the discount codes. Thanks for everyone help in advance. In looking at this closer I realize that it could be done in the check_form validation JavaScript. I have been trying different things with no luck. Basically the JavaScript check_form code goes through each payment type and checks to see that a payment type has been selected or checked using the radio buttons. If it is null then the JavaScript alert function is called and the popup window is displayed and the user sees that they did not click on a radio button. I would like to have it check if the radio button for either the deposit or deposit50, 2 payment methods besides credit card and paypal, is checked and there is a valid discount coupon that they get an alert to not be able to use the discount coupon with these 2 payment methods and have to empty the text field for the discount coupon. I can display the code that check_form uses if this will help anyone help me re-code this. Let me know please. Edited May 21, 2010 by JoeB Quote Link to comment Share on other sites More sharing options...
TanjaPetro Posted May 22, 2010 Share Posted May 22, 2010 I downloaded osCommerce yesterday and I've been trying to get used to it. I downloaded this contribution and followed the instructions for installing it. I have configured the order total module. The next step says to go to Catalog > Discount Coupons. 1. When I do this (click on Catalog > Discount Coupons, I am directed from the admin area to my store. I am not able to create any discount coupons. I cannot figure out why. 2. I wanted to check to see if the coupon box would be displayed. I 'purchased' an item from my store, created an account and proceeded to checkout. The coupon box is there but when I click continue to confirm the order, this message appears: Warning: require_once(includes/classes/discount_coupon.php) [function.require-once]: failed to open stream: No such file or directory in /home/annangel/public_html/android-answers.info/checkout_confirmation.php on line 84 Fatal error: require_once() [function.require]: Failed opening required 'includes/classes/discount_coupon.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/annangel/public_html/android-answers.info/checkout_confirmation.php on line 84 Installing this coupon code contribution was my first experience with PHP so I am clueless as to where I went wrong. I have 2 distinct problems as described above. Any help will be greatly appreciated. Thank you. Quote Link to comment Share on other sites More sharing options...
c1badmofo Posted May 25, 2010 Share Posted May 25, 2010 I have installed Discount Coupon Codes 3.34 - xinxi, all is working fine. I do have one change I would like to make if someone could guide me in the right direction. I have added free shipping to products based on the categories they are, which works correctly deducting the shipping cost. However, if you add a product from a free shipping categories and a product that is excluded from free shipping the full amount is still deducted. Is there a way to only deduct the shipping amount from the products with free shipping? Quote Link to comment Share on other sites More sharing options...
gaaalmp Posted May 26, 2010 Share Posted May 26, 2010 Update has been added to http://addons.oscommerce.com/info/2679 called Paypal_IPN_2_3_4_7 Fix for QTPro v4.51b and/or Discount Coupon Codes 3.32 dated 26 May 2010 which addresses an issue where it was not passing the discounted shipping rate to Paypal if you are using Paypal IPN. Credit to Gareth for the effort in providing QTpro code, and Luca for Discount coupon fix. Great job. Regards George Quote Link to comment Share on other sites More sharing options...
mondobongo3 Posted May 28, 2010 Share Posted May 28, 2010 A little confused: On Instalation Manual it says: FIND on line 244: $shown_price = tep_add_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty']; $this->info['subtotal'] += $shown_price; REPLACE with this code: //kgt - discount coupons if( is_object( $this->coupon ) ) { $applied_discount = 0; $discount = $this->coupon->calculate_discount( $this->products[$index], $valid_products_count ); if( $discount['applied_discount'] > 0 ) $valid_products_count++; $shown_price = $this->coupon->calculate_shown_price( $discount, $this->products[$index] ); $this->info['subtotal'] += $shown_price['shown_price']; $shown_price = $shown_price['actual_shown_price']; } else { $shown_price = tep_add_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty']; $this->info['subtotal'] += $shown_price; } /************** $shown_price = tep_add_tax($this->products[$index]['final_price'], $this->products[$index]['tax']) * $this->products[$index]['qty']; $this->info['subtotal'] += $shown_price; **************/ //end kgt - discount coupons But, what I find is this: $shown_price = $currencies->calculate_price($this->products[$index]['final_price'], $this->products[$index]['tax'], $this->products[$index]['qty']); $this->info['subtotal'] += $shown_price; Should I still replace it ? Or I have to replace with something else ? It's kinda urgent. Thank you very much ! Quote Link to comment Share on other sites More sharing options...
TracyS Posted May 28, 2010 Share Posted May 28, 2010 You really need to get a file comparison program to check your files against those in the contribution and see if you missed anything. Are you sure that your database was updated? Did you update the filenames and database php files? WinMerge is a free file comparison tool that works well for ensuring that you haven't placed code in the wrong spot (what order things are called can make a difference) or that you haven't missed or mistyped some code. my problem is this when i go into my admin area and click on calaog no label for coupons is showing up. you help on this would be great. my catalog.php code is <!-- catalog //--> <tr> <td> <?php $heading = array(); $contents = array(); $heading[] = array('text' => BOX_HEADING_CATALOG, 'link' => tep_href_link(FILENAME_CATEGORIES, 'selected_box=catalog')); if ($selected_box == 'catalog' || $menu_dhtml == true) { $contents[] = array('text' => //Admin begin tep_admin_files_boxes(FILENAME_CATEGORIES, BOX_CATALOG_CATEGORIES_PRODUCTS) . tep_admin_files_boxes(FILENAME_PRODUCTS_ATTRIBUTES, BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES) . tep_admin_files_boxes(FILENAME_OPTIONS_IMAGES, BOX_CATALOG_OPTIONS_IMAGES) . tep_admin_files_boxes(FILENAME_PACKAGING, BOX_TOOLS_PACKAGING) . tep_admin_files_boxes(FILENAME_FEATURED, BOX_CATALOG_FEATURED_PRODUCTS) . tep_admin_files_boxes(FILENAME_PRODUCTS_MULTI, BOX_CATALOG_CATEGORIES_PRODUCTS_MULTI) . tep_admin_files_boxes(FILENAME_EASYPOPULATE, BOX_CATALOG_EASYPOPULATE) . tep_admin_files_boxes(FILENAME_QUICK_UPDATES, BOX_CATALOG_QUICK_UPDATES) . tep_admin_files_boxes(FILENAME_MANUFACTURERS, BOX_CATALOG_MANUFACTURERS) . tep_admin_files_boxes(FILENAME_REVIEWS, BOX_CATALOG_REVIEWS) . tep_admin_files_boxes(FILENAME_SPECIALS, BOX_CATALOG_SPECIALS) . tep_admin_files_boxes(FILENAME_SALEMAKER, BOX_CATALOG_SALEMAKER) . tep_admin_files_boxes(FILENAME_XSELL_PRODUCTS, BOX_CATALOG_XSELL_PRODUCTS) . tep_admin_files_boxes(FILENAME_STAR_PRODUCT, BOX_STAR_PRODUCT) . tep_admin_files_boxes(FILENAME_GET_1_FREE, BOX_CATALOG_GET_1_FREE) . tep_admin_files_boxes(FILENAME_PRODUCTS_EXPECTED, BOX_CATALOG_PRODUCTS_EXPECTED) . tep_admin_files_boxes(FILENAME_DISCOUNT_COUPONS, BOX_CATALOG_DISCOUNT_COUPONS) . tep_admin_files_boxes(FILENAME_PRODUCTS_EXTRA_IMAGES, BOX_CATALOG_CATEGORIES_PRODUCTS_EXTRA_IMAGES) . tep_admin_files_boxes(FILENAME_PRODUCTS_EXTRA_FIELDS, BOX_CATALOG_PRODUCTS_EXTRA_FIELDS)); //Admin end } $box = new box; echo $box->menuBox($heading, $contents); ?> </td> </tr> <!-- catalog_eof //--> What´s wrong ? Quote ~Tracy Link to comment Share on other sites More sharing options...
mondobongo3 Posted May 29, 2010 Share Posted May 29, 2010 If possible, I dare to ask for a custom change... maybe this can be useful to others too. What I need: If a client makes an order which meets the requirements of one of the coupons, that specific coupon code to be attached to Invoice, OR to be sent to client when DELIVERY is confirmed. After this operation, the Unique Code to change, so next for next order of same client AND value, to send a different coupon code. Possible limitations: -only for coupons with unique code (not predefined name) because the code must change after each sending to client. -force a minim number of characters for Unique Code, to avoid duplicates over time -may be a little difficult to decide which coupon to apply if several meet the requirements. In my particular case is simple, as I want to offer discount in fixed amount for buy over a specific value. The main idea is to make this automatic and avoid multiple usage of a coupon. I know, already it can be limited to one use. But if the client makes another buy which meets the requirements for same coupon, I have to create a new coupon manually for that order only. If I misunderstood the functionality of this Add-On and most of what I need can be already done, please let me know. Or if is other (simpler) way to do it. Thank you very much ! Quote Link to comment Share on other sites More sharing options...
marce6620 Posted May 30, 2010 Share Posted May 30, 2010 You really need to get a file comparison program to check your files against those in the contribution and see if you missed anything. Are you sure that your database was updated? Did you update the filenames and database php files? WinMerge is a free file comparison tool that works well for ensuring that you haven't placed code in the wrong spot (what order things are called can make a difference) or that you haven't missed or mistyped some code. thanks tracy, I solved my previous problem, but now I have a new one.Discount coupon does not display in order subtotal during checkout confirmation. Can you help me??? Quote Link to comment Share on other sites More sharing options...
TanjaPetro Posted May 31, 2010 Share Posted May 31, 2010 thanks tracy, I solved my previous problem, but now I have a new one.Discount coupon does not display in order subtotal during checkout confirmation. Can you help me??? I have the same problem as stated above. I went over the installation instructions and I've placed all the code in the right place. I added a discount coupon in my admin area and I gave the discount coupon a unique sort order. But the discount coupon box is not showing up during the order process. I have no idea why. I would really appreciate some advice. Thanks. Tanja. Quote Link to comment Share on other sites More sharing options...
TanjaPetro Posted May 31, 2010 Share Posted May 31, 2010 I downloaded the latest version (Feb 2010) of DCC and followed all the instructions meticulously. My issues: 1. No discount coupon box is showing up on my order page. (I downloaded Winmerge but I haven't compared my files yet; I will do this tonight. If it still does not work, I will do a fresh install of osCommerce on another test domain and try again). Everything works in the admin - I can add/modify coupons and I've used a unique sort order for the discount code. The box just does not appear on the page when I'm placing a test order. 2. Several persons on this thread have talked about an "SQL file" that wasn't run and others have mentioned ensuring that the database is updated. Neither of these things are mentioned in the installation instructions. If there are additional steps to be executed, how is a new user supposed to know? 2. Another user mentioned that the DCC download page contains 'corrections' for some of the files that need to be edited. I downloaded the file that was presented to me on the contribution page. Why would that be considered the 'latest version' if it does not include corrections? The contribution author does not seem to be providing guidance to amateurs like myself. I checked all the discount/promotional contributions and DCC has everything I want and more, so I'm willing to make multiple attempts to get it to work. If at all possible, can anyone advise about the SQL file and the corrections on the download page? If possible, maybe you can post a few guidelines for new users like myself who seem to be missing some of the installation steps. Thank you in advance for any assistance you can provide. Regards, Tanja. Quote Link to comment Share on other sites More sharing options...
TracyS Posted June 1, 2010 Share Posted June 1, 2010 DCC 3.3 by kgt is the last stable version I have used. I don't know if the later one's are stable or not. kgt is the original author of the contribution. That is not to say that other versions are not stable - it is just the most recent I have installed and used. There are fixes to the 3.3 version as well - as with any php/sql scripting, there are always updates/upgrades/changes/fixes etc.... If you are having problems getting one version to work - revert back to your saved files prior to the install and try a different version. What works on one persons server may not work on another as they may have different server settings that affect the scripting. I downloaded the latest version (Feb 2010) of DCC and followed all the instructions meticulously. My issues: 1. No discount coupon box is showing up on my order page. (I downloaded Winmerge but I haven't compared my files yet; I will do this tonight. If it still does not work, I will do a fresh install of osCommerce on another test domain and try again). Everything works in the admin - I can add/modify coupons and I've used a unique sort order for the discount code. The box just does not appear on the page when I'm placing a test order. 2. Several persons on this thread have talked about an "SQL file" that wasn't run and others have mentioned ensuring that the database is updated. Neither of these things are mentioned in the installation instructions. If there are additional steps to be executed, how is a new user supposed to know? 2. Another user mentioned that the DCC download page contains 'corrections' for some of the files that need to be edited. I downloaded the file that was presented to me on the contribution page. Why would that be considered the 'latest version' if it does not include corrections? The contribution author does not seem to be providing guidance to amateurs like myself. I checked all the discount/promotional contributions and DCC has everything I want and more, so I'm willing to make multiple attempts to get it to work. If at all possible, can anyone advise about the SQL file and the corrections on the download page? If possible, maybe you can post a few guidelines for new users like myself who seem to be missing some of the installation steps. Thank you in advance for any assistance you can provide. Regards, Tanja. Quote ~Tracy Link to comment Share on other sites More sharing options...
TanjaPetro Posted June 1, 2010 Share Posted June 1, 2010 Tracy, Thanks a lot for replying. I will try an earlier version and report back on the result. Tanja. Quote Link to comment Share on other sites More sharing options...
TanjaPetro Posted June 4, 2010 Share Posted June 4, 2010 (edited) Tracy, Thanks a lot for replying. I will try an earlier version and report back on the result. Tanja. I downloaded and installed DCC 3.3 by kgt (4 June 2007) and I got everything to work. I added two test coupons and the coupon box is appearing on the order page. The ONLY problem is that, for some reason, the subtotal is including the discount. I have the sort order as follows: Subtotal DCC Shipping Tax Total My order looks like this: (Product 1) 40.00 (Product 2) 30.00 (Product 3) 50.00 (3 products add up to 120.00 but the subtotal is showing with the discount already applied even though I have 'display subtotal with discount applied' set to false) Subtotal 108.00 Discount 10% 12.00 Shipping 0.00 Tax 0.00 Total 96.00 So the discount is being applied twice. Any suggestions? After multiple attempts with DCC 3.4 I finally got this to work so I thought I'd post to let other who may be having problems with DCC 3.4 know that DCC 3.3 worked for me. Thank you once again to Tracy for her suggestions. Tanja. Edited June 4, 2010 by TanjaPetro Quote Link to comment Share on other sites More sharing options...
marce6620 Posted June 4, 2010 Share Posted June 4, 2010 Thank you Tracy and Tanja for your help. I will try a DCC 3.3 version and report back on the result. Marcelo Quote Link to comment Share on other sites More sharing options...
TanjaPetro Posted June 5, 2010 Share Posted June 5, 2010 I downloaded and installed DCC 3.3 by kgt (4 June 2007) and I got everything to work. I added two test coupons and the coupon box is appearing on the order page. The ONLY problem is that, for some reason, the subtotal is including the discount. I have the sort order as follows: Subtotal DCC Shipping Tax Total My order looks like this: (Product 1) 40.00 (Product 2) 30.00 (Product 3) 50.00 (3 products add up to 120.00 but the subtotal is showing with the discount already applied even though I have 'display subtotal with discount applied' set to false) Subtotal 108.00 Discount 10% 12.00 Shipping 0.00 Tax 0.00 Total 96.00 So the discount is being applied twice. Any suggestions? After multiple attempts with DCC 3.4 I finally got this to work so I thought I'd post to let other who may be having problems with DCC 3.4 know that DCC 3.3 worked for me. Thank you once again to Tracy for her suggestions. Tanja. I found the answer on an earlier post. To prevent the discount being applied twice and have the subtotal show without the discount applied, in catalog/includes/classes/discount_coupon.php: (around line 368) replace: if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' ) { //we don't want to display the subtotal with the discount applied, so apply the discount then set the applied_discount variable to zero so that it's not added into the order subtotal, but is still used to correctly calculate tax $actual_shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] ); $applied_discount = 0; } with this: if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' ) { //we don't want to display the subtotal with the discount applied, so apply the discount then set the applied_discount variable to zero so that it's not added into the order subtotal, but is still used to correctly calculate tax $actual_shown_price = ( $this->apply_tax( $product['final_price'], $product['tax'] ) * $product['qty'] ) - ( $discount['applied_discount'] + $discount['discount_tax'] ); $discount['applied_discount'] = 0; } 'Display subtotal with discount applied' should be set to false. My new problem: Discount codes are working perfectly for 'fixed price' and 'shipping discounts'. I also tested different exclusions and it's functioning flawlessly. However 'percentage discounts' are miscalculated by up to $0.73 (customer is charged $0.73 more than he should have to pay based on discount percentage). I know the installation instructions say that small rounding errors may occur but I don't consider $0.73 to be a small error. Has anyone else had this problem with wrong calculations for percentage discounts? Tanja. 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.