kentico_michal
-
10/8/2010 9:04:35 AM
RE:ecommerce -> new product -> single step add new product
Hi,
Yes it is possible, but it requires some modification. So, could you please try to open ~\CMSModules\Ecommerce\Content\Product\NewProduct.ascx file and add following code at the end of the table:
<tr> <td class="FieldLabel" style="padding-left: 35px;"> <asp:Label runat="server" ID="lblSKUAvailableItems" EnableViewState="false" Text="Available Items:"/> </td> <td> <asp:TextBox ID="txtSKUAvailableItems" runat="server" CssClass="TextBoxField" EnableViewState="false" MaxLength="9" /> </td> </tr> </table>
Then file ~\CMSModules\Ecommerce\Content\Product\NewProduct.ascx.cs file needs to be modified as well. So please add into SaveData method following line:
skuObj.SKUDepartmentID = departmentElem.DepartmentID; skuObj.SKUEnabled = true; skuObj.SKUAvailableItems = ValidationHelper.GetInteger(txtSKUAvailableItems.Text.Trim(), 0); // Create new SKU SKUInfoProvider.SetSKUInfo(skuObj);
This is simple example how you can add Available items: field into the first step of creating new product. You can add another fields that are provided by SKUInfo class in similar way. More information about this class can be found at our API reference http://devnet.kentico.com/downloads/kenticocms_api.zip
Best regards, Michal Legen
|