elgentos / LargeConfigProducts

Large Configurable Products workaround for Magento 2
91 stars 29 forks source link

CatalogPriceRules for CustomerGroups and Prewarm CLI #13

Closed mwr closed 6 years ago

mwr commented 6 years ago

We have experienced an issue where the wrong prices where shown in the frontend for customer-groups other than guest (groupId=0). This pull-request adds the customer-group to the cache-key, which as a result will cache the JSONConfig for each customer-group. Apparently the prewarming is not possible for multiple customergroups. At least I did not get it working in a justifiable amount of time. That's why the customerGroupId ist hard-coded in the Prewarmer. Do you have this Issue as well? Or was this out-of-scope for your projects?

P.S.: I have just realized that I also added a fix to the prewarm cli-command. If there are no product-ids provided, the productCollection would not contain products and therefore not prewarming would be done. In our case we do not have productIds so this came up to. Though the fix is just an if.

BTW: Thanks for sharing this module. It has helped us out with quite some performance issues regarding configurable products :-)

peterjaap commented 6 years ago

Thanks @mwr! Looks great. This was indeed out of scope for our project :)

peterjaap commented 6 years ago

I've tagged this release a minor release (0.2.0) since the already existing cache entries will not be used (the key will never match).