[DEV] Variations by Pagination

Mod, Add-on & other Development discussion
Post Reply
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

[DEV] Variations by Pagination

Post 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 :)

novista
Confirmed
Confirmed
Posts: 89
Joined: Fri Jul 03, 2009 11:22 pm

Re: [DEV] Variations by Pagination

Post 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.
Michael Kopel
NovistaWeb.com

Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: [DEV] Variations by Pagination

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

joshmods
Posts: 2
Joined: Fri Nov 06, 2009 11:27 pm

Re: [DEV] Variations by Pagination

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

Post Reply