0

Is there any limit to number of characters for product description and short description in magento 2?

3

1 Answer 1

0

Use Custom Code Try

    $sdesc = $_product->getShortDescription();<br ?--> $sdesc = trim($sdesc);
    $limit = 40;
    if (strlen($sdesc) > $limit) {
    $sdesc = substr($sdesc, 0, strrpos(substr($sdesc, 0, $limit), ' '));
    }
    echo $sdesc."...";

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.