SELECT product_option_id INTO @optionId FROM product_options WHERE product_option_token = 'store';

SELECT MAX(product_option_value_index) INTO @valueIndex FROM product_option_values WHERE product_option_id = @optionId;

INSERT INTO `product_option_values`
(`product_option_id`, `product_option_value_title`, `product_option_value_token`, `product_option_value_price`, `product_option_value_image`, `product_option_value_index`, `product_option_value_preference`, `product_option_value_keywords`)
VALUES (@optionId, 'Gucci', 'gucci', 0, 'store-gucci.png', @valueIndex+10, 1, NULL);

INSERT INTO `product_option_values`
(`product_option_id`, `product_option_value_title`, `product_option_value_token`, `product_option_value_price`, `product_option_value_image`, `product_option_value_index`, `product_option_value_preference`, `product_option_value_keywords`)
VALUES (@optionId, 'Forever 21', 'forever-21', 0, 'store-forever-21.png', @valueIndex+20, 1, NULL);

INSERT INTO `product_option_values`
(`product_option_id`, `product_option_value_title`, `product_option_value_token`, `product_option_value_price`, `product_option_value_image`, `product_option_value_index`, `product_option_value_preference`, `product_option_value_keywords`)
VALUES (@optionId, 'Adidas', 'adidas', 0, 'store-adidas.png', @valueIndex+30, 1, NULL);

INSERT INTO `product_option_values`
(`product_option_id`, `product_option_value_title`, `product_option_value_token`, `product_option_value_price`, `product_option_value_image`, `product_option_value_index`, `product_option_value_preference`, `product_option_value_keywords`)
VALUES (@optionId, 'DVF', 'dvf', 0, 'store-dvf.png', @valueIndex+40, 1, NULL);


UPDATE product_option_values
SET product_option_value_preference = 0
WHERE 
(
  product_option_value_title = 'Saks' 
  OR product_option_value_title = 'Revolve' 
  OR product_option_value_title = 'Urban Outfitters' 
  OR product_option_value_title = 'Macy\'s'
)
AND product_option_id = @optionId;
