HomeHome Product Discus... Product Discus...SmithCartSmithCartPossible bug found when cloning products with variantsPossible bug found when cloning products with variants
Previous
 
Next
New Post
7/11/2015 12:22 PM
 
I have 2 sites with Smith Buy Now module installed and functioning.  Both are up to date on DNN and Smith Cart.  I have noticed a bug that I can duplicated on both sites (and both test sites).  

When cloning an item with variants, for example a product that has sizes available, the variant group and options don't seem to stick.  Here is what I found.  

I have a shirt for sale with variant group called select size.  Then variants 0-4 for small through 2X-Large.  1X and 2X are both set to absolute price change from $20 to $25.  I setup the first shirt no problem.  I go in and clone the shirt and setup the new product.  Add images and save.  

If I don't touch the variants at all it seems to be ok.  If I need to go in and adjust price, for example the clone is $25 and $30, when I click on the variants, I notice that the variant group is gone, and the price isn't set to absolute, its set to sale.  

What is strange is if I look at the variants before editing them, it shows that it is set to the proper group, but its definitely not.  I've also noticed that if I don't mess with all the variants I have some strange behavior.  For example if I only go in and change 3 and 4 to adjust the price increase on Large and X-Large, when i go look at the item, Small and Medium are in one drop down and large and x-large are in another.  I don't feel like the clone is actually cloning the variant group as it should. Its like its setting it to the source item's group until you go in and edit it.  Then you are forced to pick the new group because it won't save without changing it.  

So any time that I clone an item with variants, I have to go in and edit each of the variants.  Kinda defeats the purpose of cloning if you have to go in and touch what is usually the most tedious part of adding an item.  
 
New Post
7/13/2015 12:52 PM
 
Hi Seth,

Which Product Clone method are you using; The Copy option from the Manage Products screen, the Advanced Clone option from the Product Setup screen or the Copy Variants option from the Manage Variants screen?
 
New Post
7/13/2015 12:55 PM
 
Manage products > click on clone icon next to an existing item
 
New Post
7/15/2015 6:41 PM
 
Hi Seth,

I was able to replicate this issue and have logged this to our Bug Tracker system as BugID:601 to be addressed as soon as possible. I'll reply back to this thread as soon as an update is available.

Thanks for reporting the issue!
 
New Post
7/20/2015 11:34 AM
 
I don't know the exact details of *this* issue but I reported what sounds to be this same bug in 2013. I've had to explain to my customer that he needs to clone the product and then delete and re-add the Variant Groups to make it work.
 
New Post
7/20/2015 8:46 PM
 
Tom Hudgins wrote:
I don't know the exact details of *this* issue but I reported what sounds to be this same bug in 2013. I've had to explain to my customer that he needs to clone the product and then delete and re-add the Variant Groups to make it work.

 

This issue is similar but a little different. The issue you reported was an error being thrown when editing the Variants of a cloned Product. According to our Change Log that issue was resolved in the release of Cart 5.71 on 11/27/2013. The forum thread at the following link also includes SQL scripts which can be run to resolve the issue in version 5.68: http://www.smith-consulting.com/Forum...
 
New Post
7/30/2015 6:38 PM
 
To fix this issue, run the following ALTER Sql statement to update the Smith_CopyProduct Stored Proc. As always, be sure to make a backup before making any changes to your live site:

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
----------
 
ALTER PROCEDURE [dbo].[Smith_CopyProduct]
@ProductID INT,
@ModelNumber nvarchar(50),
@ModelName nvarchar(200),
@UnitCost money
AS
 
