Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2007
    Posts
    74
    Plugin Contributions
    0

    Default $confirmation['title'] ?? Where is it set?

    My client wants me to change the text on the Check/Money Order section of the confirmation page (Step 3). However, while I've found where it's set, I cannot find where the variable that prints the message is set -- not in Dev Tools, searching the Zencart files on my computer, or looking in the database.

    From "tpl_checkout_confirmation_default.php" (lines 38-45):
    <?php
    if (is_array($payment_modules->modules)) {
    if ($confirmation = $payment_modules->confirmation()) {
    ?>
    <div class="important"><?php echo $confirmation['title']; ?></div>
    <?php
    }
    ?>

    $confirmation['title'] prints a big block of info, but all I want to change is the last line. Here is the text I want to wrap with a style:
    Your order will not ship until we receive payment.

    They have to be set somewhere. Anyone know where?

    Thanks!
    Tim

  2. #2
    Join Date
    Jul 2007
    Posts
    74
    Plugin Contributions
    0

    Default Re: $confirmation['title'] ?? Where is it set?

    The solution to my problem I found in http://www.zen-cart.com/forum/showthread.php?t=103706

    The text to edit is in includes/languages/english/modules/payment

    You can set both the text that shows on the web page and in the confirmation email sent to the customer.

    STILL... I would appreciate someone telling me how this info got into the $confirmation['title'] array. This is certainly not the first time I've tried to trace something back through the PHP pages only to come to a dead end.

    Thanks,
    Tim

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

    Default Re: $confirmation['title'] ?? Where is it set?

    It happens thus:

    The language file defines text into a constant.
    That constant is loaded by the payment module.
    The customer chooses the payment module.
    The payment module displays the information on the appropriate page.


    To change the text, you would simply look up (developers toolkit or other methods you mentioned) a few words (not usually the entire string) of the text already being displayed. That will show you the various locations where the text is found ... general human brainpower can often help determine which file of a few might be the most appropriate file to edit, usually using the whole string as a narrowing factor ... and then the full text can be reviewed and edited as necessary, thus effecting the change desired.
    .

    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.

  4. #4
    Join Date
    Jul 2007
    Posts
    74
    Plugin Contributions
    0

    Default Re: $confirmation['title'] ?? Where is it set?

    Thanks, Dr Byte. But I still don't get it. It seems to me like the defines are magical.

    I have searched for MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION and confirmation in ALL of the ZenCart files.
    MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION occurs in only one file -- the language define. "confirmation" occurs in two files -- meta_tags.php and english.php. Something is clearly wrong with my search tools since I know there is a "$confirmation" in one of the payment modules. I'll have to take that up with Bare Bones Software.

    Still, what I'm expecting is that somewhere there is a statement like this:
    $confirmation['title'] = MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION;

    Or any place that the $confirmation array is initialized.

    I don't seem to be able to find that place. Any help is appreciated. In the meantime your "general human brainpower" advice seems the only option. Well, that and the forums.

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

    Default Re: $confirmation['title'] ?? Where is it set?

    I'm not sure why you're referring to DESCRIPTION when you're looking for things related to 'title'.


    language file:
    Code:
      define('MODULE_PAYMENT_MONEYORDER_TEXT_TITLE', 'Check/Money Order');
    payment module:
    Code:
          $this->title = MODULE_PAYMENT_MONEYORDER_TEXT_TITLE;
    Then your template calls that data from the payment_modules object in the code, which puts the title into a $confirmation variable as you quoted.
    .

    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. Replies: 0
    Last Post: 28 Oct 2013, 11:22 PM
  2. v151 Where do I Customize Order Confirmation Email style?
    By earmsby in forum General Questions
    Replies: 3
    Last Post: 16 Apr 2013, 08:18 PM
  3. Page Title - Where to Change
    By benjimon in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 19 Sep 2011, 03:44 PM
  4. TITLE in the Admin Where is it?
    By jgamio in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 17 Nov 2006, 01: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