[add-on] Discount Code (support)
#101
Posted 19 April 2012 - 10:37 AM
I'm now trying to do the following:
1. Perform the SQL query to your osCommerce database.
ALTER TABLE `discount_codes` ADD `exclude_specials` TINYINT( 1 ) NOT NULL AFTER `order_info` ;
Can someone give me some guidance on how to do this, I'm a newby at the stuff..
I have gone into phpMyAdmin and opened the database I need, but not sure what to do next..
#102
Posted 06 May 2012 - 03:15 PM
I'm using osCommerce Online Merchant v2.3.1 and tried to install the Discount Code.
After applying everything, it was working fine to create discount codes. But when a customer has put some articles into the shopping cart, he was not able to checkout. So he was able to display the shopping cart, but when he was clicking on "checkout" then nothing happened, just the page reloaded...
Can anyone help me please?
Thank you!!!
#103
Posted 06 May 2012 - 04:15 PM
#104
Posted 06 May 2012 - 07:11 PM
I'm now sitting the whole sunday in front of this addon and it's not getting to an end, could anyone help me please? What could be the problem?
In the instruction there is written the following:
7. Modify the catalog/checkout_process.php file.
Find:
//------insert customer choosen option eof ----
$total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']);
$total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];
$total_cost += $total_products_price;
$products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";
}
Add after:
// Discount Code 2.3 - start
if (MODULE_ORDER_TOTAL_DISCOUNT_STATUS == 'true') {
if (!empty($discount)) {
$discount_codes_query = tep_db_query("select discount_codes_id from " . TABLE_DISCOUNT_CODES . " where discount_codes = '" . tep_db_input($sess_discount_code) . "'");
$discount_codes = tep_db_fetch_array($discount_codes_query);
tep_db_perform(TABLE_CUSTOMERS_TO_DISCOUNT_CODES, array('customers_id' => $customer_id, 'discount_codes_id' => $discount_codes['discount_codes_id']));
tep_db_query("update " . TABLE_DISCOUNT_CODES . " set number_of_orders = number_of_orders + 1 where discount_codes_id = '" . (int)$discount_codes['discount_codes_id'] . "'");
tep_session_unregister('sess_discount_code');
}
}
// Discount Code 2.3 - end
But in my checkout_process.php file there is no code like this, it's looking a bit different:
//------insert customer choosen option eof ----
$products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";
}
could it be related to this? what do I need to do so that it will finally work?
#105
Posted 14 May 2012 - 03:04 PM
Please help
#106
Posted 14 May 2012 - 09:03 PM
#107
Posted 21 May 2012 - 01:41 AM
#108
Posted 21 May 2012 - 10:09 PM
http://high-quality-php-coding.com/discount_code_for_oscommerce_2.3.1.html
#109
Posted 04 June 2012 - 08:09 PM
Here's an example:
1. With "apply to order total" set and a discount of 10%:
Subtotal: $25.00
Discount: -$2.50
Tax: $2.70
Total: $25.50
2. With "apply to category" set and the same (10%) discount:
Subtotal: $25.00
Discount: -$2.50
Tax: $2.73
Total $25.50
I have checked my file modifications twice, but everything seems to be correct. Can anyone help me figure out what's wrong and why it's displaying the wrong tax amount even though it's calculating it correctly?
Thanks!
Regards,
Chris
Edited by Chrison, 04 June 2012 - 08:14 PM.
#110
Posted 11 June 2012 - 05:41 AM
Chrison, on 04 June 2012 - 08:09 PM, said:
Here's an example:
1. With "apply to order total" set and a discount of 10%:
Subtotal: $25.00
Discount: -$2.50
Tax: $2.70
Total: $25.50
2. With "apply to category" set and the same (10%) discount:
Subtotal: $25.00
Discount: -$2.50
Tax: $2.73
Total $25.50
I have checked my file modifications twice, but everything seems to be correct. Can anyone help me figure out what's wrong and why it's displaying the wrong tax amount even though it's calculating it correctly?
Thanks!
Regards,
Chris
I'm bumping this one because it's still a problem. Can anyone help me figure this one out, please?
Thanks!
Regards,
Chris
#111
Posted 16 June 2012 - 04:13 PM
Chrison, on 11 June 2012 - 05:41 AM, said:
Thanks!
Regards,
Chris
Never mind. I never did figure out why this was happening, so I uninstalled this add-on and changed over to CCGV Credit Class Gift Voucher 6.0 instead. Happily, it installed without a hitch and works flawlessly.
Thanks, anyway...
Regards,
Chris
#112
Posted 13 July 2012 - 12:24 AM
Has someone come across this problem and is there a fix for it?
Thanks for any help
Edited by paccman, 13 July 2012 - 12:25 AM.
#113
Posted 19 July 2012 - 05:11 AM
I was getting 'undefined' showing up in the discount codes box in Safari, and Safari absolutely will not apply the discount code, returns it as invalid no matter the circumstances. Mobile safari for iOS seems to be similarly hamstrung.
Works fine in Chrome and Firefox. Any suggestions? Please?
#114
Posted 10 August 2012 - 01:52 PM
I'm using this addon but when it comes to putting the code in on the checkout process page it is showing as failed even though the code is set up.
Can someone please help?
Thanks
#115
Posted 03 September 2012 - 04:09 PM
FosterLee, on 10 August 2012 - 01:52 PM, said:
I'm using this addon but when it comes to putting the code in on the checkout process page it is showing as failed even though the code is set up.
Can someone please help?
Thanks
#116
Posted 04 September 2012 - 07:05 AM
Peper, on 03 September 2012 - 04:09 PM, said:
// Discount Code 3.1.1 - start
if (MODULE_ORDER_TOTAL_DISCOUNT_STATUS == 'true') {
if (!tep_session_is_registered('sess_discount_code')) tep_session_register('sess_discount_code');
if (!empty($HTTP_GET_VARS['discount_code'])) $sess_discount_code = tep_db_prepare_input($HTTP_GET_VARS['discount_code']);
if (!empty($HTTP_POST_VARS['discount_code'])) $sess_discount_code = tep_db_prepare_input($HTTP_POST_VARS['discount_code']);
}
// Discount Code 3.1.1 - end
Fixed
#117
Posted 09 September 2012 - 12:13 PM
But just like your self my express checkout doesn't display anything. but the price
Example: Check out with pay-pal express only displays:
Your order summary
Descriptions
Current purchase £1.00
Item total £1.00
Total £1.00 GBP
it seems to display correctly in PayPal Website Payments Standard
But again the description is only displaying my website / business name and no item information:
Your order summary
Descriptions
test site
amount
£42.42
Item price: £42.42
Quantity: 1
Discount-£2.52
Item total£39.90
VAT£7.98
Postage and packaging: £5.00
Total £52.88 GBP
any ideas would be great thanks
David
#118
Posted 10 September 2012 - 06:12 PM
It seems that as start / end date I have to use the format MM/DD/YYYY (let say 12/31/2012).
But if I edit the coupon it then shows the format DD/MM/YYYY (i.e. 31/12/2012). Upon saving it again, the date does not fit to MM/DD/YYYY and it will be lost.....
I have find out the function kgt_parse_date which seems to be responsible for that.
Is anyone here using it in the admin with a different format then DD/MM/YYYY?
Am I missing a configuration point?
Many thx for your time!
Edited by davidedp, 10 September 2012 - 06:22 PM.
#120
Posted 27 September 2012 - 09:09 PM
The module seems to be running - I set up a discount code and then I try it out... and the discount codes seem to work.
That is it shows a line where the discount is applied, but the numbers don't add up.
For example I ran a test item priced 34.99 and a 10% discount.
I get the following results when I run a test purchase.
Price: $34.99
Discount: -$3.50
Shipping: $15.00
FL TAX 7% $2.22
Total: $48.94
First off the total is wrong: 34.99 - 3.50 + 15:00 + 2.22 = 48.71 It does Not equal 48.94
The other issue is that I have no idea where the 2.22 comes from.
34.99 x 0.07 = 2.45 (total price x 7%)
31.49 x 0.07 = 2.20 (discounted price x 7%)
46.49 x 0.07 = 3.25 (discount price + shipping x 7%)
I have no idea where this module get it totals from.
I and running osCom 2.3 - the Discount Code is Dec 26, 2011 version with the March 12, 2012 update.
Any suggestions?