---- Copy Product ----
INSERT Smith_Products
(CategoryID, Manufacturer,ModelNumber,ModelName,ProductImage,ThumbnailImage,UnitCost,MemberPrice,QuantityOnHand,Summary,[Description],DownloadUrl,[Featured],[Archived]
,[Weight],[SortOrder],[ExcludeCoupon],[Items],[Share],[TabModuleId],[CreatedByUser],[CreatedDate],[LogicallyDeleted],[Recurring],[SubscriptionInterval],[RecurringOccurances]
,[UrlGUID],[EncryptUrl],[AddDNNRole],[RequireLogin],[UsePriPriceWght],[BundleID],[MasterBundleID],[RoleExpireDays],[TaxExempt],[PortalID],[AffiliateUrl],[RequireCoupon],ShowPDUDF,AutoGUID
,Description2,Description3,Description4,Description5,TabName1,TabName2,TabName3,TabName4,TabName5,HideThumbnail,HidePrice,PriceClass,MinOrderQty,ChargeHandling,LeadTime,HideQuantity
,PriceUnits,MaxOrderQty,Width,Height,[Length],RecurringStartDate,ExcludeVariantRecur,SalePrice,WholesalePrice,HideProduct,ShowProductRole,TaxRate,Upsell,EnableTrial,TrialInterval,TrialOccurences
,TrialAmount,UseCompanyLogo,UserEnteredAmount,Booking
)
SELECT CategoryID, Manufacturer,@ModelNumber as 'ModelNumber',@ModelName as 'ModelName',ProductImage,ThumbnailImage,@UnitCost as 'UnitCost',MemberPrice,QuantityOnHand,Summary,[Description],DownloadUrl,[Featured],[Archived]
,[Weight],[SortOrder],[ExcludeCoupon],[Items],[Share],[TabModuleId],[CreatedByUser],[CreatedDate],[LogicallyDeleted],[Recurring],[SubscriptionInterval],[RecurringOccurances]
,[UrlGUID],[EncryptUrl],[AddDNNRole],[RequireLogin],[UsePriPriceWght],[BundleID],[MasterBundleID],[RoleExpireDays],[TaxExempt],[PortalID],[AffiliateUrl],[RequireCoupon],ShowPDUDF,AutoGUID
,Description2,Description3,Description4,Description5,TabName1,TabName2,TabName3,TabName4,TabName5,HideThumbnail,HidePrice,PriceClass,MinOrderQty,ChargeHandling,LeadTime,HideQuantity
,PriceUnits,MaxOrderQty,Width,Height,[Length],RecurringStartDate,ExcludeVariantRecur,SalePrice,WholesalePrice,HideProduct,ShowProductRole,TaxRate,Upsell,EnableTrial,TrialInterval,TrialOccurences
,TrialAmount,UseCompanyLogo,UserEnteredAmount,Booking
  
FROM Smith_Products
where productid = @ProductID
 
-- Get ProductID just inserted
DECLARE @myProdID int
SELECT @myProdID=scope_identity()
 
------ Copy Products 2 ----
 
INSERT INTO Smith_Products2
(ProductID,ShowOrderAsIs,Ecard,BinLocation,NumberOfBoxes,DateAddedToInventory,Client,[Owner] )
SELECT @myProdID as 'ProductID', ShowOrderAsIs,Ecard,BinLocation,NumberOfBoxes,DateAddedToInventory,Client,[Owner]
from Smith_Products2
where productid = @ProductID
 
------ Copy Variant Groups ----
 
INSERT INTO Smith_ProductVariantGroup
(ProductID, VariantHelpURL, VariantGroup, Hide, GroupDescription ) 
SELECT @myProdID as 'ProductID', VariantHelpURL, VariantGroup, Hide, GroupDescription 
from Smith_ProductVariantGroup
where productid = @ProductID
 
DECLARE @myGroupID int
SELECT @myGroupID=scope_identity()
 
 
------ Copy Variants ----
 
INSERT Smith_ProductVariant 
(ProductID,VariantGroup,VariantName,VariantDisplayType,VariantImage,PriceAdjustment,WeightAdjustment,SortOrder,PortalId,VariantRequired,VariantGroupID
,Sku,QtyOnHand,ConditionalGroupID,VariantIconImage,VariantZoomImage,DropDownImageOption,IconImageOption,RenderTextInImage)
SELECT @myProdID as 'ProductID', VariantGroup, VariantName, VariantDisplayType, VariantImage, PriceAdjustment, WeightAdjustment, SortOrder, PortalId, VariantRequired,@myGroupID
,Sku,QtyOnHand,ConditionalGroupID,VariantIconImage,VariantZoomImage,DropDownImageOption,IconImageOption,RenderTextInImage
FROM Smith_ProductVariant 
where productid = @ProductID
 
 
------ Copy Variant Groups ----
 
INSERT INTO Smith_ProductVariantGroup
(ProductID, VariantHelpURL, VariantGroup, Hide, GroupDescription ) 
SELECT @myProdID as 'ProductID', VariantHelpURL, VariantGroup, Hide, GroupDescription 
from Smith_ProductVariantGroup
where productid = @ProductID
 
 
------ Copy Categories ----
 
INSERT INTO Smith_CategoryProduct
(CategoryID, ProductID ) 
SELECT CategoryID, @myProdID as 'ProductID'
from Smith_CategoryProduct
where productid = @ProductID
 
 
Previous
 
Next
HomeHome Product Discus... Product Discus...SmithCartSmithCartPossible bug found when cloning products with variantsPossible bug found when cloning products with variants