Magento2-InfiniteScroll icon indicating copy to clipboard operation
Magento2-InfiniteScroll copied to clipboard

forced script text/x-magento-init to get it work

Open cpieroni-macron opened this issue 5 years ago • 2 comments

An easy way to make quick buy work

cpieroni-macron avatar Oct 21 '20 10:10 cpieroni-macron

Thanks for the contribiution @cpieroni-macron . I realize this must have taken you a lot of work, so I appreciate that. However, initially, I think this solution would probably find a better home as an independent plugin / fork, that people can install alongside our plugin if they find that it works for them. E.g. cpieroni/magento2-infinitescroll-swatches. Would you consider publishing it like that?

The reason is that the problem you're trying to tackle is very theme-dependent. I can already tell that if we merge this, we're going to get flooded with support requests from people who expect swatches to work out of the box for them.

Another alternative would be to find a solution that addresses the problem using a more robust approach, ideally one that doesn't require overwriting a core template (assuming that's even possible).

gsomoza avatar Nov 05 '20 13:11 gsomoza

I agree with you. Maybe you can leave this Pull Request open to make it known to the people who need and can use it.

The solution to the problem you say is in this piece of code: <!-- @todo: Is possibile to add another block instead of rewrite? --> <referenceBlock name="category.product.type.details.renderers"> <block class="Magento\Swatches\Block\Product\Renderer\Listing\Configurable" name="category.product.type.details.renderers.configurable" as="configurable" template="Strategery_Infinitescroll::product/listing/renderer.phtml" ifconfig="catalog/frontend/show_swatches_in_product_list"> <arguments> <argument name="configurable_view_model" xsi:type="object">Magento\Swatches\ViewModel\Product\Renderer\Configurable</argument> </arguments> </block> </referenceBlock>

If you were able to add an additional block instead of overwriting the Swatch Renderer template, the solution would no longer be theme-dependent.

At this moment I have absolutely no way of working on it unfortunately. We hope someone else contributes!

cpieroni-macron avatar Nov 05 '20 13:11 cpieroni-macron