I would like to turn off the SKU auto complete in order to input a long list of SKU's instead of applying them one at a time.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Infinitee’s picture

FileSize
23.63 KB

It seams that the SKU form-text form-autocomplete maxlength limit is impacting the field input. I changed the maxlength with firebug and was able to get my long list of sku's in but got this error.

"SKUs cannot be longer than 128 characters but is currently 7248 characters long."

See attached image: sku-limit.png

It appears that the only way to add large quantities of SKU's is to create multiple Product discount conditions with each condition containing less than 128 characters. Very time consuming :(

See attached image: sku-limit-1.png

Infinitee’s picture

FileSize
44.4 KB

image: sku-limit-1.png

jkuma’s picture

Status: Active » Needs work

Hi Infinitee,

Yes we could bypass that using a textarea for large amount of SKUs. What do you think of a link bellow the field input and when clicking on it, it changes into a teaxtarea ?

Infinitee’s picture

Sounds good to me as long as the text field is limitless for very large lists.

Thanks,

Ralph

jkuma’s picture

Project: Commerce Discount » Inline Conditions
Version: 7.x-1.0-alpha3 » 7.x-1.x-dev
Assigned: Unassigned » jkuma

Ok so let's do it this way. Moving to inline_conditions project.

jkuma’s picture

Title: Ability to turn off auto complete SKU » Increase max length of exposed text fields
Status: Needs work » Needs review
FileSize
2.54 KB

Hello Infinitee,

So I've modified the max length for each textfield. I Don't add the the link to change the form element into a textarea (because it's too long to do, and the code gets complex if I do so). I put an arbitrary limit of 12800 characters for text fields.

Moreover, I've changed the post title because it's the default textfield configuration that limits max characters to 128. Auto-complete functionality is not related to that issue.

Infinitee’s picture

Thank you very much!

One last question... If I change "12800 characters" to "unlimited" would it work? Like I said I have a long list of SKUs.

jkuma’s picture

Status: Needs review » Needs work

Ok, I'll implement your suggestion and looks if it works or not.

jkuma’s picture

Status: Needs work » Needs review
FileSize
2.39 KB

Ok, it's done !

jkuma’s picture

Sorry for the huge delay, the "unlimited" value for the #maxlength property doesn't work, so I put an arbitrary limit to 4096 characters. If this limit is reached, it's because this condition is not suitable for your need.

jkuma’s picture

Status: Needs review » Reviewed & tested by the community
jkuma’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Pushed into 7.x-1.x branch.