Created
May 5, 2019 13:11
-
-
Save unlocomqx/9b1c97d54f8b2175fddc6ace9b078dc2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// define a max for each attribute | |
// open the console then change the attribute to see the selected id | |
var max = { | |
581: 20, | |
582: 10 | |
} | |
prestashop.on('updatedProduct', function(data) { | |
const idProductAttribute = data.id_product_attribute; | |
console.log(idProductAttribute); | |
if (max[idProductAttribute]) { | |
getField('leveys').data('max', max[idProductAttribute]).apply(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment