Guest Posted March 25, 2008 Share Posted March 25, 2008 (edited) Hi! I am located in norway, selling to norwegian customers only, and now I need to insert a Fixed Payment Type Charge, when people choose COD (cash on delivery), so that i can charge the customer depending on which payment type they choose, and not only shipping type. I downloaded a couple of modules who would set a charge for a chosen payment type, but the problem is that i have CRE loaded, not oscommerce, so when i get to a certain point in the manual installation/configuration, i have a problem because there is no such line to replace (look below at the installation steps) in the same file inside of Cre loaded, like there is in the oscommerce. Anyone knows how to make this work with CRE loaded? This is what i cannot find located inside the file in creloaded: # go to catalog/checkout_payment.php # find this line (around 257) <td class="main" colspan="3"><b><?php echo $selection[$i]['module']; ?></b></td> INSTALLATION: 1) Copy the ot_fixed_payment_chg.php order total module to your shop, at the same location. Do same with the language files. 2) If you have a clean osCommerce 2.2 MS2, you can copy the all the files over the original ones. 3) As you probably don't have a clean osC, here are the modifications to do in 2 files (clean files with only this contribution installed are also provided, it can be faster to use a comparison program to update your shop): # go to catalog/includes/classes/payment.php # REPLACE the function selection() around line 125 with the one below: (or ADD the //added for ot_fixed_payment_chg" lines) function selection() { $selection_array = array(); include_once (DIR_WS_MODULES.'order_total/ot_fixed_payment_chg.php'); // added for ot_fixed_payment_chg $pay_chg = new ot_fixed_payment_chg; // added for ot_fixed_payment_chg if (is_array($this->modules)) { reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if ($GLOBALS[$class]->enabled) { $selection = $GLOBALS[$class]->selection(); $selection['cost'] = $pay_chg->get_payment_cost($class); // added for ot_fixed_payment_chg if (is_array($selection)) $selection_array[] = $selection; } } } return $selection_array; } # go to catalog/checkout_payment.php # find this line (around 257) <td class="main" colspan="3"><b><?php echo $selection[$i]['module']; ?></b></td> # REPLACE with: <td class="main" colspan="3"><b> <?php echo $selection[$i]['module']; if ($selection[$i]['cost']){ echo ' ('.$currencies->format($selection[$i]['cost']).')'; } ?></b></td> Edited March 25, 2008 by anxiouskittie Quote Link to comment Share on other sites More sharing options...
Guest Posted March 25, 2008 Share Posted March 25, 2008 Sorry, CRELoaded is not supported here. Try http://forums.creloaded.com/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.