user_group_for_discount_code.zip 32.58K
9 downloads
[add-on] Discount Code (support)
#81
Posted 25 November 2011 - 08:36 AM
#82
Posted 02 December 2011 - 11:23 AM
I have two issues however, which are probably very simple to fix, but just can't get my head around.
1 - The discount code section should be in its own box, this however isn't showing.
[img]http://img33.imageshack.us/img33/9867/helpcs.jpg[/img]
2 - Paypal - The PayPal isn't working on "Discount Code 2.9 for osCommerce 2.2" version. I've applied the paypal fix but to no joy.
Wanting to get a mailshot sent out asap, so would really appreciate an answer.
Many Thanks
Alex
Edited by Whittie, 02 December 2011 - 11:24 AM.
#83
Posted 05 December 2011 - 09:28 AM
#84
Posted 13 December 2011 - 01:20 AM
When I go to this page Discount Code is listed, but when I click on it, nothing happens. There's no "install" button. Any ideas of where the problem could be?
Thank you.
I installed Discount Code 2.9 for osCommerce 2.2
Edited by jordana, 13 December 2011 - 01:22 AM.
#85
Posted 14 December 2011 - 11:24 PM
I installed Discount Code 2.9 for osCommerce 2.2 on V2.2 RC2. Everythings working fine until checkout_confirmation.php where i cant see the discount field or its being applied to the Sub-total.
Attached a Screencap of how it looks.
Appriciate any help on this.
http://i.imgur.com/ZDAkz.png
thanks
Edited by nammm, 14 December 2011 - 11:25 PM.
#86
Posted 15 December 2011 - 06:12 PM
#87
Posted 29 December 2011 - 07:59 PM
http://high-quality-php-coding.com/discount_code_for_oscommerce_2.3.1.html
Edited by paccman, 29 December 2011 - 07:59 PM.
#88
Posted 31 December 2011 - 01:06 PM
#89
Posted 11 January 2012 - 01:21 AM
sormui, on 04 February 2011 - 08:02 PM, said:
I've got this to work with 'per item' mode (whoop!), it seems the following are important;
- discount should be in the 'discount_amount_cart' parameter
- there should be NO tax_1, tax_2, etc parameters declared.
- declare the full tax in the 'tax_cart' parameter instead
So to fix;
Step 1 - Comment out the following line:
$parameters['tax_' . $item] = number_format($tax_value * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));
Step 2 - Change the discount code added from my previous post (quoted at the bottom), to instead be;
if (isset($order_total['ot_discount'])) {
$parameters['discount_amount_cart'] = number_format(($order_total['ot_discount']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));
if (MOVE_TAX_TO_TOTAL_AMOUNT != 'True') $parameters['tax_cart'] = $tax_total;
}
The method will apply generally to other setups, just you will have to figure out where to code the parameters. (my original post quoted below is the code I added for my setup)
kevinb456, on 25 September 2010 - 09:10 PM, said:
This may also work with other paypal mods and other discount mods, but you need to check the variable names to be certain.
This is only for use with the Paypal IPN module set to 'aggregate' mode, not 'per item' (although it would work with a bit of modification).
Open \catalog\includes\modules\payment\paypal_ipn.php
Find the code:
if(MOVE_TAX_TO_TOTAL_AMOUNT == 'True') {
$parameters['amount'] = number_format(($subtotal + $order->info['tax']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));
} else {
// default
$parameters['amount'] = number_format($subtotal * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));
$parameters['tax'] = number_format($order->info['tax'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));
}
(make sure this is correct, there's another 'IF' block that looks very similar in a different loop)
Add the following code directly after:
if (isset($order_total['ot_discount'])) {
$parameters['discount_amount'] = number_format(($order_total['ot_discount']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency));
}
Done!
The discount will now be included in the paypal payment page, and its event under a special 'discount' heading so your customer can see how much they're saving!
EDIT: I guess you could also set the variable 'discount_amount_cart' instead of 'discount_amount' (see https://cms.paypal.c...d_htmlvariables), but this seems to work so I haven't played around too much. 'discount_amount_cart' is infact for the whole cart so this may work better for aggregate mode.
#90
Posted 13 January 2012 - 06:56 AM
#91
Posted 13 January 2012 - 07:15 AM
#92
Posted 10 March 2012 - 01:40 AM
Peace,
Jason
#93
Posted 12 March 2012 - 07:50 PM
Crazypilot, on 20 November 2011 - 08:44 PM, said:
Hello,
Thank you for your interest in our product.
To get correct order total info, you should adjust the following
variables:
$order->info['tax']
$order->info['tax_groups'][<your tax>]
$order->info['total']
Sincerely,
The High Quality PHP Coding Team.
This was posted by someone previously regarding fixing the tax problem with this contribution. Does anyone know how to adjust this so we can get this invaluable contribution to work properly with taxes?
Thanks so much!
Jason
#94
Posted 27 March 2012 - 09:53 AM
Anyone able to make it work with One Page checkout? right now I am able to include the discount field and also the ajax validation. it works. Can someone point me or help how to trigger the java to load the discount into the Order total. please.
#95
Posted 01 April 2012 - 12:56 PM
I could use help in changing the code for a discount.
The default should always be that items are not included in the campaign. Currently, so that all items immediately in action with the code for the discount. I could use the inverse operation to choose which items are included.
Can anyone help me?
#96
Posted 06 April 2012 - 10:11 PM
Total newb here and I'm pretty sure my backup is corrupt so whatever assistance you can provide is greatly appreciated.
I tried installing the 3.1.1 full but ran into some trouble. I can't recall exactly what the issue was but we reverted to backup. All was well.
Now that the store is up and running, discount codes were requested again. Instead of going from 3.1.1 again, opted to go from 2.6 and upgrade so I could not any errors.
Well boy did I get one. The following appears at the top of every page in the site except checkout:
// Discount Code 2.6 - start define('TABLE_CUSTOMERS_TO_DISCOUNT_CODES', 'customers_to_discount_codes'); define('TABLE_DISCOUNT_CODES', 'discount_codes'); // Discount Code 2.6 - end
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/ab20256/public_html/shop/includes/database_tables.php:67) in /home/ab20256/public_html/shop/includes/functions/sessions.php on line 102
// Discount Code 2.6 - start define('TEXT_DISCOUNT', 'Discount'); define('TEXT_DISCOUNT_CODE', 'Discount Code'); // Discount Code 2.6 - end // Discount Code 2.6 - 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 2.6 - end
Checkout brings the following error:
// Discount Code 2.6 - start define('TABLE_CUSTOMERS_TO_DISCOUNT_CODES', 'customers_to_discount_codes'); define('TABLE_DISCOUNT_CODES', 'discount_codes'); // Discount Code 2.6 - end
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/ab20256/public_html/shop/includes/database_tables.php:67) in /home/ab20256/public_html/shop/includes/functions/sessions.php on line 102
// Discount Code 2.6 - start define('TEXT_DISCOUNT', 'Discount'); define('TEXT_DISCOUNT_CODE', 'Discount Code'); // Discount Code 2.6 - end // Discount Code 2.6 - 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 2.6 - end
Warning: Cannot modify header information - headers already sent by (output started at /home/ab20256/public_html/shop/includes/database_tables.php:67) in /home/ab20256/public_html/shop/includes/functions/general.php on line 45
Any advice? Really need this fixed as soon as possible but I'm at a complete loss.
Thanks!
Edited by Mike Owings, 06 April 2012 - 10:17 PM.
#97
Posted 07 April 2012 - 01:42 AM
Order Total [img]http://www.leathernecks-swfl.com/store/admin/images/pixel_trans.gif[/img] Back
Warning: include(/hermes/bosweb26d/b447/ipw.leathernecksswflcom/public_html/leathernecks/store/includes/languages/english/modules/order_total/ot_discount.php) [function.include]: failed to open stream: No such file or directory in/hermes/bosweb26d/b447/ipw.leathernecksswflcom/public_html/leathernecks/store/admin/modules.php on line 129
Warning: include() [function.include]: Failed opening '/hermes/bosweb26d/b447/ipw.leathernecksswflcom/public_html/leathernecks/store/includes/languages/english/modules/order_total/ot_discount.php' for inclusion (include_path='.:/usr/local/lib/php-5.2.17/lib/php') in/hermes/bosweb26d/b447/ipw.leathernecksswflcom/public_html/leathernecks/store/admin/modules.php on line 129
Warning: include(/hermes/bosweb26d/b447/ipw.leathernecksswflcom/public_html/leathernecks/store/includes/languages/english/modules/order_total/ot_shipping.php.php) [function.include]: failed to open stream: No such file or directory in/hermes/bosweb26d/b447/ipw.leathernecksswflcom/public_html/leathernecks/store/admin/modules.php on line 129
Warning: include() [function.include]: Failed opening '/hermes/bosweb26d/b447/ipw.leathernecksswflcom/public_html/leathernecks/store/includes/languages/english/modules/order_total/ot_shipping.php.php' for inclusion (include_path='.:/usr/local/lib/php-5.2.17/lib/php') in/hermes/bosweb26d/b447/ipw.leathernecksswflcom/public_html/leathernecks/store/admin/modules.php on line 129
Modules Sort Order Action MODULE_ORDER_TOTAL_DISCOUNT_TITLE [img]http://www.leathernecks-swfl.com/store/admin/images/icon_arrow_right.gif[/img] Low Order Fee [img]http://www.leathernecks-swfl.com/store/admin/images/icon_info.gif[/img] Module Directory: /hermes/bosweb26d/b447/ipw.leathernecksswflcom/public_html/leathernecks/store/includes/modules/order_total/ MODULE_ORDER_TOTAL_DISCOUNT_TITLE Install Module
MODULE_ORDER_TOTAL_DISCOUNT_DESCRIPTION
#98
Posted 07 April 2012 - 01:46 AM
#99
Posted 09 April 2012 - 10:48 PM
Mike Owings, on 06 April 2012 - 10:11 PM, said:
Total newb here and I'm pretty sure my backup is corrupt so whatever assistance you can provide is greatly appreciated.
I tried installing the 3.1.1 full but ran into some trouble. I can't recall exactly what the issue was but we reverted to backup. All was well.
Now that the store is up and running, discount codes were requested again. Instead of going from 3.1.1 again, opted to go from 2.6 and upgrade so I could not any errors.
Well boy did I get one. The following appears at the top of every page in the site except checkout:
// Discount Code 2.6 - start define('TABLE_CUSTOMERS_TO_DISCOUNT_CODES', 'customers_to_discount_codes'); define('TABLE_DISCOUNT_CODES', 'discount_codes'); // Discount Code 2.6 - end
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/ab20256/public_html/shop/includes/database_tables.php:67) in /home/ab20256/public_html/shop/includes/functions/sessions.php on line 102
// Discount Code 2.6 - start define('TEXT_DISCOUNT', 'Discount'); define('TEXT_DISCOUNT_CODE', 'Discount Code'); // Discount Code 2.6 - end // Discount Code 2.6 - 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 2.6 - end
Checkout brings the following error:
// Discount Code 2.6 - start define('TABLE_CUSTOMERS_TO_DISCOUNT_CODES', 'customers_to_discount_codes'); define('TABLE_DISCOUNT_CODES', 'discount_codes'); // Discount Code 2.6 - end
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/ab20256/public_html/shop/includes/database_tables.php:67) in /home/ab20256/public_html/shop/includes/functions/sessions.php on line 102
// Discount Code 2.6 - start define('TEXT_DISCOUNT', 'Discount'); define('TEXT_DISCOUNT_CODE', 'Discount Code'); // Discount Code 2.6 - end // Discount Code 2.6 - 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 2.6 - end
Warning: Cannot modify header information - headers already sent by (output started at /home/ab20256/public_html/shop/includes/database_tables.php:67) in /home/ab20256/public_html/shop/includes/functions/general.php on line 45
Any advice? Really need this fixed as soon as possible but I'm at a complete loss.
Thanks!
I'm a doofus - i tracked down the trailing spaces and improper insertion of changed code.
I tell you, when you take the time to double-check instead of going into blue-assed panic mode, this add-on really is a joy to work with.
Sorry for the temporary idiocy.
#100
Posted 19 April 2012 - 09:48 AM
When you go through the checkout process, it does not deduct the discount percentage from the total..
Can anyone help me with this..









