Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Right now, you use a constant to define the replacement as an empty string. This indiscriminately gets applied to any character in a token replacement. In my usage of this module, I'd prefer to actually use a hyphen in the place of spaces instead of just removing them, and because of my limited application, I could easily just change this replacement string to '-'. However, I don't see why this module shouldn't just follow Pathauto in allowing the replacement string to be defined in the settings form along with the SKU Case.
Comment | File | Size | Author |
---|---|---|---|
#1 | do_not_hardcode_the-2041991-1.patch | 6.6 KB | rbayliss |
Comments
Comment #1
rbayliss CreditAttribution: rbayliss commentedHere's a first pass at this.
Comment #2
mibfire CreditAttribution: mibfire commentedIf i dont set anything i get this error:
Notice: Undefined index: replacement in commerce_autosku_commerce_product_presave() (line 80 of /commerce_autosku/commerce_autosku.commerce.inc).
Comment #3
mibfire CreditAttribution: mibfire commentedI also get an error when i disable and enabled this module:
Comment #4
mibfire CreditAttribution: mibfire commentedComment #5
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedThe patch doesn't check if the field "Automatically Generate SKU" is set or set good defaults.
Otherwise "$pattern->advanced" is null or not defined at all throwing the exception in #3.