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

Category position problem #8

Closed
LCIJJ opened this issue Jan 9, 2017 · 14 comments
Closed

Category position problem #8

LCIJJ opened this issue Jan 9, 2017 · 14 comments

Comments

@LCIJJ
Copy link

LCIJJ commented Jan 9, 2017

After installing, product position and sort by functionality on category and search view stopped working. We are using Magento 2.1.3

@jissereitsma
Copy link
Collaborator

Thanks for posting. This will be noted. However, without some developer diving into the same issue and providing all relevant clues, I'm not sure if somebody will be able to help here.

@grantkemp
Copy link

grantkemp commented Jan 25, 2017

Can you add in the module via Vanilla instance that you can share so we know its not related to your custom code?

Maybe host one on magecloud?

Then we can help debug it easily

@pascaladriaansen
Copy link

pascaladriaansen commented Feb 10, 2017

I'm having the same issue. I did some digging and found out that when

$collection = $productListBlock->getLoadedProductCollection();

gets called at /Block/Category.php#L31, for some reason this causes the product collection to become unsorted again, as the sorting is not done in getLoadedProductCollection() but the _beforeToHtml() method in magento/module-catalog/Block/Product/ListProduct.php. This guy is better at explaining it than me.

@jissereitsma @grantkemp I don't know how to fix it, but I'm hoping this is a push in the right direction for you to fix it?

@grantkemp
Copy link

Good shout - If someone can build it in an environment that is accessible- I can have a look.

@mgeoffray
Copy link

@jissereitsma,
we are facing the same issue on Magento 2.1.4
Do you need some screenshots or other informations ?

@jissereitsma
Copy link
Collaborator

@mgeoffray No, screenshots are not needed. Somebody needs to invest time to replicate this issue in a development environment and dive into the code to fix it. Unfortunately upcoming weeks I have little time for this, so I can't volunteer on a short term. Please note also I have no running projects that are in need of this fix, so it would all be voluntary.

@grantkemp
Copy link

Hi Guys- I am stacked as well - so I don't have time to work on it. When we do our next M2 - I will see if we can have a go and try replicate it.

@tdgroot
Copy link
Contributor

tdgroot commented Apr 25, 2017

Certainly not a fix, but if you move the script block from after.body.start to before.body.end, the collection doesn't lose it's sorting.

@jissereitsma
Copy link
Collaborator

Thanks for the update, it might be a quick indeed. With the M1 extension, we had similar issues, but fixed this by using a completely different approach. I hope to find time soon to work on a similar solution in this M2 version.

@koenner01
Copy link
Contributor

As I mentioned in #20, everything dynamic should not be placed in a static layout block. This will cause issues with caching and the FPC in general

@jissereitsma
Copy link
Collaborator

Understood. As mentioned in the M1 extension, there was the same issue and a new architecture is used to bypass any FPC issues. However, in M2 extension, this voluntary task is still open. Unfortunately, I lack the time (and project necessity) to dive into this on a short term.

@tdgroot
Copy link
Contributor

tdgroot commented Jun 16, 2017

In addition to what @jissereitsma said, the dataLayer should be sent by a javascript component. In that javascript component the user specific data can be configured.

Now the question is, who will take the time to pickup this task? :)

@tdgroot
Copy link
Contributor

tdgroot commented Jun 16, 2017

Fast-forward a few hours

I've picked up the task myself!

@jissereitsma
Copy link
Collaborator

Closing due to inactivity

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

7 participants