Adding Custom Fields

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
rhuffman
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 24
Joined: Thu May 19, 2005 6:36 pm
Location: Dublin, OH
Contact:

Adding Custom Fields

Post by rhuffman » Mon Jul 26, 2010 12:58 pm

In Able 5.x we added numerous custom field to our tables and were able to access them in the admin forms and display the changes in the aspx pages on the web.

I added two fields in ac_Categories table and need to add several custom fields throughout various tables. Specifically, we are adding one fild called "TitleTag" and need to add more.

I reviewed both the editCategory.aspx and the editCategory.aspx.cs files and made the appropriate changes base on how other fileds were being called.
However, once I attmepted to display the page we received an error:

c:\AbleCommerce\Admin\Catalog\EditCategory.aspx.cs(153,19): error CS0117: 'CommerceBuilder.Catalog.Category' does not contain a definition for 'TitleTag'

How can we complete this process, we need to add numerous custom fields to various tables.

following is the code we added:

EditCategory.aspx.cs (both were added in the appropriate sections)
TitleTag.Text = _Category.TitleTag;
_Category.TitleTag = TitleTag.Text;

EditCategory.aspx
<tr>
<th width="15%" class="rowHeader">
<cb:ToolTipLabel ID="TitleTagLabel" runat="server" Text="TitleTag:" ToolTip="Enter Title Tage to be displayed in on top of page Max 66 characters"></cb:ToolTipLabel>
</th>


<td>
<asp:TextBox ID="TitleTag" runat="server" Text="" Columns="40" MaxLength="100"></asp:TextBox>
<asp:RequiredFieldValidator ID="TitleTagValidator" runat="server" Text="*" Display="Dynamic" ErrorMessage="Name is required." ControlToValidate="TitleTag"></asp:RequiredFieldValidator>
</td>

</tr>

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Adding Custom Fields

Post by mazhar » Tue Jul 27, 2010 5:33 am

AbleCommerce 7 has a table named ac_CustomFields. Read the following post about to utilize this table to create custom fields without modifying schema.
viewtopic.php?f=42&t=8651

Post Reply