Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2007
    Posts
    58
    Plugin Contributions
    0

    Default Payment Module Cloning Question.

    Hello,

    I have read and used Ajeh's excellent post on cloning the flat rate shipping, And I would like to do the same with the check/money order payment module.

    Can any module be cloned or specifically the check/money order payment module?

    Thanks in advance for any response,

    Steve
    Stuff: ZC v1.37 | Linux | mysql v 4.1x | php v 4.4x | phpmyadmin v 2.6x | Default Template

    Mods: Login Box v 1.41

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Payment Module Cloning Question.

    As check/money order is not a true gateway with another system, but rather gathers just the bare info of saying "The check is in the mail ...", then it could be cloned in the same manner as Flat Rate flat shipping module where, if the cloned filename is:
    flatusa

    it would use:
    flatusa for flat
    FLATUSA for FLAT

    so Check/Money Order moneyorder would use for a clone called:
    somethingelse.php

    and it would use
    somethingelse for moneyorder
    SOMETHINGELSE for MONEYORDER
    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!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Mar 2007
    Posts
    58
    Plugin Contributions
    0

    Default Re: Payment Module Cloning Question.

    Thank you Linda,

    "Bare info" is exactly what I need.

    Steve
    Stuff: ZC v1.37 | Linux | mysql v 4.1x | php v 4.4x | phpmyadmin v 2.6x | Default Template

    Mods: Login Box v 1.41

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Payment Module Cloning Question.

    You are most welcome ... glad that this was able to help you in cloning a payment method ...
    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!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Mar 2007
    Posts
    58
    Plugin Contributions
    0

    Default Re: Payment Module Cloning Question.

    Dang,
    I always get confused on the template overrides.

    I know the altered language file goes to /cart/includes/languages/english/modules/payment/MY_TEMPLATE/moneyorder.php but where do I place the altered /cart/includes/modules/payment/moneyorder.php ?

    My brain just doesn't get the override file structure.

    Thanks for any help,

    Steve
    Stuff: ZC v1.37 | Linux | mysql v 4.1x | php v 4.4x | phpmyadmin v 2.6x | Default Template

    Mods: Login Box v 1.41

  6. #6
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Payment Module Cloning Question.

    If you're cloning, then you're creating a new module, with new filenames, so there's no need to do overrides.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Mar 2007
    Posts
    58
    Plugin Contributions
    0

    Default Re: Payment Module Cloning Question.

    To DrByte - Boy are you right. From my error logs:
    PHP Fatal error: main(): Failed opening required '.../cart/includes/languages/english/modules/payment/simplepaypal.php' (include_path='.:/usr/share/pear') in /cart/MYADMIN/orders.php on line 319
    Moved the file and it works like a dream.

    To Linda, DrByte, and the rest of the ZC Gurus: You are the best! ZC has worked flawlessly for us for over a year now. Knowledge and help run's wild here. Thank you for all you do and have done.

    In case anyone else had the need...

    We needed a way to offer our customers the option to pay via Paypal without a payment gateway. Here's what we did...

    Clone the money order payment module:

    1) Make a copy of /cart/includes/modules/payment/moneyorder.php and rename it. (we used simplepaypal.php)

    Do a search and replace to change all instances of:
    moneyorder to simplepaypal (OR YOUR FILE NAME) and
    MONEYORDER to SIMPLEPAYPAL (OR YOUR FILE NAME)

    Load the new file to /cart/includes/modules/payment/

    2) Make a copy of /cart/includes/languages/english/modules/payment/moneyorder.php and rename it. (we used simplepaypal.php)

    You need to edit lines lines 23-25. We changed:

    PHP Code:
      define('MODULE_PAYMENT_MONEYORDER_TEXT_TITLE''Check/Money Order');
      
    define('MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION''Please make your check or money order payable to:<br />' MODULE_PAYMENT_MONEYORDER_PAYTO '<br /><br />Mail your payment to:<br />' nl2br(STORE_NAME_ADDRESS) . '<br /><br />' 'Your order will not ship until we receive payment.');
      
    define('MODULE_PAYMENT_MONEYORDER_TEXT_EMAIL_FOOTER'"Please make your check or money order payable to:" "\n\n" MODULE_PAYMENT_MONEYORDER_PAYTO "\n\nMail your payment to:\n" STORE_NAME_ADDRESS "\n\n" 'Your order will not ship until we receive payment.'); 
    To:

    PHP Code:
      define('MODULE_PAYMENT_SIMPLEPAYPAL_TEXT_TITLE','Pay with Paypal');
      
    define('MODULE_PAYMENT_SIMPLEPAYPAL_TEXT_DESCRIPTION''<img src="images/paypal_logo.jpg" style="float: right;padding-right:20px;" width="37" height="23" alt="Paypal Logo" />' '<span style="color:#CB002B;">IMPORTANT! - You will receive an email with your order total and Paypal instructions after we have processed your order.</span>' '<br /><br />' 'Your order will be held until payment has been received.');
      
    define('MODULE_PAYMENT_SIMPLEPAYPAL_TEXT_EMAIL_FOOTER''You will receive an email with your order total and Paypal instructions after we have processed your order.' '<br /><br />' 'Your order will be held until payment has been received.'); 
    *note the 3 changes from _MONEYORDER_ to _SIMPLEPAYPAL_.

    Load the new file to /cart/includes/languages/english/modules/payment/

    3) Go to ADMIN > MODULES > PAYMENT and install your newly cloned module.

    That's it.

    Why??

    Our customers are extremely sensitive about shipping costs. When they request "ship my order the cheapest way" they mean it (and they check). So all of our orders require us to package their order, calculate the best shipping and notify them of the total cost (shipping + order) in the 2nd step of the process (pending). With this module/clone we simply include a link to pay via Paypal. It's not traditional but it works and it's what our customers want.
    Stuff: ZC v1.37 | Linux | mysql v 4.1x | php v 4.4x | phpmyadmin v 2.6x | Default Template

    Mods: Login Box v 1.41

  8. #8
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Payment Module Cloning Question.

    There's a very old (v1.1 or v1.2) "PayPal Request" module which does similarly.
    If you need to revise things for any reason, there could be some inspiration in there as well: http://www.zen-cart.com/archived_con...palrequest.zip
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Cloning cod payment option
    By the.rampage.rado in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 2 Feb 2013, 11:58 PM
  2. Cloning Payment Customization
    By dbjsi83474 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 13 Aug 2011, 07:03 PM
  3. Shipping module cloning
    By jmp04 in forum Built-in Shipping and Payment Modules
    Replies: 21
    Last Post: 11 Dec 2010, 02:36 PM
  4. Cloning Store Pickup module question
    By ajcannon in forum Addon Shipping Modules
    Replies: 2
    Last Post: 4 Oct 2006, 07:09 PM

Posting Permissions

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