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

Issue when using group_multicategory #13

Open
paulskinnerlibris opened this issue Jun 11, 2020 · 0 comments
Open

Issue when using group_multicategory #13

paulskinnerlibris opened this issue Jun 11, 2020 · 0 comments

Comments

@paulskinnerlibris
Copy link
Contributor

When setting group_multicategory to true, there is an issue with the catalogue_id field that is created in the SalesLayer-Updater.php file of the SDK. The field is created as an int() field, when the grouping uses commas to delimit the field (e.g. 126,23,48,1)

I have made a temporary fix for this myself by replacing line 1726 with this:

if ($table === 'products' && $db_field === '___catalogue_id' && $this->__group_multicategory === true) { $type = 'varchar(191)'; } else { $type = $this->__get_database_type_schema($info['type']); }

And adding 'varchar(191)' =>'' to the array at line 71.

Obviously, this isn't ideal because users can set the name of the products field in the connector in SalesLayer (so can be different from what I've hard-coded). Also, I've set it as a varchar(191) as I think making it a text field instead is overkill. Using (191) in the array at line 71 isn't ideal either.

Could you please update the SalesLayer-Updater.php file with a (better) change for this, please?

Thanks.

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

No branches or pull requests

1 participant