Is it possible to change the select list to an autocomplete field or other form filtered list? On a large catalog with a lot of SKU's, the select list takes a long time to build then the large number additional lines of code that is created for each item in the list can bring the browser to a crawl and even make it unresponsive.

Comments

adamo’s picture

I second this request. Autocomplete field would be ideal.

torgospizza’s picture

Yup, I'm in full agreement. I'll work on a patch this week. Only thing that may be tricky is making multiple fields, since AFAIK you can only have one node per field.

torgospizza’s picture

Title: Select List » Make select list a nodereference field
Version: 6.x-1.x-dev » 6.x-2.0

Going to move this into the queue for 2.0.

adamo’s picture

Would this be a CCK nodereference field? I'm using autocomplete CCK nodereference fields for other things and you can have an unlimited number of values. You just click the Add button and an new autocomplete field appears. Maybe you can save yourself some time by just adding support for CCK nodereference fields. CCK is moving into core in D7 so this might be the best route long term.

torgospizza’s picture

I am in love with that idea. However I'm not sure I want to make it a dependency just yet? Perhaps if it detects the CCK nodereference it'll utilize it, otherwise default to the select list. That way you can decide based on your # of products which way is best? Thoughts?

adamo’s picture

Yeah either that or make using a CCK field an option and only have the option appear if CCK is available. Then you could just remove the option and move to core fields in the D7 version. Using a CCK nodereference field users will be able to choose from any of the CCK nodereference widgets, so they could use a select list or autocomplete or create their own widget as needed. Plus Views support would be built in. Would be really sweet. :)

torgospizza’s picture

Yeah sounds like a great idea. I'll definitely include this in my 2.x TODO list.

franklca’s picture

Thanks for looking into this! As a large retailer, the upsell is a crucial part of business model. After switching to Drupal/Ubercart we are currently operating without the upsell feature and really need to get it back up. If the CCK nodereference will work then that would be perfect. I am still very green with Drupal/Ubercart and even PHP and not sure to how to fix it myself at this time. It seems to me that a comma separated autocomplete field like used in Taxonomy would be suitable. Either way, I would be happy to kick in some bounty to help push it along ;)

torgospizza’s picture

Bounties are always appreciated :) I can look at this sometime this week. Sorry to keep you held up - I started to look into it and it's kind of a daunting task, but I'll get it :)

torgospizza’s picture

Assigned: Unassigned » torgospizza
Category: support » feature
franklca’s picture

I would even be happy with a simple text area field to enter a comma delimited list SKU's, is that something we could easily do? The built in functionality of the autocomplete forms seemed fairly natural to the Drupal environment but it is really not necessary. We simply need another method of entering the SKU's that need to be associated with each product. The rest of the module seems to be phenomenal but we cant even enable it on this site or else we cannot edit any product nodes because of the size of the select list.

torgospizza’s picture

No, that makes perfect sense. At the very least I can write you a patch that you can roll on your own server (if you're comfortable doing that).

I should really be working on a 2.x-dev version anyway. This will give me some motivation to do so :)

torgospizza’s picture

I almost have this working with a core autocomplete textfield, no CCK required. Need to change how I implement the "remove" functionality, but overall I think this will work pretty well. Should have a patch ready soon.

torgospizza’s picture

This is taking longer than expected... and I don't have a ton of free time to work on it. But I am nearly finished, I just need to rework the code a bit to make it less of an upgrade. It's still going to have to be part of 2.x, and probably won't make it into a backport, simply because it pretty much completely reworks the way the associations are made.

On that front there are a couple bugs I need to iron out but I hope to have something to post later this week. (As always, bounties are never a poor motivator.) :)

franklca’s picture

Rolling it into 2.x is probably the best idea. How does one go about paying a bounty?

Rainman’s picture

Well we certainly should give tP his due, a great module with a great maintainer! :)

From the README:

This module is maintained solely by me. If you'd like to help contribute directly to further development,
you can donate via PayPal at the below link:

https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3939947

As always, patches, code snippets, use cases and overall feedback are hugely appreciated.

franklca’s picture

Nevermind, I found the Paypal link in the readme.txt file :)

torgospizza’s picture

Hey Rainman, thanks :)

@franklca: I appreciate the bounties, no matter what the amount. I know money is really tight for all of us these days, which is why I don't ever ask for it up front. And besides, I just love working on this stuff!

Anyway, I think you will all love the AJAX autocomplete stuff. To be honest, I wish I had done it like this from the beginning! (The "remove" button was giving me some trouble but I figured out a workaround.. not exactly the most beautiful code I've ever written, but I'll clean it up before I roll it into 2.x.)

volocuga’s picture

Any progress in this? Just a question :)

torgospizza’s picture

Still being worked on locally. Got sidetracked with another project, but bounties will help sway me back into the Upsell direction :)

franklca’s picture

Any progress made on this recently? Some bounty money has been posted months ago to encourage its completion.

torgospizza’s picture

It's like... 90% there. There are some issues when it comes to the Ajax stuff and forms... but what I have is working pretty well, for the most part. I ended up getting sidetracked with another gig that stole away most of my time, but the bounty money has definitely been used. Thanks! :)

I should be able to post something very soon.

Alex Lawrence’s picture

Don´t want to bother you but do you think you will be finished soon? We are using your the Upsell module (which is great by the way) and the site should go live in a few weeks. The customer has about 500 products and this feature would with be very helpful.

franklca’s picture

Any new progress on this project?

torgospizza’s picture

Hi,

Unfortunately I've got too much going on right now to look into this again. I had started it locally on my dev site, but some of the issues I was facing didn't have clear-cut solutions. I'd be willing to take a patch at this point, and it's something I still want to add into the module, it's just going to take a bit more time. Sorry!

Feel free to submit a patch if it's something you're able to do.