public virtual void UpdateGoogleProductRecord(ZboziProductRecord zboziProductRecord)
        {
            if (zboziProductRecord == null)
            {
                throw new ArgumentNullException("googleProductRecord");
            }

            _zboziProductsRepository.Update(zboziProductRecord);
        }
        public virtual void DeleteGoogleProduct(ZboziProductRecord googleProductRecord)
        {
            if (googleProductRecord == null)
            {
                throw new ArgumentNullException("zboziProductRecord");
            }

            _zboziProductsRepository.Delete(googleProductRecord);
        }
        public ActionResult GoogleProductUpdate(Zbozi.Models.ZboziFeedModel.GoogleProductModel model)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManagePlugins))
            {
                return(Content("Access denied"));
            }

            var zboziProduct = _zboziService.GetByProductId(model.ProductId);

            if (zboziProduct != null)
            {
                zboziProduct.Taxonomy       = model.ZboziCategory;
                zboziProduct.Gender         = model.Gender;
                zboziProduct.AgeGroup       = model.AgeGroup;
                zboziProduct.Color          = model.Color;
                zboziProduct.Size           = model.GoogleSize;
                zboziProduct.CustomGoods    = model.CustomGoods;
                zboziProduct.MAX_CPC        = model.MAXCPC;
                zboziProduct.MAX_CPC_SEARCH = model.MAXCPC_SEARCH;
                zboziProduct.ProductName    = model.ZboziProductName;
                zboziProduct.EXTRA_MESSAGE  = model.EXTRAMESSAGE;


                _zboziService.UpdateGoogleProductRecord(zboziProduct);
            }
            else
            {
                //insert
                zboziProduct = new ZboziProductRecord
                {
                    ProductId      = model.ProductId,
                    Taxonomy       = model.ZboziCategory,
                    MAX_CPC        = model.MAXCPC,
                    EXTRA_MESSAGE  = model.EXTRAMESSAGE,
                    MAX_CPC_SEARCH = model.MAXCPC_SEARCH,
                    ProductName    = model.ZboziProductName,
                    Gender         = model.Gender,
                    AgeGroup       = model.AgeGroup,
                    Color          = model.Color,
                    Size           = model.GoogleSize,
                    CustomGoods    = model.CustomGoods
                };
                _zboziService.InsertGoogleProductRecord(zboziProduct);
            }

            return(new NullJsonResult());
        }