Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Visual Editor for Product Description

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › Visual Editor for Product Description

Tagged: ckeditor, product description, textarea, wysiwyg

  • This topic has 3 replies, 2 voices, and was last updated 12 years, 3 months ago by amin007.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • December 10, 2010 at 5:31 am #2355
    uladk
    Member

    Is there anyway to install a WYSIWYG editor for product descriptions? In particular CKEditor? I noticed this textarea accepts html tags but this isn’t client friendly.

    Thanks

    December 10, 2010 at 11:02 pm #27248
    amin007
    Participant

    Nope, the product description area is not really meant to have a lot of HTML and other designs as all the fancy displays are very compact. You should consider doing the product display using the WordPress’s visual editor and just place a button for the product using eStore. This post explains more on this:

    https://support.tipsandtricks-hq.com/forums/topic/can-i-put-multiple-images-and-videos-in-the-fancy-display

    December 11, 2010 at 12:25 am #27249
    uladk
    Member

    Thanks for your reply.

    I managed to get the ckeditor installed for the product description textarea. The reason I wanted to do this was to keep all the product information together (I didn’t want my client to add a product through eStore then have to edit information in that location and then have to edit descriptions in the wordpress page/post where the product is called). Also, I’m bypassing the fancy displays by creating my own functions to display the data.

    To install it I did the following (incase others would like to know):

    Upload ckeditor to your server. I uploaded mine to “wp-content/themes/themeName/js/”

    Within eStore’s “eStore_product_management.php” do the following:

    Add an ID to the Product Description textarea within:

    <textarea name=”productdesc” cols=”83″ rows=”3″><?php echo $editingproduct->description; ?></textarea>

    It will look like this:

    <textarea id=”theproductdesc” name=”productdesc” cols=”83″ rows=”3″><?php echo $editingproduct->description; ?></textarea>

    Add a call to the function that will load ckeditor.js:

    echo wp_eStore_load_ckeditor_js();

    underneath the following existing line:

    echo wp_eStore_load_jquery();

    Within eStore’s “admin_includes.php” do the following:

    Add this function under the “wp_eStore_load_jquery()” function. This is the function that loads ckeditor.js (the source of your script will be different):

    function wp_eStore_load_ckeditor_js()

    {

    return ‘<script type=”text/javascript” src=”‘.WP_CONTENT_URL.’/themes/yourThemeName/js/ckeditor/ckeditor.js”></script>’;

    }

    In the “eStore_admin_js_scripts()” function, add this code at the end output string (this replaces the textarea with the visually rich ckeditor):

    CKEDITOR.replace(“theproductdesc”);

    “theproductdesc” refers to the ID we added to the Product Description textarea.

    Please note that updating the eStore plugin will most likely overwrite the modified files, so this will have to be done after every update.

    December 11, 2010 at 1:18 am #27250
    amin007
    Participant

    Thank you for sharing.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • WP PDF Stamper Documentation
  • WP Photo Seller Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial
  • WP Photo Seller Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Download Monitor

Copyright © 2023 | Tips and Tricks HQ