@RequestMapping(
      value = "/admin/options/remove.html",
      method = RequestMethod.POST,
      produces = "application/json")
  public @ResponseBody String deleteOption(
      HttpServletRequest request, HttpServletResponse response, Locale locale) {
    String sid = request.getParameter("optionId");

    MerchantStore store = (MerchantStore) request.getAttribute("MERCHANT_STORE");

    AjaxResponse resp = new AjaxResponse();

    try {

      Long id = Long.parseLong(sid);

      ProductOption entity = productOptionService.getById(store, id);

      if (entity == null
          || entity.getMerchantSore().getId().intValue() != store.getId().intValue()) {

        resp.setStatusMessage(messages.getMessage("message.unauthorized", locale));
        resp.setStatus(AjaxResponse.RESPONSE_STATUS_FAIURE);

      } else {

        productOptionService.delete(entity);
        resp.setStatus(AjaxResponse.RESPONSE_OPERATION_COMPLETED);
      }

    } catch (Exception e) {
      LOGGER.error("Error while deleting option", e);
      resp.setStatus(AjaxResponse.RESPONSE_STATUS_FAIURE);
      resp.setErrorMessage(e);
    }

    String returnString = resp.toJSONString();

    return returnString;
  }