Building variants from a list of options and values

  • (2 Pages)
  • +
  • 1
  • 2

24 Replies - 860 Views - Last Post: 18 September 2013 - 10:46 PM Rate Topic: -----

#16 wzeller  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 78
  • Joined: 09-April 06

Re: Building variants from a list of options and values

Posted 10 September 2013 - 11:33 PM

View PostAtspulgs, on 10 September 2013 - 07:15 PM, said:

That is an idea though, you could simply go row by row and generate the output, store it and repeat.

That's an excellent point. Going one product at a time would certainly simplify it. I'm still not sure how to approach it, though. I'm really excited to have found somebody interested in solving it. So thank you!
Was This Post Helpful? 0
  • +
  • -

#17 wzeller  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 78
  • Joined: 09-April 06

Re: Building variants from a list of options and values

Posted 13 September 2013 - 09:59 AM

Just a bump to see if anybody has had any breakthrough thoughts on this.

Fortunately our first Zen Cart customer has a small enough dataset that I may take the time to create the variant data manually just to buy time for a more permanent solution. I didn't want to waste time on that, though, and then see a solution posted an hour later. So I thought I'd ask.

The time pressure I'm beginning to get on this is totally irrelevant here since I'm getting free help from awesome people who owe me nothing, but I'm pretty much at the point of needing to either solve the problem or go around it, and going around it is definitely not workable in the long term even if it buys me a few days in the short term. So my fingers are crossed, awesome people! ;)

(In other news, my posts to this thread seem to disappear on me occasionally. If this is a repeat post and I've already said the above, please ignore the double. Not sure why it happens.)
Was This Post Helpful? 0
  • +
  • -

#18 Atspulgs  Icon User is offline

  • D.I.C Regular

Reputation: 68
  • View blog
  • Posts: 380
  • Joined: 29-July 09

Re: Building variants from a list of options and values

Posted 13 September 2013 - 11:37 PM

Yeah, Sorry.
I havent been able to figure this out. I know its doable, but it hasnt hit me yet. I can do it if i know exactly how many options I got, but once its dynamic, its screwing me up.
Was This Post Helpful? 0
  • +
  • -

#19 wzeller  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 78
  • Joined: 09-April 06

Re: Building variants from a list of options and values

Posted 14 September 2013 - 05:49 PM

I know how you feel. When I first tackled this it looked like a simple challenge. It quickly got confusing.

I'm really hoping somebody can help, though.

This post has been edited by wzeller: 14 September 2013 - 05:51 PM

Was This Post Helpful? 0
  • +
  • -

#20 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3572
  • View blog
  • Posts: 10,414
  • Joined: 08-June 10

Re: Building variants from a list of options and values

Posted 15 September 2013 - 11:28 AM

View Postwzeller, on 10 September 2013 - 09:01 PM, said:

So, for the purposes of this post, I guess it would be more accurate to say I want to turn it into:

$optionstr[]= "Ford spoiler Type A stereo Phillips";
$optionstr[]= "Ford spoiler Type A stereo Bose";
$optionstr[]= "Ford spoiler Type A stereo Blaupunkt";
$optionstr[]= "Ford spoiler Type B stereo Phillips";
$optionstr[]= "Ford spoiler Type B stereo Bose";
$optionstr[]= "Ford spoiler Type B stereo Blaupunkt";

I wouldn’t recommend to create such an array. the numbers easily get out of hand. say you have 4 options—3 spoilers, 5 stereos, 7 rims and 14 colours—you get 3·5·7·14=1,470 combinations (and even without the colours it would still be 105). I doubt anyone is willing to look through such a list. if I had to choose a combination, I’d use a dropdown for each option.
Was This Post Helpful? 0
  • +
  • -

#21 wzeller  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 78
  • Joined: 09-April 06

Re: Building variants from a list of options and values

Posted 16 September 2013 - 12:01 AM

I agree with the sentiment - nobody would want to look through the list. But nobody will.

A customer chooses a product and has pulldown menus for, say, color and size and style. If there are 5 sizes, 10 colors, and 4 styles, that's 200 variants for that product alone. Nobody will ever see a list of the variants though - they'll choose their options individually with pulldowns.

After they do that, though, the system has to know what part number to put on a picklist so that a guy in the warehouse can go to the right bin and pull out part number 6675DF3 which happens to be a small blue button-down.

My warehouse system needs a unique part number for every product. Zen Cart assumes families of similar products with various options all use the same part number. So I have to build the intermediary translator. It will generate a table of all variants, and somebody (me) will go in and assign a part number to each and enter the part numbers and descriptions into our warehouse system. It will periodically look for newly-added or modified variants and alert me to go assign part numbers to them.
Was This Post Helpful? 0
  • +
  • -

#22 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3572
  • View blog
  • Posts: 10,414
  • Joined: 08-June 10

Re: Building variants from a list of options and values

Posted 16 September 2013 - 12:40 AM

View Postwzeller, on 16 September 2013 - 09:01 AM, said:

It will periodically look for newly-added or modified variants and alert me to go assign part numbers to them.

you will have to do that each time the DB is modified (think of it as a NF violation). isn’t there a possibility to generate the combined-product IDs automatically?
Was This Post Helpful? 0
  • +
  • -

#23 wzeller  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 78
  • Joined: 09-April 06

Re: Building variants from a list of options and values

Posted 16 September 2013 - 01:49 PM

Actually, I'll only need to do it when trucks arrive at my warehouse carrying products we don't already have on our shelves.

But assigning part numbers automatically and notifying our warehouse to add them to the system there would actually be a simple matter, once I have the variant list. That's a process further down the list of things I need to do. Before I can get to that, though, I have to find a way to generate the variant list.

The problem in this thread is the first step in a long project, but fortunately the only one I can't figure out how to address. So far, it's a brick wall in my otherwise clear path.
Was This Post Helpful? 0
  • +
  • -

#24 wzeller  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 78
  • Joined: 09-April 06

Re: Building variants from a list of options and values

Posted 18 September 2013 - 07:58 AM

If this is against forum rules, I apologize and invite a moderator to delete this post, but hopefully it's okay because I'm getting desperate:

My company will happily pay somebody who can solve this for us. If interested, please contact me via PM for further details because if we're paying for it we want to ensure that it will be workable without much extra massaging. Just addressing this specific spot would be worth about $40-$60, depending on how complete the solution is. If you want, though, I can provide you with the requirement of the complete script I need to write or have written (of which this is by far the hardest part) and we'd pay around $200 for the whole kaboodle. (It's actually pretty simple once this part is done and I offer the extra not because it's a huge challenge, but because I think $200 might get a coder that might not be interested in a $50 job.)

Thanks,
w
Was This Post Helpful? 0
  • +
  • -

#25 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3572
  • View blog
  • Posts: 10,414
  • Joined: 08-June 10

Re: Building variants from a list of options and values

Posted 18 September 2013 - 10:46 PM

View Postwzeller, on 18 September 2013 - 04:58 PM, said:

If this is against forum rules, I apologize and invite a moderator to delete this post, but hopefully it's okay because I'm getting desperate:

post the offer in the Post a Job forum. it certainly gets more attention there than here.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2