Guest User

Untitled

a guest
Jun 17th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. var spConfig = new Product.Config({"attributes":{"85":{"id":"85","code":"color","label":"Colour","options":[{"id":"9","label":"Black","price":"0","oldPrice":"0","products":["12","13"]}.....
  2.  
  3. I need to be able to get the "products" (in this case 12,13) by the options id, in this case 9.
  4.  
  5. At the moment the code I have just itterates through,
  6.  
  7. var options = this.config.attributes[attributeId].options;
  8. for(var i=0;i<options.length;i++){
  9. alert(options[i].price);
  10. }
Add Comment
Please, Sign In to add comment