Home Forums WC Vendors Pro Support Shop Description Word Limit

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #50777
    The Ebook Giant
    Participant

    Is there any way to put a limit on the amount of words/characters that can be used for the Shop Description?

    #50793
    Anna
    Member

    @ebookgiant
    DO you want to limit the character output or limit the actual characters typed into the text box?
    Are you using the standard text form (with HTML) or have you disabled the vendor’s ability to add HTML in the shop description? (this matters).

    #50798
    The Ebook Giant
    Participant

    Limit the actual characters typed into the text box.

    HTML is disabled by default for vendors.

    #50947
    The Ebook Giant
    Participant

    @fervous you there?

    #50993
    Anna
    Member

    @ebookgiant
    Yes- I am here. Or there… depending on your perspective and/or physical location.

    So far I have not been able to use the standard methods for limiting test within these fields.
    I will let you know if I am able to get a method to apply. I believe since we have options to have the text area in the front end forms appear as a simple text area with no HTML or a text area which allows HTML the code is requiring a step that I have not yet worked out.

    #51087
    The Ebook Giant
    Participant

    Would you be able to do it if I had HTML enabled or that isn’t part of the problem? How about limitting character output instead?

    #51198
    The Ebook Giant
    Participant

    Nothing yet @fervous?

    #51660
    The Ebook Giant
    Participant

    Still nothing I assume.. 🙁

    #51662
    Anna
    Member

    Hello,
    I can guide you to how you may be able to limit the character OUTPUT. I have struggled with the textarea character limitation quite a bit for this one, and how it is coded makes it difficult since there are two options for the store description form.

    TO limit the character output, you would use substr http://www.w3schools.com/php/func_string_substr.asp

    I do not know what theme you are using, so this may need adjustment.
    You need to find where the store description is being output on the vendor store page.

    Your modified line should look something like this if you were to limit to 220 characters… – though you’ll need to adjust to whatever code is being used in your template to display the store description:
    <?php echo substr( $shop_description, 0,220) . "…."; ?>

    #51836
    The Ebook Giant
    Participant

    Seems like a tough one. I’m using Book Store and my name is Lost right now.

    thanks ill see what i can do

    #51925
    Anna
    Member

    Ok, @ebookgiant The Ebook Giant…
    I worked on this to edit the store-header.php template to echo a substr for the store description.
    If you are using ReHub:Vendor or BuddyBoss OneSocial/Social Marketplace this may be different.
    Otherwise:
    1. Modify the store-header.php template, found here: wp-content/plugins/wcvendors-pro/templates/store/store-header.php
    2. Move it to:
    wp-content/themes/your-theme-or-child-theme/wc-vendors/store/store-header.php

    3. Around line 112, you will see this:
    <p><?php echo $vendor_meta['pv_shop_description']; ?></p>

    You need to change it to this… and change the 100 to whatever number of characters you wish to limit the output to:
    <p><?php echo substr($vendor_meta['pv_shop_description'], 0,100). "..."; ?></p>

    This should limit the store description text output in the store header/store banner area to the specified number of characters (in this case, 100 characters).

    #51926
    Anna
    Member
    #52266
    The Ebook Giant
    Participant

    Just noticed a bug with this @fervous

    So after I added this I noticed the entire single product page changed according to what the vendor of that page did with his shop description. So lets say he wrote something in BOLD TEXT what happens is the whole single product page including the text on the WooCommerce tabs become bold aswell. This only applies to the single product page of the vendor’s own products.

    #52303
    Anna
    Member

    Hello,
    Are you certain that the HTML styling tag was closed? For instance, if <strong> tag was used for bold text, is the closing </strong> following the text to stop the formatting?

    #52361
    The Ebook Giant
    Participant

    Yes @fervous it is closed. I did check that. Still affects the entire single product page.

    #52388
    Anna
    Member

    Hello, Ok- I see. If the formatting occurs after the allotted amount of characters (if you allow 100 characters, but beginning at character 150 your vendor has added HTML formatting), then it is not properly closed out.
    If you wish to use this character limit, you’ll need to NOT allow HTML formatting for the vendor store description text area.

Viewing 16 posts - 1 through 16 (of 16 total)
  • The forum ‘WC Vendors Pro Support’ is closed to new topics and replies.