Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Product list by code #105

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

s-diez
Copy link
Contributor

@s-diez s-diez commented Jun 14, 2019

See #83, aimeos/ai-client-html#73.

This adds a Typo3 plugin for the new client Catalog/Product and a Flexform helper to select products.
I limited the product list to 10000, this should prevent overload, but prevents some products from being selectable, if the shop has more then 10000 products. I'm open for any suggestions how to resolve this.

@aimeos
Copy link
Owner

aimeos commented Jun 14, 2019

We need a dynamic product list based on the input (product label). Have seen this already but need to get the code

@aimeos
Copy link
Owner

aimeos commented Jun 17, 2019

Here's how autosuggest should work :-)

In TCA:

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
    'sys_category',
    [
        'products' => [
            'label' => 'Products',
            'exclude' => false,
            'config' => [
                'type' => 'select',
                'renderType' => 'selectMultipleSideBySide',
                'itemsProcFunc' => 'Aimeos\Aimeos\Flexform\Product->getProducts',
                'size' => 25,
                'maxitems' => 99,
                'minitems' => 0,
                'enableMultiSelectFilterTextfield' => true,
            ],
        ]
    ]
);

You have to implement Aimeos\Aimeos\Flexform\Product like the class for categories and attributes.

TYPO3 doc: https://docs.typo3.org/m/typo3/reference-tca/master/en-us/ColumnsConfig/Type/Select.html?highlight=enablemultiselectfiltertextfield#enablemultiselectfiltertextfield

@s-diez
Copy link
Contributor Author

s-diez commented Jun 17, 2019

I missed adding the Flexform in the commit. The described TCA is implemented in the Flexform.
Aimeos\Aimeos\Flexform\Product is implemented like the classes for categories and attributes.

The problem with products is the amount of available items. The configurable filter enableMultiSelectFilterTextfield is a JS only filter by name of the given items. No PHP is called which would allow me to request a limited number of products from Aimeos based on the input of the user.

@nos3
Copy link

nos3 commented Jun 24, 2019

I've talked to Benjamin Kott yesterday about the problem and there seems to be no way to get the text entered by the user for limiting the result set. So, the TCA configuration is dangerous and should be removed again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants