Post by celestial » Thu Jan 26, 2012 1:45 am

http://www.appelsiini.net/2010/jquery-chained-selects

<script type="text/javascript">
$("#option-A").chained("#option-C");
$("#option-D").chained("#option-A");
</script>

and so...

Celestial - Martín Abel Rosales
WhatsApp: 50671482211
Email: martinrosales2012@hotmail.com
Skype: martin.abel.rosales
San José , Costa Rica


User avatar
Expert Member

Posts

Joined
Sat Mar 20, 2010 4:19 am
Location - Costa Rica

Post by rph » Thu Jan 26, 2012 1:37 pm

The mod I'm working on is actually based on jQuery chained selects using product_option_id and product_option_value_id.

I've received a lot of messages from people interested in the project so I figured I'd throw up a screenshot of progress on the Admin side.

Attachments

dependent_options2.jpg

dependent_options2.jpg (80.81 KiB) Viewed 5390 times


-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by Qphoria » Thu Jan 26, 2012 10:53 pm

ah great.. I really would like to see this working (so people stop asking for it :P). My attempts and trying to make sense of it always started with the parent option id (similar to the category table) but I could never get all the pieces to make sense to me. This will be huge rph.. you can get rich from this mod.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by dogsndubs » Fri Jan 27, 2012 3:12 am

blackhalo wrote:
To be devils advocate, here's an example...

I have 200 products that have 5 different shirt 'Styles' (Mens, Womens, LongSleeve, Tanktop, Babydoll, etc)... each of those styles has a different combination of 'Sizes' available (XS, S, M, L, XL, 2XL, 3XL, etc)...
and each has a different combination of 'Colors' for each style (huge list).

