mage-enhanced-admin-grids icon indicating copy to clipboard operation
mage-enhanced-admin-grids copied to clipboard

1.0.0 wip edge

Open LEEJUNESEOK opened this issue 9 years ago • 1 comments

I using 1.0.0 version.

Looks it has bug, Can you check it? BL/CustomGrid/Block/Widget/Grid/Column/Renderer/Text.php

56 Line

`if (($truncationMode = $this->getColumn()->getTruncationMode()) && ($truncationMode != self::TRUNCATION_MODE_NONE)) { /** @var $stringHelper BL_CustomGrid_Helper_String */ $stringHelper = $this->helper('customgrid/string'); $truncationLength = (int) $this->getColumn()->getTruncationAt();
$truncationEnding = $this->getColumn()->getTruncationEnding();
$exactTruncation = (bool) $this->getColumn()->getExactTruncation(); $remainder = '';

        if ($truncationMode == self::TRUNCATION_MODE_HTML) {
            $textValue = $stringHelper->truncateHtml(
                $textValue,
                $truncationLength,
                $truncationEnding,
                !$exactTruncation
            );
        } elseif ($truncationMode == self::TRUNCATION_MODE_TEXT) {
            $textValue = $stringHelper->truncateText(
                $textValue,
                $truncationLength,
                $truncationEnding,
                $remainder,
                !$exactTruncation
            );              
        }
    }

` $truncationLength value always 0, $truncationEnding also empty.

It related with adding text field grid > rendering > truncation setting in catalog/product page. $truncationMode return right value as setting, but 'Truncate at n-th character', 'Truncate ending string' value doesn't return it.

as it result, when Truncate => yes, custom field show empty value. ( truncationLength==0, return '' ) I tested it php7 and php 5.6

LEEJUNESEOK avatar Feb 23 '16 12:02 LEEJUNESEOK

$truncationLength value always 0, $truncationEnding also empty.

I do not see this. Does have value.

In this image Ending is hyphen which is correct Lenght tested too was also correct

However: I do agree that even then - it does not work as expected .... that we see also.

image

seansan avatar May 04 '17 19:05 seansan