def admin_update_variant_option1_sort_order
      product_id = params[:id]
      params[:values].each_with_index do |value, i|
        Variant.where(:product_id => product_id, :option1 => value).all.each do |v|
          v.update_attribute(:option1_sort_order, i)
        end
      end            
      render :json => { :success => true }
    end
def admin_update_variant_option1_sort_order
      product_id = params[:id]
      params[:values].each_with_index do |value, i|
        Variant.where(:product_id => product_id, :option1 => value).all.each do |v|
          v.update_attribute(:option1_sort_order, i)
        end
      end            
      render :json => { :success => true }
    end
PUT /admin/products/:id/variants/option1-sort-order