-
-
Save jabberdog/e339d9b97f414fc5f5fbe132c3ed4be6 to your computer and use it in GitHub Desktop.
Magento configurable product default options by attribute label
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Product.Config.prototype.fillSelect = Product.Config.prototype.fillSelect.wrap(function(superMethod, element){ | |
var attributeId = element.id.replace(/[a-z]*/, ''); | |
var attribute = this.config.attributes[attributeId]; | |
this.config.chooseText = 'Select ' + this.config.attributes[attributeId].label; | |
return superMethod(element); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment