| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | Mark Forums Read | User manuals | Login |
Decorate XC module | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Decorate XC module
I am trying to decorate an existing XC module (Froala Editor) from my own module:
PHP Code:
I keep getting the same error: Fatal error: Class 'XLite\Module\XC\FroalaEditor\View\FormField\Texta rea\AdvancedAbstract' not found in /app/classes/XLite/Module/Udg/Tweaks/View/FormField/Textarea/Advanced.php on line 8 I have tried also using @Decorator\Depend (“XC\FroalaEditor”) Any idea what I am doing wrong?
__________________
5.3.5.8 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Decorate XC module
Here is how the \XLite\Module\XC\FroalaEditor\View\FormField\Texta rea\Advanced class is declared:
PHP Code:
The important point there is that this class implements the \XLite\Base\IDecorator interface. This means that it is not a new class, but a hack into an existing class (\XLite\View\FormField\Textarea\Advanced). That's why in your module you should extend your class from \XLite\View\FormField\Textarea\Advanced, not from \XLite\Module\XC\FroalaEditor\View\FormField\Texta rea\Advanced
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#3
|
|||||||
|
|||||||
Re: Decorate XC module
Thanks for this. That's what I thought too and I tried it as well. Error message is gone but nothing seems to happen.
What I want basically is to alter the buttons in the editor (which ones are showing). But maybe this is not the place to do it? PHP Code:
Here I just removed the first button (fontFamily) but I still see it in all instances of the editor.
__________________
5.3.5.8 |
|||||||
#4
|
|||||||
|
|||||||
Re: Decorate XC module
This might be a dumb question but... Have you Re-deployed the store?
__________________
X Cart 5.4.1.28 Crisp White Skin |
|||||||
#5
|
|||||||
|
|||||||
Re: Decorate XC module
Of course I have redeployed the store. This has an effect on some very few implementations of the editor. Like on certain pages, I see my changes and on others it's the default buttons set. That means this is used, sometimes, but not always. Great. Now could we possibly get an answer from XC team about HOW WE ARE SUPPOSED TO REMOVE A BUTTON FROM THE EDITOR THAT YOU USED ACROSS YOUR ENTIRE PRODUCT?? Thank you SO MUCH in advance.
__________________
5.3.5.8 |
|||||||
#6
|
|||||||
|
|||||||
Re: Decorate XC module
One month later, is there anyone willing to provide a bit of help on that?
__________________
5.3.5.8 |
|||||||
#7
|
|||||||||
|
|||||||||
Re: Decorate XC module
See \XLite\View\FormField\Textarea\Advanced under /var/run/classes
It will have the class it's extending/coming from. It is possible some other module comes after yours and overrides your changes
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#8
|
|||||||
|
|||||||
Re: Decorate XC module
Nope. It's my module. Yet it doesn't affect all instances of the editor, as I described already.
__________________
5.3.5.8 |
|||||||
#9
|
|||||||||
|
|||||||||
Re: Decorate XC module
Quote:
What pages do you still see the old version of the editor on? Tony
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
#10
|
|||||||
|
|||||||
Re: Decorate XC module
For example: admin.php?target=global_tabs -> Then click on "New tab".
Here there are 2 fields with the WYSIWYG editor: "Content" and "Brief info" "Content" field works with my changes (removed some buttons) "Brief info" doesn't - The "Add product" form, it doesn't work - The "Edit category" form, it works - For Vendors, My Account -> Company details -> Description, it works but I am quite surprised as I am pretty sure it did not work a few days/weeks ago. Thx
__________________
5.3.5.8 |
|||||||
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|