This is a discussion on Free Shipping Coupon and LinkPoint within the osCMax v2 Features Discussion forums, part of the osCMax v2.0 Forums category; I'm trying to use a free shipping coupon in my store. I'm usin the linkpoint gateway, which required that the ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| I'm trying to use a free shipping coupon in my store. I'm usin the linkpoint gateway, which required that the subtotal, shipping and total match. So, if any discounts are applied (such as a free shipping coupon) these don't add up as far as linkpoint is concerned. So, I though I would take the free shipping off before the order is subtotaled, then everything would jive. I've done this through the order total module sort order. Well, the subtotal is not removing the free shipping amount, so the values still don't jive. What can I do to get this to work? |
| Sponsored Links | ||
| ||
|
#2
| |||
| |||
| OK figured out the problem for us Linkpoint users. First, there is a piece of code missing from the catalog/includes/modules/order_total/ot_coupon.php file. Find the this section of code: Code: function process() {
global $PHP_SELF, $order, $currencies;
$order_total=$this->get_order_total();
$od_amount = $this->calculate_credit($order_total);
$tod_amount = 0.0; //Fred
$this->deduction = $od_amount;
if ($this->calculate_tax != 'None') { //Fred - changed from 'none' to 'None'!
$tod_amount = $this->calculate_tax_deduction($order_total, $this->deduction, $this->calculate_tax);
}
if ($od_amount > 0) {
$order->info['total'] = $order->info['total'] - $od_amount;
Code: $_SESSION['od_amount'] = $od_amount; Code: function process() {
global $order, $currencies;
// BOF: LINES ADDED
$od_amount = $_SESSION['od_amount'];
$subtotal = $order->info['subtotal'] - $od_amount;
$order->info['subtotal'] = $order->info['subtotal'] - $od_amount;
// EOF: LINES ADDED
![]() Now, I'm not a proficient PHP programmer, but there are sections of code that have the $_SESSION line commented out with a statement that says to use the global variable rather than the $_SESSION statement. So if there's a better, more preferred method of getting the $od_amount into the ot_subtotal routine, I would certainly welcome the tip. John |
|
#3
| ||||
| ||||
| actually you didnt figure this out, lol, its in the installation instructions i wrote and included with the module and which micheal has included in the module directory for you in the /includes/linkpoint directory. this is plainly documented, it is required ONLY if you use this module or the credit class gift voucher modification. linkpoint was originally written for stock oscommerce which did not come with these modules and therefore the code had to be changed IF and only IF you actually added these modules to your store. Since these modules come with oscmax, it needs to be done.
__________________ Clifton Murphy CEO/CTO Hyperactive Inc. osCommerce hosting, OSCMAX hosting, osCommerce modification, and OSCMAX modification specialists! |
|
#4
| |||
| |||
| Quote:
|
|
#5
| |||
| |||
| Quote:
|
|
#6
| ||||
| ||||
| Quote:
Just follow these instructions...already there for you, no need to look elsewhere.
__________________ Michael Sasek osCMax Developer
|
|
#7
| |||
| |||
| Well, that seems to work for discount coupons, but it does not work for gift certificates (at least not with ccgv(trad)), so I'm still looking for a solution for that piece. |
|
#8
| ||||
| ||||
| Maybe I am asking too much, but if it works in ot_coupon.php... why not make the logical connection that it should also work in ot_gv.php? Here is the text file from the linkpoint mod: Quote:
__________________ Michael Sasek osCMax Developer
|
|
#9
| |||
| |||
| I added the line from ot_coupon.php to ot_gv.php but it did not work. Maybe there is a conflict between discount coupons and gift certificates? Maybe you can only use one or the other but not both? Hopefully someone who knows more about these than I do can shed some light on this. |
|
#10
| ||||
| ||||
| Did you put the gift voucher ot mod before the subtotal?
__________________ Michael Sasek osCMax Developer
|
| Sponsored Links | ||
| ||
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Free Shipping Mod. | mrocket | osCommerce 2.2 Modification Help | 0 | 10-25-2004 01:44 PM |
| free shipping over $99.00 | lil-raskals | osCommerce 2.2 Modification Help | 0 | 10-05-2004 08:49 AM |
| Free Shipping | GamerGoat | osCMax v1.7 General Mods Discussion | 8 | 04-14-2004 12:22 PM |
| Free shipping?? | ChanBe | osCMax v1.7 Discussion | 3 | 09-17-2003 02:18 PM |
| Free Shipping/flat rate shipping in zone | cvc505 | osCommerce 2.2 Installation Help | 2 | 07-21-2003 10:29 AM |