[DEV] Product Bundle/Clone Stock Control mod'

Modules, Add-ons and custom code that's more than just a quick hack or Mod.
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

[DEV] Product Bundle/Clone Stock Control mod'

Post by Martin »

Initial release information: http://www.interspired.net/forum/viewto ... 2498#p2498


This is something of a hack that I'm looking to do but I thought I'd put it out there in case anyone else with the requisite coding skills was interested in helping work on this and split the workload or smarten it up.

Brief:
  • Want to be able to list a product "set" that comprises 2 or more products that are already listed.
  • Product is listed manually (not compiled from a list as this would take too much work at this stage)
  • Primary aim is to check and update stock levels of the individual products so that there's no need to manually track the inventory for the sets.
Process draft:
  1. Individual products (components of a "set") are already listed individually and use stock control
  2. Store admin creates a product listing for the "set" manually.
  3. Store admin inputs a custom field called "parts" and inputs a comma delimited list of the component products SKU codes (there would be NO sanity checking or selection boxes to make it easier at this point - maybe later?)
  4. Backend code would then:
    • Check inventory/stock level for all components and set stock level to the lowest value
    • Any inventory changes (orders, inventory updates, etc..) would check if SKU was in a "parts" custom field for a "set" product listing and update the inventory for the "set" product
    • Any sales of the "set" product would update the inventory levels for ALL the component product "parts"

Intended use (example):
The primary reason I'm looking at this is that I sell various bulk printer inks for different desktop printers and each of these inks can be used with a number of different printers and even brands of printer. Trying to build sets of these inks and using the inventory system either requires the inks to be packed as sets and committed to a particular printer/brand or a stock control nightmare that constantly needs to be updated whenever a set or individual product is sold.

Using the approach indicated above, allows the stock control to focus on individual inks/products and automates the set stock control so you don't need to worry about it.

This approach (ie: having the "parts" custom field set to another product SKU) would also allow you to setup a "master" product and have other "clone" products where the actual product is the same across multiple product listings, but you want to create separate product listings for SEO/multiple markets... Example of this is an ink which is compatible with 1 Canon cartridge type and 2 HP cartridge types where I'd want to have different listings for each to maximise my SEO and make it easy for customers to select the right product, but without having to keep ALL the "clone" products inventory updated separately.


Looking at the code it should be relatively easy to achieve something like this... Obviously it'd be nice to include something that allowed you to select/remove the component product listings and update the "parts" field or even have a special field altogether but I'm going for functional over idiot proof..


If anyone is interested in helping please post below... Anyone interested in the finished product, just watch this thread, please don't chuck in "me too please" posts... constructive input and actual code contributions only
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: Multi-part product stock control

Post by Martin »

Ok... working through this and something comes to mind regarding the Interspire product framework...

The primary key on product listings is actually not the SKU but the product "title", as a result when it comes to products that have multiple listings and one SKU (ie: are the same product) I could potentially just allow the code to check for duplicate SKU's and update them all with the new value.

I am aware that there's some potential conflict inherent though as:
1. Interspire could decide to make SKU a key value and thus block duplicate SKU's in a later update
2. If different product listings have different stock levels in, the system is going to be picking one value and updating all the rest which could bollix up the inventory tracking for a store owner.


Personally I think it would be a simple enough fix for 2. ie: just let the system log an error in the admin log if it finds multiple values for duplicate SKU's ... The admin can then just update the value for one of the products and it will be standardised across the duplicates.


Just thoughts out loud but if anyone cares to check my logic and/or comment on how this might affect things in ways I hadn't considered that'd be useful.
babyREFLUX
Posts: 337
Joined: Thu Jun 18, 2009 9:38 am

Re: Multi-part product stock control

Post by babyREFLUX »

This is more commonly known as 'bundling' or 'kitting' and is a massive hole in ISC/BC.

Would be interested in helping in any way, maybe testing (not coding sadly).

Currently there is no way of reporting on variations and knowing exactly how many you have sold in a time period - could this be part of this project or is it very different?
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: Multi-part product stock control

Post by Martin »

babyREFLUX wrote:This is more commonly known as 'bundling' or 'kitting' and is a massive hole in ISC/BC.
Agreed... As I've gotten into it I've realised it can also provide a means of keeping multiple product listings (where they are listed under different product names but are the same piece of kit) stock levels updated so I've already been building that into the code. Useful if you want to do a sort of split test on which product listing works better.
Would be interested in helping in any way, maybe testing (not coding sadly).
Testing is going to be needed as the logic in this sometimes has my head spinning.
Currently there is no way of reporting on variations and knowing exactly how many you have sold in a time period - could this be part of this project or is it very different?
I've no intention of taking this into a GUI style interface simply because it requires way too much time for me as I'm not even 50% up to speed on JQuery, etc... However if someone (with the appropriate level of experience and and understanding of how the reporting system works in ISC) wants to take that part on then I'm game..


Also, for the record, I'm realising that this is a commercial grade modification even if it's just at bare/minimal-GUI level so if someone does want to come in on it then I'm happy to do a split on proceeds. Steve/NoVista/etc... I'm thinking primarily of you folks...
babyREFLUX
Posts: 337
Joined: Thu Jun 18, 2009 9:38 am

Re: Multi-part product stock control

Post by babyREFLUX »

If I can put a product together - comprising of one or more other products or variations - when product sold it deletes the appropriate stock from the inventory (product or variation) - will buy :)
Tony Barnes
Posts: 744
Joined: Thu Jun 18, 2009 8:59 am

Re: Multi-part product stock control

Post by Tony Barnes »

All the best with this mate, going to be a real head *flip* to get working right
babyREFLUX
Posts: 337
Joined: Thu Jun 18, 2009 9:38 am

Re: Multi-part product stock control

Post by babyREFLUX »

Tony Barnes wrote:All the best with this mate, going to be a real head *flip* to get working right
If possible at all!!
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: Multi-part product stock control

Post by Martin »

Tony Barnes wrote:All the best with this mate, going to be a real head *flip* to get working right
In truth, the backend logic is a piece of p*ss once you've gone through 90% of the framework, what if's, etc... but what I really lack is some means of selecting/deselecting component products via a GUI and indicating quantities of each component...

You then have the joys of what if you then change the SKU of a variation or product... Should be easy enough to figure out once you know where to put the hooks... but yeah, it's the "what if an idiot does this?" that will screw it all up.


@Jon: It'll work... Wouldn't even have started the frigging thing if it wouldn't... :)
babyREFLUX
Posts: 337
Joined: Thu Jun 18, 2009 9:38 am

Re: Multi-part product stock control

Post by babyREFLUX »

Martin wrote:@Jon: It'll work... Wouldn't even have started the frigging thing if it wouldn't... :)
I hope you are right Martin ;)

I remember when they rushed to get variations included in the code...yes they were that shit back then they didn't build the core code with variants available!

Since then they haven't been able to do anything with variations except make shitty excuses...
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: Multi-part product stock control

Post by Martin »

Ah well... the good news in all of this is that the code for updating inventory actually handles BOTH variations and single products depending on the values it's fed. That little bit of sanity is the reason I can write my own custom functions to handle the update and then tackle the whole thing...
Post Reply