Duplicate freecharger module
Hi!
I make a web shop where the price must be calculated after ordering. So shopping cart will only be an order form for price inquiry. Since all prices are zero is "freecharger" module the only one that works but I have 2 options they can choose from. So what I try to do is to duplicate the "freecharger" module and change the text on one.
Does anyone know how I can do this? Or any other solutions?
Re: Duplicate freecharger module
FreeCHARGER??? You mean freeshipper, right? Or freeoptions maybe?
Sorry, moment of stupidity... I apologize. :blush:
1 Attachment(s)
Re: Duplicate freecharger module
I've attached a cloned module, you can try uploading that.
Let us all know if it works.
Re: Duplicate freecharger module
Quote:
Originally Posted by
balihr
I've attached a cloned module, you can try uploading that.
Let us all know if it works.
Thank you! It comes up as an option on checkout_payment. But if they choose that option it does not show on the checkout_confirmation and order confirmation e-mail.
Do you have any solutions on this?
Re: Duplicate freecharger module
The freecharger.php is a "special" payment module ...
If you want to have two of them, you will need to further customize the code ...
Go to the Tools ... Developers Tool Kit ... and in the bottom input box enter:
freecharger
and select Catalog and click SEARCH ...
You need to customize the 3 classes that come up so that your cloned payment module can also work ...
Re: Duplicate freecharger module
Quote:
Originally Posted by
Ajeh
The freecharger.php is a "special" payment module ...
Oh dang... :frusty:
I totally forgot about that, my mind was still on the shipping modules... Should've tested first, my bad... :oops:
Re: Duplicate freecharger module
NOTE: you should also use:
freecharger2
vs trying to use
freecharger_2
that underscore will cause you issues ...
Re: Duplicate freecharger module
We have tried to modify the files, but it did not work. Can one of you look at it?
Here's a link to the 3 files: http://development.giaever.org/paste...Tiki/zen-cart/
I think we have misunderstood what changes must be made.
Re: Duplicate freecharger module
I believe we both understand what you want (especially Ajeh :smile:) but I can't help you with this. Unless Ajeh is willing to code this for you, I'm afraid you'll have to go to the Commercial help section... Sorry.
Re: Duplicate freecharger module
First, make sure you re-wrote your freecharger_2.php to be freecharger2.php and use:
freecharger2
FREECHARGER2
Next, customize the 3 class files:
/includes/classes/order.php
and around line 582 change to:
Code:
if ($_SESSION['payment'] != 'freecharger' && $_SESSION['payment'] != 'freecharger2') {
/includes/classes/payment.php
and change the code around line 39 to:
Code:
// Free Payment Only shows
if ((zen_get_configuration_key_value('MODULE_PAYMENT_FREECHARGER_STATUS') || zen_get_configuration_key_value('MODULE_PAYMENT_FREECHARGER2_STATUS')) and ($_SESSION['cart']->show_total()==0 and $_SESSION['shipping']['cost']== 0)) {
$this->selected_module = $module;
if (file_exists(DIR_FS_CATALOG . DIR_WS_MODULES . '/payment/' . 'freecharger.php')) {
$include_modules[] = array('class'=> 'freecharger', 'file' => 'freecharger.php');
}
if (file_exists(DIR_FS_CATALOG . DIR_WS_MODULES . '/payment/' . 'freecharger2.php')) {
$include_modules[] = array('class'=> 'freecharger2', 'file' => 'freecharger2.php');
}
/includes/classes/order_total.php
and change the code around line 216 to:
Code:
if ( $difference <= 0.009 && ($_SESSION['payment'] != 'freecharger' && $_SESSION['payment'] != 'freecharger2')) {
That should allow for both Free Charger files to work ...