Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,905
    Plugin Contributions
    5

    Default Using php code in payment module language files?

    I am writing a new payment module which involves getting the next (possible) order number.
    If I use some php code to customise the output in the language file it all works fine.
    The other way would be to hack a lot of other files to achieve the same result.

    1. How bad is the downside to using php code in the language files?

    2. Using custom functions to calculate and display info in other places, such as customer order info. Is it ok to put these into the class file and call them externally or should I use "another" file for these functions elsewhere?

    I am trying to keep it compact to 2 new files, and 2 edited files if possible.
    vs editing and adding code in a lot more places!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Using php code in payment module language files?

    The Authnet AIM module (and the Linkpoint module) has code in it to check the last order number, then add 1 and use that when submitting a new payment transaction. You can duplicate that code and adjust as needed, ideally in the same class method as you copy it from.

    Remember: Zen Cart doesn't officially assign a final order number until *after* payment is confirmed ... so this process is only a best-guess approximation, primarily intended for use when reconciling between the payment gateway and the store.
    .

    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. german language charset in php... editing php files
    By treelight in forum Addon Language Packs
    Replies: 2
    Last Post: 17 Nov 2011, 10:24 PM
  2. Emails not using my language files
    By Davx in forum General Questions
    Replies: 5
    Last Post: 26 May 2011, 01:33 PM
  3. Replies: 6
    Last Post: 11 May 2009, 03:35 AM
  4. Entering HTM Code into PHP Files - Adding Live Search to search_header.php
    By Jump Network in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 23 Sep 2007, 02:47 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR