Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > ecommerce - prevent duplicate product View modes: 
User avatar
Member
Member
whitney_jason - 9/23/2009 1:34:11 PM
   
ecommerce - prevent duplicate product
I'm wondering if anyone has any suggestions for preventing a duplicate product from being created? I'm just setting up our CMS and I've got our internal SKU being entered as the product number, but this field is not required when creating products. I basically need to do some kind of check to see if the product number already exists and if so, prevent the product from being created. I'd love any feedback on this.

Thanks,
Jason Hines

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 9/28/2009 8:36:47 AM
   
RE:ecommerce - prevent duplicate product
Hello,

you could develop a custom form control (http://devnet.kentico.com/docs/devguide/developing_form_controls.htm) and set up a new field to Ecommerce – SKU system table (http://devnet.kentico.com/docs/devguide/system_tables_overview.htm).

You may use the IsValid method inside the form control to control if the number is unique.

Optionally, you could re-write the part of CMSDesk where the product is edited and add your custom validation to code behind. It is this control:

<web site fodler>\CMSModules\Ecommerce\Controls\UI\ProductEdit.ascx

Best regards,
Helena Grulichova