Jump to content

evbeej

Members
  • Content count

    75
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by evbeej

  1. :- new problem! I have it set up so that the customer gets free shipping if they spend over £30. I have 2 items in the shopping cart, which totals £33.48 I add a discount of 50% which takes the total to 16.74 which now pushes the purchase to below the £30 free shipping limit, so i get the error: Your calculated shipping charges have changed. I have seen a couple if people mention this on theirs, and my version of the module (3.34 plus bug fixes) seems to have all those fixes incorporated already. as far as i can see, this bit of code which is on classes/discount_coupon.php, is meant to sort this... static function is_recalc_shipping() { global $order, $language; //calculate the order total: $order_total = $order->info['total'] - $order->info['shipping_cost']; if( DISPLAY_PRICE_WITH_TAX != 'true' ) $order_total -= $order->info['tax']; //check if there is free shipping if( strtolower(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING) == 'true' ) { include( DIR_WS_LANGUAGES.$language.'/modules/order_total/ot_shipping.php' ); //if free shipping is enabled, make sure the discount does not bring the order total below free shipping limit if( $order->info['shipping_method'] == FREE_SHIPPING_TITLE ) { //if free shipping is the selected shipping method if( $order_total < MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER ) { //if the discount lowers the total below the free shipping limit return true; } } } //check if table rate shipping has changed if( strtolower(MODULE_SHIPPING_TABLE_STATUS) == 'true' ) { include( DIR_WS_LANGUAGES.$language.'/modules/shipping/table.php' ); if( substr($order->info['shipping_method'], 0, strlen(MODULE_SHIPPING_TABLE_TEXT_TITLE)) == MODULE_SHIPPING_TABLE_TEXT_TITLE && MODULE_SHIPPING_TABLE_MODE == 'price' ) { $table_cost = split( "[:,]", MODULE_SHIPPING_TABLE_COST ); for( $i = 0; $i < count( $table_cost ); $i += 2 ) { if( $order_total <= $table_cost[$i] ) { $shipping = $table_cost[$i+1]; break; } } if( $order->info['shipping_cost'] != $shipping ) { //if the discount lowers the total below the table rate return true; } } } return false; } But it just doesnt seem to be doing it.. any ideas anyone? E
  2. Sorted it!! i had exclude specials as true in the setting :thumbsup: :blush:
  3. Following the link you send me Loic , i didnt get it working. However i have found something that might point to the issue. While checking at every point i have found that doing a var_dump here (in checkout_confirmation.php): The following comes up: It looks as though whenever i have an item in my cart, it adds it to the 'exclusions' list? Anyone have any ideas? E
  4. @@Gyakutsuki Thank you, i will do that - i really appreciate your patience, and help.
  5. @@Gyakutsuki Please forgive me if i have misunderstood but... i have added the var_dump to the following code in ot_discount_coupon.php: This has added the following to the top of the confirmation: string(6) "erika2" array(0) { } :(
  6. if i add the var_dump in the first lot of KGT code on that page : it appears with string(6) "erika2" at the top of the confirmation page... does that help?
  7. @@Gyakutsuki Hmmm.. ive re installed this about 4 times, and its always the same. never appears in confirmation. Following this module ive added the following bits of code to order.php: Are you suggesting i have something else missing from this page? - sorry im not to good with the order total
  8. @@Gyakutsuki Nope, doesnt look like i have that, and when i add in the var_dump on classes/order.php it breaks it! Do you want to see my order.php file?
  9. EDIT: i edited the code to match the one above and it made no difference. -------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@Gyakutsuki sorry, actually reading the code compared to the one you posted, its actually different, dont know how much a difference that will make but here is the code i actually have
  10. @@Gyakutsuki Brilliant, thank you for this.. I have found a problem at the first stage, after doing the result is It isnt even reading the discount coupon at this point.. any ideas?
  11. @@Gyakutsuki Thank you, I am not sure what you meant, sorry. Should i be putting: echo $_SESSION['coupon']; exit; on the page somewhere? if so - nothing came up. Could you link me to the solution you talked about, as cant see where you have mentioned it previously on the previous page. Sorry, i am probably being really dumb with this, but i am just really struggling with it! :blush: :(
  12. @@Gyakutsuki Thank you, i have managed to get rid of that error now. But still cant seem to get this module to show the discount in the checkout_confirmation page. This site is quite heavily modified in places, so not sure what to look at next. Everything else to do with the discount is working fine; creating a discount code, editing the code, if a wrong one is entered it shows the error message... it just never actually adds it. I have even gone through to enter card payments to check if it was at least taking it off there, but it isnt. ( it is also not passing through the discount for paypal). So something must be breaking between checkout_payment and checkout_confirmation. If I go through with the purchase, it does link the discount coupon to the order in the discount_coupons_to_orders table, which is added at the checkout_process stage. I will just have to keep digging.
  13. ive managed to resolve this: i went into the mysql table CONFIGURATION and found the entry that read MODULE_ORDER_TOTAL_INSTALLED in the configuration_key column. I noticed that ot_discount.php was not mentioned, so added it in, and presto! its now appearing correctly in admin, and when testing a discount code on site, it is discounting it correctly.
  14. Hello I have been having trouble with the discount module (ot_discount) and have been trying to resolved. Something i have noticed since trying to fix is now when you click on the order total under the module section of admin, you cant see the discount module, I click on 'install module' and the INSTALLED module is sitting in that list.. I dont know how else to explain it.. Have i deleted something? Any help would really be appreciated, as really dont know what i have done here, and without it people cant use discount codes. Thanks E
  15. I will give that a go.. i think im using very 3 3.4. there are some fixes on the addon page, so working my way through those at the moment. fingers crossed.
  16. evbeej

    the discount is not shown

    @@greasemonkey a bit of a long shot but any chance you would know anything that could help me? firstly, i was using an outdated discount code module that wasnt working completely. So decided it was time for an upgrade and found this one. All was fine when installing, everything in admin worked perfectly. But i came across a problem when trying to add a discount to a shopping cart.. the discount just wouldnt appear in the confirmation page. Doing a bit of research i found a couple of solutions, give it a unique display order, make sure no other discount code is on site, as will disrupt in the order total. All done.. and it is still not appearing. so, problem one is : I cant get it to show! Secondly, in trying to fix the above issue i have found the following error in my error log : PHP Warning: Missing argument 2 for shoppingCart::attributes_price(), called in /home/../shop/includes/classes/discount_coupon.php on line 305 and defined in /home/../shop/includes/classes/shopping_cart.php on line 303 when doing the install i never went into the shopping_cart.php page. so not sure how to fix this one? any help, or suggestion of where to look would be greatly appreciated.
  17. Hello guys, sorry to interrupt your discussion, but i am having a few issues with this addon, and am hoping someone could point me in the right direction. firstly, i was using an outdated discount code module that wasnt working completely. So decided it was time for an upgrade and found this one. All was fine when installing, everything in admin worked perfectly. But i came across a problem when trying to add a discount to a shopping cart.. the discount just wouldnt appear in the confirmation page. Doing a bit of research i found a couple of solutions, give it a unique display order, make sure no other discount code is on site, as will disrupt in the order total. All done.. and it is still not appearing. so, problem one is : I cant get it to show! Secondly, in trying to fix the above issue i have found the following error in my error log : PHP Warning: Missing argument 2 for shoppingCart::attributes_price(), called in /home/../shop/includes/classes/discount_coupon.php on line 305 and defined in /home/../shop/includes/classes/shopping_cart.php on line 303 when doing the install i never went into the shopping_cart.php page. so not sure how to fix this one? any help, or suggestion of where to look would be greatly appreciated. E
  18. I resolved it by only showing only one form of payment (card) when a discount code which has a total higher then products total is present. its probably messy but it has done the job - thank you for your help Tsimi.
  19. Sorry, i should of been a bit more forthcoming with information.. a set discount amount which if not all spent send the total into minus doesnt work with paypal, you mentioned it quite early on. (i know set amounts arn't great for this reason, but the discount was already given out to customers before i could advise against it)
  20. Did you ever manage to sort out the problem with using this and paypal?
  21. Hello Everyone, I have been through a lot of forums trying to find a solution to this, and no one else seems to have the same issue I am. I have order total Discount Code v2.6 installed. Everything is working fine, except when you enter the code for a set price discount, if the customer is purchasing items that total less then the voucher it makes the total into a negative amount. ie. items equal : 62.20 discount: 100.00 vat amount: 10.37 total: -37.80 I have seen on some posts a mention of 'Allow negative order total?' but my version doesnt provide this option.. is this something i can add to my module? If so, any clues would be a massive help! Thanks guys!
  22. That fixed it! Clearly i didnt look hard enough! Could you link me to where i could find this code provided by marcochiana? Your a star - thank you!
×