The reality of hand-picking each option, for each of the 200 products... is like 200,000+ mouse-clicks (we're talking months of work!)... that's just as bad as Magento's method... creating a new product for each option, then linking the 200,000 products.
This is my situation exactly.

Ideally, I would need to be able to set up 'sets' of options and then with one click of the mouse be able to add the relevant set of options to a product (or a number of products).

Newbie

Posts

Joined
Wed Jan 25, 2012 10:23 am

Post by dogsndubs » Fri Jan 27, 2012 3:32 pm

I'm not being pessimistic or a defeatist here but If creating sets can't be done for whatever reason. Will it be possible to create several different 'template' products which have all the dependant option combinations that you need.

Then, if possible, clone/duplicate the template product with the correct options onto a new product?

Newbie

Posts

Joined
Wed Jan 25, 2012 10:23 am

Post by rph » Fri Jan 27, 2012 4:09 pm

blackhalo wrote:The reality of hand-picking each option, for each of the 200 products... is like 200,000+ mouse-clicks (we're talking months of work!)... that's just as bad as Magento's method... creating a new product for each option, then linking the 200,000 products.
Yeah, I definitely appreciate the amount of grunt work that involves but that is the framework OpenCart uses. I'm just working within it.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by rph » Sun Jan 29, 2012 4:15 am

That's really creating two different mods, conditional options and bulk product option creation with conditional options. I wouldn't rule it out as a possible future project but generally speaking I stay away from making mods that are substantially similar to those already on the market.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by Qphoria » Sun Jan 29, 2012 6:07 am

Bulk copy is simple and has no bearing on this topic. Options Boost has bulk option copy, jcsmithy has bulk option copy, its a simple FOR loop copying any number of values. Don't let that detract from the actual conditional option piece.. bulk copy can be added after conditional options is working.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by rph » Tue Jan 31, 2012 3:42 am

I figured I'd ask for some feedback on this as a number of people are following development. Right now the conditional options mod works by having a child option (such as Color) "chained" to a parent option (such as Size). When they're chained the parent option values you choose (Medium, Large, etc.) directly effect which child option values (Black, Red, etc.) are shown.

I think this method will work fine for most people but there are instances where it will come up short. For example, if you have four large tshirts:

Women's large black
Women's large pink

Men's large white
Men's large black

When color is chained to size black, white, and pink will always be displayed when large is selected regardless of whether it's a women's or men's style tshirt. Luckily chained selects allows you to designate two parent options for a child which would solve the problem. Color would have both Style and Size as parent options then you could set black to be displayed when large is chosen, white to display when men's/large is chosen, and pink to display when women's/large is chosen.

It seems like a no-brainer feature to add but the problem is I can't seem to come up with a decent admin user interface for this to save my life. They always turn into a big, convoluted mess. I looked at a Magento implementation of dependent option but that's less advanced than what I already have.

So is this a feature that's worth taking the time to get done or is the current one-parent option setup going to work for most people?

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by rph » Tue Jan 31, 2012 1:08 pm

blackhalo wrote:That's a little hard to visualize without some hands-on... but honestly, it starts to make the case for entirely removing the option for 'granular' editing... that's the part that really brings dread into the picture, it's so involved to setup each option one-at-a-time.
That's just the way OpenCart works (it looks like Magento works almost the same way too). It's more work but it's also much more power.
The chaining should be as simple as pie... only allow chaining on a Group level, not an Option level... force the user to create Option "Groups" based on the Chains they need... then just use a simple dropdown menu for the linking structure in the admin (as shown on the jquery page: http://www.appelsiini.net/2010/jquery-chained-selects).
Chained Selects work on the option value level, not the option level. The options (size, color) are always there, it's just the option values in them (medium, large, black, white) that are hidden or shown accordingly.
So if I set "Mens Style" (Group) to parent "Mens Size" (Group) and that parents "Mens Colors" (Group)... all you need is three dropdown menus to setup those relationships... for Womens, you allow the creation of a second row of dropdown menus... rinse/repeat, but with "Womens Style" (Group) parenting "Womens Size" (Group), etc, etc.
I believe there would be required option issues with this. Also you're missing that this still have to map to option values (at some point you have to pick Men's Style or Women's Style).

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by rph » Sun Feb 05, 2012 1:39 pm

blackhalo wrote:Meh, that gets kinda complicated...
I really just wish options were built in a staging area (then applied afterwards),
that would simplify things sooooo much.
Then you'd lose finite control over things like quantity and option price.
The very first Option Level MUST be granular...
but then everything after that could be chosen on the Parent level...
almost like an automatic "Select All" button when you choose the next option.
I think you've got the same amount of work there, just in a different way. You're either mapping all your options out to option values or you're putting all your options in option groups then mapping those groups to option values.

After thinking about it I'm going to dump the multi-parent idea. For those that need it the same thing can be achieved with multiple option values. If you need to be able to split options at large, for instance, you create two of them. You can call them Men's Large or Women's Large or I might have the option value id displayed like:
conditional_ovid.png

conditional_ovid.png (3.69 KiB) Viewed 5454 times

or possibly add an alias option for display in Admin like:
conditional_alias.png

conditional_alias.png (3.93 KiB) Viewed 5454 times


-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by rph » Mon Feb 06, 2012 9:21 am

Lots of progress this weekend. I'm at the point where nothing is going to be changed now. The only programming left is product form validation. Then it's a few rounds of bug testing, creating the VQMod script, writing documentation, and publishing. After that I'll start working on an advanced version for setting conditional options en masse.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by natsuto » Tue Feb 07, 2012 1:44 pm

For the product you set one option as a "parent" then specify which of the parent option values ​​need to be selected in order for the child option value to appear.

Kindle Accessories


Newbie

Posts

Joined
Tue Feb 07, 2012 8:22 am

Post by rph » Tue Feb 07, 2012 5:01 pm

That's correct. Admin development is at a suitable place for people to check it out.

http://options-demo.opencarthelp.com/admin/

user: demo
password: demo

And of course the front-end is still in action at:

http://options-demo.opencarthelp.com

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by ensemble » Tue Feb 07, 2012 11:58 pm

This looks great. I'm ready to buy ;)

Will this work with Price Update (would be almost essential for me)? And will it be possible to hide the option prices in the dropdowns (i.e. I don't want any prices to display next to each option)?

Can't wait for this release! ;D

New member

Posts

Joined
Wed Oct 19, 2011 2:20 am

Post by Qphoria » Wed Feb 08, 2012 1:53 am

nice work rph..

just curious..what happens if you set the parents cross dependent on eachother on accident?

Like
Med parent is Color Red
and
Red parent is Size Med

I'd guess both select boxes would just start unpopulated and you'd go nowhere until you fix it. No biggie..

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by scomth » Thu Feb 09, 2012 1:53 am

Is it possible to have say only 1 box up with a yes or no option? If yes is selected it opens another option etc and if No is selected or defaulted then no other options become available?

Newbie

Posts

Joined
Wed Oct 19, 2011 10:22 pm

Post by elbobiam » Thu Feb 09, 2012 4:46 am

nice work rph...

As with most of the others, I've been looking for this solution for one of my clients. I know that you've posted you should be finished in Feb, but any ideas which end so I can massage my clients expectations of the delivery date.

Have you any idea of what you plan to sell this for?

Also, have you do any testing with 'Options Boost' module?

If you need some testing done, I'd be happy to help ;)

Keep up the good work.

Opencart Version 1.5.1.3

Newbie

Posts

Joined
Thu Feb 09, 2012 4:35 am

Post by rph » Thu Feb 09, 2012 8:30 am

Qphoria wrote:nice work rph..

just curious..what happens if you set the parents cross dependent on eachother on accident?
Product form validation will catch it.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by rph » Thu Feb 09, 2012 8:34 am

scomth wrote:Is it possible to have say only 1 box up with a yes or no option? If yes is selected it opens another option etc and if No is selected or defaulted then no other options become available?
All options will show all the time. What you can do is put the option values that would occur for yes and no into the same option and have them display depending on whether yes or no is selected.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska
Who is online

Users browsing this forum: Majestic-12 [Bot], paulfeakins and 34 guests