Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by kgt

  1. This contribution does not alter the product price. I cannot tell you why you're getting the results you are. You're the only one I know who has had this problem. The b2b contribution you use changes the way the product prices are displayed in the email. I'd start by checking with that contribution.
  2. This contribution reads the product prices, but does not alter them. I do not recall anyone else having problems with zero prices in the confirmation email. I would say the issue is likely due to a conflict between DCC and another contribution. Identifying what else you have installed would be a good first step.
  3. The problem you're having is because the discount is applied evenly to each item. The carts that give incorrect discount amounts do so because the price difference between the items is high. This will be fixed in the next version of DCC that is released.
  4. The true problem you're experiencing is that you cannot use more than one coupon. To allow for more than one coupon to be applied to an order, you need to edit includes/classes/order.php. You should then be able to hide the automatic discount fairly easily.
  5. Since you have a product with a price of zero, you'll need to add to that function to set the price to 1 for the sake of the calculation. if($product['final_price'] != 0) { if( $product['final_price'] == 0 ) $product['final_price'] = 1; $max_applied_percentage = ( $this->coupon['coupons_max_order'] == 0 ? '1.00' : $this->coupon['coupons_max_order'] / ( tep_add_tax( $product['final_price'] * $product['qty'], $product['tax'] ) * $product_count ) ); $applied_discount = tep_add_tax( $product['final_price'] * $max_applied_percentage * $this->coupon['coupons_discount_percent'], $product['tax'] ) * $product['qty']; } This should fix the divide by zero message as well as add in that last 1/3 of the discount (discounts are applied to each item in the cart).
  6. Well I'd need to see more info before I could make another suggestion/fix. I need the price and quantities of items in your cart (the individual items matter, since the discount is NOT applied to the subtotal, but to each individual item).
  7. Many people see an improvement in accuracy when they comment out line 116 of includes/classes/discount_coupon.php. See if that helps.
  8. So you have these auto-magical hidden coupons, but you also need to allow people to enter a coupon manually? Or is it one or the other: they get the auto-magical breakdown OR they can enter a coupon?
  9. Comment out line 116 of includes/classes/discount_coupon.php. I think that will fix the problem for you.
  10. You will need to move the code from checkout_confirmation.php to checkout_shipping.php. Checkout_shipping posts the form information back to itself (and I assume the contribution you have then forwards the customer to Paypal). You'll need to change error handling in that code to not point to the checkout_payment page, but checkout_shipping instead.
  11. There should be a link under the Catalog Menu in your admin section. If it is not there, revisit the installation instructions for admin/includes/boxes/catalog.php.
  12. That code should be added to checkout_payment.php. Are you trying to add this to the shipping page instead of the payment page? If so, that is the code that displays the box to allow a customer to input the discount code. The code that handles the discount (processes the discount code and determines the discount amount) needs to be added as well. Not sure how the Paypal WPP contribution works, exactly. Which exactly did you download and install?
  13. kgt

    Locations/Taxes Setup For Canada

    Do you have a specific question?
  14. That is exactly where to add the code, and the results were as expected. I see absolutely no coupon code in the output. I assume you did try to use one. If so, the error is in your includes/classes/order.php. Please revisit the install instructions and make sure that file is correct. Otherwise, you may email or PM me your code and I will take a look at it.
  15. I believe quantity price breaks happen before the shopping cart. This discount happens during the order total process. You could modify it, but it's certainly more than changing a few lines.
  16. If you enter an incorrect code and get the error message, then you've probably got everything installed correctly. The issue is more likely with the display itself. Add this line: die( '<pre>'.print_r( $order, true ).'</pre>' ); after $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); $breadcrumb->add(NAVBAR_TITLE_2); in checkout_confirmation.php and send me the results.
  17. That fix is for people who are getting the error "Cannot redeclare class discount_coupon". The error is not in ot_discount_coupon.php. On what page are you getting this error? Show the code you have for that page.
  18. That code looks correct. Are you using an admin template? Do you have a contribution for the admin section that manages the menu options, perhaps?
  19. Comment out line 116 of includes/classes/discount_coupon.php and see if that helps. If not, you need to include your product prices above. The discount is taken off of individual products, so showing the subtotal is not enough.
  20. That is more or less working, and will be included in the release.
  21. I had hoped to release it two weeks ago. I am slammed with work right now (have been since December). There are some issues with it that are taking a lot of time to work out because I don't have much time to devote to it. The answer is, I don't know, and I will not know until the day I post it.
  22. When you use a template, the header file is usually ignored. That is one of the reasons templates are so confusing to people. The original files are there, but they are not used to generate the actual content you see. Your true header is generated elsewhere. (Don't ask me where - it depends on your template!)
  23. It would be something like this (Taken directly from ot_discount_coupon.php): global $order, $currencies; if( is_object( $order->coupon ) ) { //if the order total lines for multiple tax groups should be displayed as one, add them all together if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_LINES == 'false' ) $discount_lines = array( array_sum( $order->coupon->applied_discount ) ); else $discount_lines = $order->coupon->applied_discount; foreach( $discount_lines as $tax_group => $discount ) { if( $discount > 0 ) { $display_type = ( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_TYPE == 'true' ? '-' : '' ); $this->output[] = array('title' => $order->coupon->format_display( $tax_group ) . ':', 'text' => $display_type.$currencies->format( $discount, true, $order->info['currency'], $order->info['currency_value'] ), 'value' => $display_type.$discount); } } }
  24. If you can pass any information you like, then I can't tell you why it's not working. It has to do with their system.
  25. Despite the fact that it looks like you should be able to just display this value, I can tell you for certain that it is not. Securehost MUST accept a order total line like this in their API. If they do not, you cannot display it as such. Most osCommerce users run into this issue when using Paypal. Paypal has two settings for this display page: aggregate and itemized. Itemized is similar to the display screen you have: it lists the items, the tax and shipping, and the total. Paypal does not have the ability to list a discount line, so their itemized screen looks exactly like yours when a discount is used. The aggregate function will accept and display the order total only. In all probability, your payment provider cannot accept a discount line. As unbelievable as it may seem, the screen displayed is actually using strict guidelines as to which fields can be accepted, what they mean, and the expected values. This is made to work with osCommerce, but you are very limited in the amount to which this screen can be customized. This is where adding a new field/line "willy-nilly" comes in. If they do not already have the ability to accept a discount line on this screen, you CANNOT add one in. If you contact their technical support and ask for an API, that document will tell you for sure whether a discount line is possible or not.