Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Apr 2012
    Posts
    6
    Plugin Contributions
    0

    Default 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?

  2. #2
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    825
    Plugin Contributions
    6

    Default Re: Duplicate freecharger module

    FreeCHARGER??? You mean freeshipper, right? Or freeoptions maybe?
    Sorry, moment of stupidity... I apologize.
    Last edited by balihr; 18 Apr 2012 at 05:14 PM.
    What I've done lately: AMCS | Goatee Saver | JonaMaria | LBB Adult Shop | Finntimo
    Zen Cart with Layered Navigation? Sure: DQT
    My site - Pro ZC Help | My portfolio

  3. #3
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    825
    Plugin Contributions
    6

    Default Re: Duplicate freecharger module

    I've attached a cloned module, you can try uploading that.

    Let us all know if it works.
    Attached Files Attached Files
    What I've done lately: AMCS | Goatee Saver | JonaMaria | LBB Adult Shop | Finntimo
    Zen Cart with Layered Navigation? Sure: DQT
    My site - Pro ZC Help | My portfolio

  4. #4
    Join Date
    Apr 2012
    Posts
    6
    Plugin Contributions
    0

    Default Re: Duplicate freecharger module

    Quote Originally Posted by balihr View Post
    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?

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,170
    Plugin Contributions
    6

    Default 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 ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  6. #6
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    825
    Plugin Contributions
    6

    Default Re: Duplicate freecharger module

    Quote Originally Posted by Ajeh View Post
    The freecharger.php is a "special" payment module ...
    Oh dang...

    I totally forgot about that, my mind was still on the shipping modules... Should've tested first, my bad...
    What I've done lately: AMCS | Goatee Saver | JonaMaria | LBB Adult Shop | Finntimo
    Zen Cart with Layered Navigation? Sure: DQT
    My site - Pro ZC Help | My portfolio

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,170
    Plugin Contributions
    6

    Default Re: Duplicate freecharger module

    NOTE: you should also use:
    freecharger2

    vs trying to use
    freecharger_2

    that underscore will cause you issues ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  8. #8
    Join Date
    Apr 2012
    Posts
    6
    Plugin Contributions
    0

    Default 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.

  9. #9
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    825
    Plugin Contributions
    6

    Default Re: Duplicate freecharger module

    I believe we both understand what you want (especially Ajeh ) 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.
    What I've done lately: AMCS | Goatee Saver | JonaMaria | LBB Adult Shop | Finntimo
    Zen Cart with Layered Navigation? Sure: DQT
    My site - Pro ZC Help | My portfolio

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,170
    Plugin Contributions
    6

    Default 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 ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Freecharger Payment Module
    By QuiltingBeany in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 17 May 2011, 03:13 PM
  2. Freecharger module. Why my customers can't download free products instantly?
    By fitwer77 in forum Managing Customers and Orders
    Replies: 1
    Last Post: 9 Jan 2010, 11:47 PM
  3. Disable downloads for Freecharger Module
    By townsend2009 in forum Managing Customers and Orders
    Replies: 1
    Last Post: 14 Oct 2009, 06:31 PM
  4. Replies: 28
    Last Post: 20 Jul 2009, 07:39 PM
  5. [DONE v1.3.8] Order status for freecharger
    By disciple in forum Bug Reports
    Replies: 4
    Last Post: 19 Mar 2007, 11:36 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •