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

Pull previously set sort order of category products when onboarding solution #3464

Open
mamsincl opened this issue Dec 9, 2024 · 0 comments
Assignees
Labels

Comments

@mamsincl
Copy link

mamsincl commented Dec 9, 2024

Is your feature request related to a problem? Please describe.
One of our clients set the product sort order for a category with core solution. After Elasticsuite was onboarded, the previously set product order was not applied to the given category.

Describe the solution you'd like
Data patch to automatically convert the previous positioning to be reflected on category pages after Elasticsuite is onboarded

Describe alternatives you've considered
Magento CLI to pull through previously set sort order of product for a given category (with confirmation question)
eg

php bin/magento elasticsuite:category-position:migrate --category [id]

Additional context
issue resolved for the category by running

INSERT INTO `smile_virtualcategory_catalog_category_product_position` (`category_id`, `product_id`, `store_id`, `position`) 
    SELECT `category_id`, `product_id`, 0 AS `store_id`, `position` + 1 AS `position` 
        FROM `catalog_category_product` 
        WHERE `category_id` = 1095 
        ORDER BY `position` ASC; 
@mamsincl mamsincl changed the title Pull previously set sort order of category product when onboarding solution Pull previously set sort order of category products when onboarding solution Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants