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.
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.
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.
Re: an override attempt didn't work
Quote:
Originally Posted by
schoolboy
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.
Re: an override attempt didn't work
... but there ISN'T a classic folder inside modules/payment ... (so overrides are UNWARRANTED at this level...)
Re: an override attempt didn't work
Quote:
Originally Posted by
mzimmers
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.
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
Re: an override attempt didn't work
Quote:
Originally Posted by
schoolboy
... 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.
Re: an override attempt didn't work
Quote:
Originally Posted by
mzimmers
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...
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.