Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    May 2008
    Posts
    452
    Plugin Contributions
    0

    Default an override attempt didn't work

    Hi -

    I tried overriding a file in includes/modules/payment with a similar file in includes/modules/CUSTOM/payment. The change didn't "take."

    There's a twist here: the file is paypalwpp.php. Now, I don't have PayPal Website Payments Pro enabled in my orders total, but modifying this file does make some changes (it seems to define the text next to the PayPal logo during checkout).

    So, are my overrides being ignored because this module is disabled? And somehow, it's picking up the text formatting anyway?

    Thanks.

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,262
    Plugin Contributions
    3

    Default Re: an override attempt didn't work

    While you create over-rides for the LANGUAGE files for payment modules (if you need to display labels associated with a payment module in another language, for example), the MODULE files do not go into an override folder, as these are for FUNCTION purposes and should not be "edited" or "modified" in any way.

    Basically, you can see where "over-rides" are warranted on the basis of their being a "classic" folder at the over-ride level. Wherever you see a "classic" folder, you can create a folder at the same level named after your "custom" template. If a "classic" folder does not exist, then the rule is that an over-ride is not warranted for the files in question.
    19 years a Zencart User

  3. #3
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: an override attempt didn't work

    Schoolboy,
    Nice explaination of the override structure..

    Mz,
    I download this zip file, then print it out which helps you set up the override structure.
    Mark
    Hare Do

  4. #4
    Join Date
    May 2008
    Posts
    452
    Plugin Contributions
    0

    Default Re: an override attempt didn't work

    Quote Originally Posted by schoolboy View Post
    Basically, you can see where "over-rides" are warranted on the basis of their being a "classic" folder at the over-ride level. Wherever you see a "classic" folder, you can create a folder at the same level named after your "custom" template. If a "classic" folder does not exist, then the rule is that an over-ride is not warranted for the files in question.
    Well, there is a modules/classic folder, so I assumed I could create a CUSTOM folder at this level.

    And, it wasn't the actual text I wanted to change; it was some inline styling. Based on what you're saying, I guess I have no choice but to edit the file in the modules/payment directory.

  5. #5
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,262
    Plugin Contributions
    3

    Default Re: an override attempt didn't work

    ... but there ISN'T a classic folder inside modules/payment ... (so overrides are UNWARRANTED at this level...)
    19 years a Zencart User

  6. #6
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,262
    Plugin Contributions
    3

    Default Re: an override attempt didn't work

    Quote Originally Posted by mzimmers View Post
    And, it wasn't the actual text I wanted to change; it was some inline styling. Based on what you're saying, I guess I have no choice but to edit the file in the modules/payment directory.
    There is nothing to style in the modules files for payment modules... This is all FUNCTION code... there are no divs or embedded html.

    Mike... leave these files alone... you will break your payment systems if you play with payment module files.
    19 years a Zencart User

  7. #7
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,262
    Plugin Contributions
    3

    Default Re: an override attempt didn't work

    What are you trying to "style"... ?

    Styling at checkout payment stage is done via: tpl_checkout_payment_default.php
    19 years a Zencart User

  8. #8
    Join Date
    May 2008
    Posts
    452
    Plugin Contributions
    0

    Default Re: an override attempt didn't work

    Quote Originally Posted by schoolboy View Post
    ... but there ISN'T a classic folder inside modules/payment ... (so overrides are UNWARRANTED at this level...)
    Ahhh...so the presence of the classic folder only works for that directory, not for directories under it. That's the Rosetta Stone (or at least part of it). Thanks for the clarification.

    It still appears that I have to edit that file to un-do the inline styling, though. I won't tell if you don't.

  9. #9
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,262
    Plugin Contributions
    3

    Default Re: an override attempt didn't work

    Quote Originally Posted by mzimmers View Post

    It still appears that I have to edit that file to un-do the inline styling, though. I won't tell if you don't.
    Well, I don't know what part of that file you intend to edit as there is nothing in it that controls style...
    19 years a Zencart User

  10. #10
    Join Date
    May 2008
    Posts
    452
    Plugin Contributions
    0

    Default Re: an override attempt didn't work

    From includes/modules/payment/paypallwpp.php, line 309:

    Code:
        if ($this->enableDirectPayment == false) {
          return array('id' => $this->code,
                       'module' => '<img src="' . MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_IMG . '" alt="' . MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_TXT . '" /><span style="font-size:11px; font-family: Arial, Verdana;"> ' . MODULE_PAYMENT_PAYPALWPP_MARK_BUTTON_TXT . '</span>');
        }
    Note the "style" statement in the span.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h Border Didn't Work As Planned
    By traytray in forum Templates, Stylesheets, Page Layout
    Replies: 19
    Last Post: 4 Sep 2013, 01:27 AM
  2. Didn't use the override system and want to upgrade
    By Hyena in forum Upgrading from 1.3.x to 1.3.9
    Replies: 1
    Last Post: 5 Aug 2011, 01:11 PM
  3. Skype link didn't work.
    By sumri in forum Addon Sideboxes
    Replies: 5
    Last Post: 15 Jun 2010, 03:18 PM
  4. Second main_page template possible? Do I attempt an override?
    By witchyweb in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 20 May 2009, 02:14 AM
  5. OK...why didn't this work?
    By mzimmers in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 22 May 2008, 05:04 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