Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    May 2008
    Posts
    468
    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
    Hertfordshire, UK
    Posts
    9,955
    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.
    Our latest project is Pet Tags.

  3. #3
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,098
    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 - Does the rabbit beat Zen "never".
    Zen Cart 1.5.1 Update Release Need help Purchase the Book

  4. #4
    Join Date
    May 2008
    Posts
    468
    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
    Hertfordshire, UK
    Posts
    9,955
    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...)
    Our latest project is Pet Tags.

  6. #6
    Join Date
    Jun 2005
    Location
    Hertfordshire, UK
    Posts
    9,955
    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.
    Our latest project is Pet Tags.

  7. #7
    Join Date
    Jun 2005
    Location
    Hertfordshire, UK
    Posts
    9,955
    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
    Our latest project is Pet Tags.

  8. #8
    Join Date
    May 2008
    Posts
    468
    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
    Hertfordshire, UK
    Posts
    9,955
    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...
    Our latest project is Pet Tags.

  10. #10
    Join Date
    May 2008
    Posts
    468
    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. 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
  2. WTF? Override doesn't work at all
    By nate22 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 16 Nov 2007, 12:39 AM
  3. Override Does not work for me
    By teebee2e in forum Templates, Stylesheets, Page Layout
    Replies: 30
    Last Post: 20 Jun 2006, 05:42 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
  •