Jump to content

Custom controller to optimize the loading of the product detail when it contains a lot of combinations


giovanni.four

Recommended Posts

Hi Dear,

I would like to share with you a problem related to products with many combinations where the attributes are connected (the value of one attribute affects that of the other). I solved the insertion of the combinations on the BO side with a bulk insert addon but I am still trying to solve the problem of the slowness on the FRONT side (very high TTFB).
There is a module called AWP 2.0 that allows you to reduce the total number of combinations but only if the attributes can be considered SEPARATED. This structure requires far fewer total combinations. But it also allows for each attribute from each group to be selected on the front end of your site (not my case).
The front/ProductController.php loads all combinations and this produces an incredible slowness in loading the front page.
I'd like to continue using PS's default data model but load the page differently.

Rather than loading all the combinations into the template and looping with PHP inside arrays with thousands of elements, we could think of something more streamlined or load the attribute values step by step (load the values of an attribute only when it has been loaded the previous one).
I have not found anything among the addons of the marketplace. What do you think about it? What could be the easiest way to solve this problem? Among the experimental features of PS there are improvements on the BO side for the management of products with many combinations but nothing regarding the FO.
Thanks.
Greetings.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...