kentico_michal
-
10/26/2010 4:30:23 AM
RE:Ecommerce - product -> select manufacturer
Hi, Yes, it is possible to customize new product interface. First, you need to modify ~\CMSModules\Ecommerce\Content\Product\NewProduct.ascx file and add code following code at the end of table:
<tr> <td class="FieldLabel" style="padding-left: 35px;"> <asp:Label runat="server" ID="lblSKUManufacturerID" EnableViewState="false" Text="Manufacturer:" /> </td> <td> <cms:ManufacturerSelector runat="server" ID="manufacturerElem" AddAllItemsRecord="false" AddNoneRecord="true" IsLiveSite="false" /> </td> </tr> </table>
Please do not forget to register ManufacturerSelector control with following code:
<%@ Register Src="~/CMSModules/Ecommerce/FormControls/ManufacturerSelector.ascx" TagName="ManufacturerSelector" TagPrefix="cms" %>
Last thing you need to do, is to add line marked as bold into SaveData method in ~\CMSModules\Ecommerce\Content\Product\NewProduct.ascx.cs
skuObj.SKUManufacturerID = manufacturerElem.ManufacturerID; // Create new SKU SKUInfoProvider.SetSKUInfo(skuObj);
Best regards, Michal Legen
|