daveb wrote:...
Next time test before posting.
I have been IT manager for a couple of years with some programming/architectural skills. I am certainly not experienced, but have overall skills from network design to programming.
And after long defending them, I must agree, IT people are arrogant. They are very prejudiced and lack respect.
Here is a more elaborated test:
I installed new instance of NopCommerce 2.65 with empty database.
Create Product and ProductVariants/****** Object: Table [dbo].[Product] Script Date: 09/28/2012 10:22:59 ******/
SET IDENTITY_INSERT [dbo].[Product] ON
INSERT [dbo].[Product] ([Id], [Name], [ShortDescription], [FullDescription], [AdminComment], [ProductTemplateId], [ShowOnHomePage], [MetaKeywords], [MetaDescription], [MetaTitle], [SeName], [AllowCustomerReviews], [ApprovedRatingSum], [NotApprovedRatingSum], [ApprovedTotalReviews], [NotApprovedTotalReviews], [Published], [Deleted], [CreatedOnUtc], [UpdatedOnUtc]) VALUES (1, N'ABC', NULL, NULL, NULL, 1, 0, NULL, NULL, NULL, NULL, 1, 0, 0, 0, 0, 1, 0, CAST(0x0000A0DA0085D5AF AS DateTime), CAST(0x0000A0DA0085D5AF AS DateTime))
INSERT [dbo].[Product] ([Id], [Name], [ShortDescription], [FullDescription], [AdminComment], [ProductTemplateId], [ShowOnHomePage], [MetaKeywords], [MetaDescription], [MetaTitle], [SeName], [AllowCustomerReviews], [ApprovedRatingSum], [NotApprovedRatingSum], [ApprovedTotalReviews], [NotApprovedTotalReviews], [Published], [Deleted], [CreatedOnUtc], [UpdatedOnUtc]) VALUES (2, N'XYZ', NULL, NULL, NULL, 1, 0, NULL, NULL, NULL, NULL, 1, 0, 0, 0, 0, 1, 0, CAST(0x0000A0DA00878BE4 AS DateTime), CAST(0x0000A0DA00878BE4 AS DateTime))
SET IDENTITY_INSERT [dbo].[Product] OFF
/****** Object: Table [dbo].[ProductVariant] Script Date: 09/28/2012 10:22:59 ******/
SET IDENTITY_INSERT [dbo].[ProductVariant] ON
INSERT [dbo].[ProductVariant] ([Id], [ProductId], [Name], [Sku], [Description], [AdminComment], [ManufacturerPartNumber], [Gtin], [IsGiftCard], [GiftCardTypeId], [RequireOtherProducts], [RequiredProductVariantIds], [AutomaticallyAddRequiredProductVariants], [IsDownload], [DownloadId], [UnlimitedDownloads], [MaxNumberOfDownloads], [DownloadExpirationDays], [DownloadActivationTypeId], [HasSampleDownload], [SampleDownloadId], [HasUserAgreement], [UserAgreementText], [IsRecurring], [RecurringCycleLength], [RecurringCyclePeriodId], [RecurringTotalCycles], [IsShipEnabled], [IsFreeShipping], [AdditionalShippingCharge], [IsTaxExempt], [TaxCategoryId], [ManageInventoryMethodId], [StockQuantity], [DisplayStockAvailability], [DisplayStockQuantity], [MinStockQuantity], [LowStockActivityId], [NotifyAdminForQuantityBelow], [BackorderModeId], [AllowBackInStockSubscriptions], [OrderMinimumQuantity], [OrderMaximumQuantity], [AllowedQuantities], [DisableBuyButton], [DisableWishlistButton], [AvailableForPreOrder], [CallForPrice], [Price], [OldPrice], [ProductCost], [SpecialPrice], [SpecialPriceStartDateTimeUtc], [SpecialPriceEndDateTimeUtc], [CustomerEntersPrice], [MinimumCustomerEnteredPrice], [MaximumCustomerEnteredPrice], [HasTierPrices], [HasDiscountsApplied], [Weight], [Length], [Width], [Height], [PictureId], [AvailableStartDateTimeUtc], [AvailableEndDateTimeUtc], [Published], [Deleted], [DisplayOrder], [CreatedOnUtc], [UpdatedOnUtc]) VALUES (1, 1, N'001', N'ABC-001', NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0, 0, 0, 1, 10, NULL, 1, 0, 0, 0, NULL, 0, 100, 0, 10, 1, 0, CAST(0.0000 AS Decimal(18, 4)), 0, 0, 0, 10000, 0, 0, 0, 0, 1, 0, 0, 1, 10000, NULL, 0, 0, 0, 0, CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), NULL, NULL, NULL, 0, CAST(0.0000 AS Decimal(18, 4)), CAST(1000.0000 AS Decimal(18, 4)), 0, 0, CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), 0, NULL, NULL, 1, 0, 1, CAST(0x0000A0DA0085D5BD AS DateTime), CAST(0x0000A0DA008603A9 AS DateTime))
INSERT [dbo].[ProductVariant] ([Id], [ProductId], [Name], [Sku], [Description], [AdminComment], [ManufacturerPartNumber], [Gtin], [IsGiftCard], [GiftCardTypeId], [RequireOtherProducts], [RequiredProductVariantIds], [AutomaticallyAddRequiredProductVariants], [IsDownload], [DownloadId], [UnlimitedDownloads], [MaxNumberOfDownloads], [DownloadExpirationDays], [DownloadActivationTypeId], [HasSampleDownload], [SampleDownloadId], [HasUserAgreement], [UserAgreementText], [IsRecurring], [RecurringCycleLength], [RecurringCyclePeriodId], [RecurringTotalCycles], [IsShipEnabled], [IsFreeShipping], [AdditionalShippingCharge], [IsTaxExempt], [TaxCategoryId], [ManageInventoryMethodId], [StockQuantity], [DisplayStockAvailability], [DisplayStockQuantity], [MinStockQuantity], [LowStockActivityId], [NotifyAdminForQuantityBelow], [BackorderModeId], [AllowBackInStockSubscriptions], [OrderMinimumQuantity], [OrderMaximumQuantity], [AllowedQuantities], [DisableBuyButton], [DisableWishlistButton], [AvailableForPreOrder], [CallForPrice], [Price], [OldPrice], [ProductCost], [SpecialPrice], [SpecialPriceStartDateTimeUtc], [SpecialPriceEndDateTimeUtc], [CustomerEntersPrice], [MinimumCustomerEnteredPrice], [MaximumCustomerEnteredPrice], [HasTierPrices], [HasDiscountsApplied], [Weight], [Length], [Width], [Height], [PictureId], [AvailableStartDateTimeUtc], [AvailableEndDateTimeUtc], [Published], [Deleted], [DisplayOrder], [CreatedOnUtc], [UpdatedOnUtc]) VALUES (2, 1, N'002', N'ABC-002', NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0, 0, 0, 1, 10, NULL, 1, 0, 0, 0, NULL, 0, 100, 0, 10, 1, 0, CAST(0.0000 AS Decimal(18, 4)), 0, 0, 0, 10000, 0, 0, 0, 0, 1, 0, 0, 1, 10000, NULL, 0, 0, 0, 0, CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), NULL, NULL, NULL, 0, CAST(0.0000 AS Decimal(18, 4)), CAST(1000.0000 AS Decimal(18, 4)), 0, 0, CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), 0, NULL, NULL, 1, 0, 1, CAST(0x0000A0DA0086121B AS DateTime), CAST(0x0000A0DA0086121B AS DateTime))
INSERT [dbo].[ProductVariant] ([Id], [ProductId], [Name], [Sku], [Description], [AdminComment], [ManufacturerPartNumber], [Gtin], [IsGiftCard], [GiftCardTypeId], [RequireOtherProducts], [RequiredProductVariantIds], [AutomaticallyAddRequiredProductVariants], [IsDownload], [DownloadId], [UnlimitedDownloads], [MaxNumberOfDownloads], [DownloadExpirationDays], [DownloadActivationTypeId], [HasSampleDownload], [SampleDownloadId], [HasUserAgreement], [UserAgreementText], [IsRecurring], [RecurringCycleLength], [RecurringCyclePeriodId], [RecurringTotalCycles], [IsShipEnabled], [IsFreeShipping], [AdditionalShippingCharge], [IsTaxExempt], [TaxCategoryId], [ManageInventoryMethodId], [StockQuantity], [DisplayStockAvailability], [DisplayStockQuantity], [MinStockQuantity], [LowStockActivityId], [NotifyAdminForQuantityBelow], [BackorderModeId], [AllowBackInStockSubscriptions], [OrderMinimumQuantity], [OrderMaximumQuantity], [AllowedQuantities], [DisableBuyButton], [DisableWishlistButton], [AvailableForPreOrder], [CallForPrice], [Price], [OldPrice], [ProductCost], [SpecialPrice], [SpecialPriceStartDateTimeUtc], [SpecialPriceEndDateTimeUtc], [CustomerEntersPrice], [MinimumCustomerEnteredPrice], [MaximumCustomerEnteredPrice], [HasTierPrices], [HasDiscountsApplied], [Weight], [Length], [Width], [Height], [PictureId], [AvailableStartDateTimeUtc], [AvailableEndDateTimeUtc], [Published], [Deleted], [DisplayOrder], [CreatedOnUtc], [UpdatedOnUtc]) VALUES (3, 1, N'001', N'XYZ-001', NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0, 0, 0, 1, 10, NULL, 1, 0, 0, 0, NULL, 0, 100, 0, 10, 1, 0, CAST(0.0000 AS Decimal(18, 4)), 0, 0, 0, 10000, 0, 0, 0, 0, 1, 0, 0, 1, 10000, NULL, 0, 0, 0, 0, CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), NULL, NULL, NULL, 0, CAST(0.0000 AS Decimal(18, 4)), CAST(1000.0000 AS Decimal(18, 4)), 0, 0, CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), 0, NULL, NULL, 1, 0, 1, CAST(0x0000A0DA008759A8 AS DateTime), CAST(0x0000A0DA008759A8 AS DateTime))
INSERT [dbo].[ProductVariant] ([Id], [ProductId], [Name], [Sku], [Description], [AdminComment], [ManufacturerPartNumber], [Gtin], [IsGiftCard], [GiftCardTypeId], [RequireOtherProducts], [RequiredProductVariantIds], [AutomaticallyAddRequiredProductVariants], [IsDownload], [DownloadId], [UnlimitedDownloads], [MaxNumberOfDownloads], [DownloadExpirationDays], [DownloadActivationTypeId], [HasSampleDownload], [SampleDownloadId], [HasUserAgreement], [UserAgreementText], [IsRecurring], [RecurringCycleLength], [RecurringCyclePeriodId], [RecurringTotalCycles], [IsShipEnabled], [IsFreeShipping], [AdditionalShippingCharge], [IsTaxExempt], [TaxCategoryId], [ManageInventoryMethodId], [StockQuantity], [DisplayStockAvailability], [DisplayStockQuantity], [MinStockQuantity], [LowStockActivityId], [NotifyAdminForQuantityBelow], [BackorderModeId], [AllowBackInStockSubscriptions], [OrderMinimumQuantity], [OrderMaximumQuantity], [AllowedQuantities], [DisableBuyButton], [DisableWishlistButton], [AvailableForPreOrder], [CallForPrice], [Price], [OldPrice], [ProductCost], [SpecialPrice], [SpecialPriceStartDateTimeUtc], [SpecialPriceEndDateTimeUtc], [CustomerEntersPrice], [MinimumCustomerEnteredPrice], [MaximumCustomerEnteredPrice], [HasTierPrices], [HasDiscountsApplied], [Weight], [Length], [Width], [Height], [PictureId], [AvailableStartDateTimeUtc], [AvailableEndDateTimeUtc], [Published], [Deleted], [DisplayOrder], [CreatedOnUtc], [UpdatedOnUtc]) VALUES (4, 2, N'001', N'XYZ-001', NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0, 0, 0, 1, 10, NULL, 1, 0, 0, 0, NULL, 0, 100, 0, 10, 1, 0, CAST(0.0000 AS Decimal(18, 4)), 0, 0, 0, 10000, 0, 0, 0, 0, 1, 0, 0, 1, 10000, NULL, 0, 0, 0, 0, CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), NULL, NULL, NULL, 0, CAST(0.0000 AS Decimal(18, 4)), CAST(1000.0000 AS Decimal(18, 4)), 0, 0, CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), 0, NULL, NULL, 1, 0, 1, CAST(0x0000A0DA00878C70 AS DateTime), CAST(0x0000A0DA0087ABB4 AS DateTime))
INSERT [dbo].[ProductVariant] ([Id], [ProductId], [Name], [Sku], [Description], [AdminComment], [ManufacturerPartNumber], [Gtin], [IsGiftCard], [GiftCardTypeId], [RequireOtherProducts], [RequiredProductVariantIds], [AutomaticallyAddRequiredProductVariants], [IsDownload], [DownloadId], [UnlimitedDownloads], [MaxNumberOfDownloads], [DownloadExpirationDays], [DownloadActivationTypeId], [HasSampleDownload], [SampleDownloadId], [HasUserAgreement], [UserAgreementText], [IsRecurring], [RecurringCycleLength], [RecurringCyclePeriodId], [RecurringTotalCycles], [IsShipEnabled], [IsFreeShipping], [AdditionalShippingCharge], [IsTaxExempt], [TaxCategoryId], [ManageInventoryMethodId], [StockQuantity], [DisplayStockAvailability], [DisplayStockQuantity], [MinStockQuantity], [LowStockActivityId], [NotifyAdminForQuantityBelow], [BackorderModeId], [AllowBackInStockSubscriptions], [OrderMinimumQuantity], [OrderMaximumQuantity], [AllowedQuantities], [DisableBuyButton], [DisableWishlistButton], [AvailableForPreOrder], [CallForPrice], [Price], [OldPrice], [ProductCost], [SpecialPrice], [SpecialPriceStartDateTimeUtc], [SpecialPriceEndDateTimeUtc], [CustomerEntersPrice], [MinimumCustomerEnteredPrice], [MaximumCustomerEnteredPrice], [HasTierPrices], [HasDiscountsApplied], [Weight], [Length], [Width], [Height], [PictureId], [AvailableStartDateTimeUtc], [AvailableEndDateTimeUtc], [Published], [Deleted], [DisplayOrder], [CreatedOnUtc], [UpdatedOnUtc]) VALUES (5, 2, N'002', N'XYZ-002', NULL, NULL, NULL, NULL, 0, 0, 0, NULL, 0, 0, 0, 1, 10, NULL, 1, 0, 0, 0, NULL, 0, 100, 0, 10, 1, 0, CAST(0.0000 AS Decimal(18, 4)), 0, 0, 0, 10000, 0, 0, 0, 0, 1, 0, 0, 1, 10000, NULL, 0, 0, 0, 0, CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), NULL, NULL, NULL, 0, CAST(0.0000 AS Decimal(18, 4)), CAST(1000.0000 AS Decimal(18, 4)), 0, 0, CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), CAST(0.0000 AS Decimal(18, 4)), 0, NULL, NULL, 1, 0, 1, CAST(0x0000A0DA0087BBF1 AS DateTime), CAST(0x0000A0DA0087BBF1 AS DateTime))
SET IDENTITY_INSERT [dbo].[ProductVariant] OFF
SearchSearch for 'ABC' returns one result: ABC.
Search for 'XYZ' returns two results: ABC and XYZ.
This make sense, as sku XYZ-001 is a variant of Product ABC and so ABC is also shown up.
DeleteGo in administration and select product ABC.
Go to Product variants tab and click edit on variant with sku = 'XYZ-001'
Click Delete button to delete this variant.
If I look in the ProductVariants table, there still is the variant with sku = 'XYZ-001' for Product 'ABC', but with 'Deleted' = 1.
Search againAfterwards, I log out, clean cache, reboot sql server and go back to website.
If I search for XYZ, it still shows two results: ABC and XYZ.
I didn't intend to make a big deal of it, just wanted to warn. I can handle the problem myself.
See
https://www.nopcommerce.com/boards/t/8682/why-are-records-not-really-deleted-in-the-database.aspx.
Just wanted to say that it is not the best choice.
But, like Einstein said: you can't solve a problem with the mind that created it.
Best regards,
Reinout