Calculate valid sku, amount, price and detail status of each spec according to selected specs. A front-end JS algorithm for E-commerce product websites.