Page 1 of 1

[DEV] Variations by Pagination

Posted: Sat Aug 29, 2009 2:32 pm
by Martin
This is something I'm throwing out there while I still remember what I've found.

The big problem with product variations is not that they don't display for the consumer but that they don't display properly for the admin trying to build a large array of combinations. The symptom of this is a memory overrun error which is caused by the huge amount of code generated when the admin system tries to display all those options under the Variations tab when adding/editing a product.

The solution is disgustingly simple but does require a bit more thought when it comes to the coding to make it possible.

Pagination

What's required is a way to force the product/variations page to only show a maximum of X variations at any one time...

Now, I've figured out where in the code it loops through all the variation combinations so it should be possible but I'm not entirely sure how the code could pass the current "page" of variations it's on so if someone else wants to jump in here and help out that'd be appreciated.

The key line is:

Code: Select all

				foreach($GLOBALS["variation_combinations"] as $k=>$combo) {
.. which can be found in the /admin/includes/classes/class.product.php (roughly line 6719)


I really don't have the time to hack this together myself but I would certainly be willing to work with someone else who wants to fix this rather annoying "bug" and make it work for us.

Before you ask, I've given up on the idea of trying to sell these modifications because, frankly everyone expects Interspire to do it and they aren't so they aren't in a paying mood. Can't say I blame them but the thing is we can at least get a working variations system so if kudos is payment enough... jump in :)

Re: [DEV] Variations by Pagination

Posted: Sat Aug 29, 2009 2:57 pm
by novista
For what it is worth, Ray at Interspire told me that they are in the process of re-writing the variation system. I would guess this is a V5.5 or V6.0 release. When this happens, I truly hope that there is a utility converts the current variation system to the new one.

As for modules, you are right. Interspire will get around to incorporating the good mods into the system. Putting a lot of effort into a mod that everyone expects to get for free in the forum or cost $25 is not really worth it. In the mean time, they have Joshua Walcher creating modules as JoshMods.com. My guess is they looked to him to add temporary functionality.

Re: [DEV] Variations by Pagination

Posted: Sat Aug 29, 2009 3:25 pm
by Martin
novista wrote:For what it is worth, Ray at Interspire told me that they are in the process of re-writing the variation system. I would guess this is a V5.5 or V6.0 release. When this happens, I truly hope that there is a utility converts the current variation system to the new one.
Yeah... Understood... Unfortunately in most instance that will most likely not turn up until next year or worse as another paid for upgrade which I don't think anyone is going to stand for.

The suggestion above is really just a hack until they can get it up and rewritten, plus it would have the added benefit of being easy for them to incorporate until they've done the re-code without breaking the core functionality. :)
As for modules, you are right. Interspire will get around to incorporating the good mods into the system. Putting a lot of effort into a mod that everyone expects to get for free in the forum or cost $25 is not really worth it.
Yep... I've recouped enough money to pay myself around 50p an hour for the time spent on module development (forget the support/fixes stuff) so it's been a real loss leader. Such is life.

Anyhoo... Suggestions welcome on making that stuff above work... Need to think how to pass the variable successfully so I can paginate.

Re: [DEV] Variations by Pagination

Posted: Fri Nov 06, 2009 11:31 pm
by joshmods
Just wanted to correct your perception of Joshmods.com. I'm not an employee of Interspire, just a contractor that has a contract with them to provide support services. So no, my mods have no Interspire backing of any kind. It's just me making addons to the software that I find useful.