Skip to content

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

Open
cpieroni-macron wants to merge 1 commit intoStrategery-Inc:masterfrom
cpieroni-macron:feature-swatches-quick-buy
Open

forced script text/x-magento-init to get it work#67
cpieroni-macron wants to merge 1 commit intoStrategery-Inc:masterfrom
cpieroni-macron:feature-swatches-quick-buy

Conversation

@cpieroni-macron
Copy link

An easy way to make quick buy work

@gsomoza
Copy link
Contributor

gsomoza commented Nov 5, 2020

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).

@cpieroni-macron
Copy link
Author

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!

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.

2 participants