Skip to content

Instantly share code, notes, and snippets.

Sterling Okura bizlift

Block or report user

Report or block bizlift

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bizlift
bizlift / configurable.phtml
Last active Jun 12, 2019
Magento configurable product default options by attribute label
View configurable.phtml
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);
});
You can’t perform that action at this time.