Results 1 to 3 of 3
  1. #1
    Join Date
    May 2012
    Posts
    42
    Plugin Contributions
    0

    Default 2 function selection()'s how come - noobie question

    Hey there, bit of a noobie here trying to figure out how the payment modules work.

    in
    includes\classes\payment.php
    &
    includes\modules\payment\paypal.php

    in each there is a function selection()

    then in:
    includes\templates\template_default\templates\tpl_checkout_payment_default.php

    it goes:
    $selection = $payment_modules->selection();

    So which selection() function gets called? and how does it decide? I'm sure it's obvious but it's doin my nut in!

    Any tips?

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

    Default Re: 2 function selection()'s how come - noobie question

    the template calls the one in payment.php, which if you look at the code there, it loops thru each active payment module and runs the one contained inside each payment module file.

    So the simple answer is: all of them.


    The more important issue is: WHY are you even asking this question? If you wish to change the way the output appears for a particular payment module, edit that module's code directly. Do not touch the code in the template nor in payment.php.
    .

    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.

  3. #3
    Join Date
    May 2012
    Posts
    42
    Plugin Contributions
    0

    Default Re: 2 function selection()'s how come - noobie question

    Thanks for that, I get it now. D'oh.

    No, don' worry I (kinda) know what I'm doing and that I should be using the template system if I want to make layout changes. I'm just trying to figure out how the payment modules actually work

 

 

Similar Threads

  1. v150 Attribute Selection Question
    By nadinesky in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 29 Feb 2012, 12:36 AM
  2. Skip shipping selection question (hide selection)
    By CabernetCat in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 1 Jan 2012, 09:31 AM
  3. Subcategory-selection: placement question
    By KiwiBrian in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 15 Aug 2008, 10:16 PM
  4. Replies: 2
    Last Post: 7 Jan 2008, 03:14 PM
  5. Issue with Checkout - noobie question
    By Edgar in forum Managing Customers and Orders
    Replies: 2
    Last Post: 20 Dec 2006, 04:47 AM

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