Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Add A Second Editor In Category Page. Rate Topic   - - - - -

 
  • ArchimidisM
  • Newbie
  • Trial users
  • Join Date: 30-Jan 16
  • 6 posts

Posted 01 February 2016 - 11:01 AM #1

Dear All

I am brand new to CS-Cart addon development and I am trying to figure some things out.

I would like to ask if there is a way to add a second editor (WYSIWYG) in each category and if what should I do with the category template in the admin.

 

May I override it with an addon ? 

Should I also alter the category table with this addon?



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19260 posts

Posted 01 February 2016 - 03:27 PM #2

Dear All

I am brand new to CS-Cart addon development and I am trying to figure some things out.

I would like to ask if there is a way to add a second editor (WYSIWYG) in each category and if what should I do with the category template in the admin.

 

May I override it with an addon ? 

Should I also alter the category table with this addon?

 

Yes, you can use several WYSIWYG editors on one page. For example, enable the My changes module and create the following file:

 

design/backend/templates/addons/my_changes/hooks/categories/detailed_content.pre.tpl

 

with the following content:

 <div class="control-group">
        <label class="control-label" for="elm_category_short_descr">{__("short_description")}:</label>
        <div class="controls">
            <textarea id="elm_category_short_descr" name="category_data[short_description]" cols="55" rows="8" class="input-large cm-wysiwyg input-textarea-long">{$category_data.short_description}</textarea>
        </div>
    </div>

Then clear the cache and check the result in the Addons tab on the Update category page

 

Note: additional changes in the cscart_category_descriptions table are required to save entered data


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • ArchimidisM
  • Newbie
  • Trial users
  • Join Date: 30-Jan 16
  • 6 posts

Posted 02 February 2016 - 12:02 PM #3

Thanks for the nice and detailed answer. I will try it out!



 
  • ArchimidisM
  • Newbie
  • Trial users
  • Join Date: 30-Jan 16
  • 6 posts

Posted 02 February 2016 - 01:25 PM #4

Dear eComLabs,

everything is great , I added another db table as well. The only weird issue is that although I use the "cm-wysiwyg" class, it does not format the redactor editor, but a plain textarea.

 

Why does this happens? Is it because the "pre" hook?