How to add a Product Custom Field

This forum is where we'll mirror posts that are of value to the community so they may be more easily found.
User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

How to add a Product Custom Field

Post by AbleMods » Sun Aug 16, 2009 8:42 pm

Introduction

In this article, we're going to do something most people didn't know was possible. We're going to add a entirely new custom field to a product. You may ask why I would do that when I could use a product template. Well, for every good question there's (usually) a good answer or two. In fact, product templates have some limitations. First, you can only have one template assigned to your product. Change the template, and you've changed the field choices for ALL the assigned products. Second, you have to assign the product template to each product. Depending on the number of products involved, that could become quite tedious and/or time-consuming for you.

Product custom fields are different. We're going to design them right into the main Edit Product page. This makes them faster and easier to access for the site admin. It also makes them VERY noticeable - no clicking into sub-screens to see what fields are there or how they're assigned. Product custom fields also gives you the flexibility to offer the new custom field to all your store products in one swoop. Plus product custom fields are just cooler. You want to be a cool site admin right? Of course you do!

As always - make a backup of the files you modify BEFORE you change them. That way you can put things back the way they were if something doesn't go as planned.

What's the Plan, Stan

Before we begin, let's talk a little about your "need". No, not THAT need. Let's keep it clean because this is a forum for professionals. Our "need" today is simple. We have certain products in our catalog that qualify for free shipping. In order to improve sales on these products, we want something on the product page to show the visitor that the displayed product qualifies for free shipping. Sure, you could create a product template with merchant-side field for free-shipping and look for that in the product page code. But that means you have to assign that template to all the products, and those products already have a product template assigned. So we're going to leverage product custom fields by adding a new custom field called "FreeShip".

Now that we know our need, we want to put together a plan. The plan isn't quite as simple. We have to make a custom field. We're going to need to give the site admin a way to set the value of that field on the edit product page. Then we've got to find a way to display the free shipping teaser on the product page itself. My Indiana farmtown math skills tell me we're going to have 3 major steps to this modification. Great, now we have a plan - let's get started!

The New Custom Field
To get our custom field off the ground, we start with the Admin-side Edit Product page. This page is pretty large, so we'll have to be careful when we make changes lest we blow something (else) up. Since our custom field is a shipping-related field, we're going to add it the "Taxes and Shipping" section of the edit product page.

Find the ~/Admin/Products/EditProduct.aspx file and edit it. When your editor loads, search for the word "TAXES" and it should take you to a line that looks just like this:

Code: Select all

<tr class="sectionHeader">
    <td colspan="4">
    TAXES &AMP; SHIPPING
    </td>
</tr>
And change it to look like this:

Code: Select all

<tr class="sectionHeader">
    <td colspan="4">
        TAXES & SHIPPING
    </td>
</tr>
<tr>
    <th class="rowHeader" nowrap>
        <asp:Label ID="lbl_FreeShip" runat="server" Text="Free Shipping?" />
    </th>
    <td>
        <asp:CheckBox ID="chk_FreeShip" runat="server"/>
    </td>
</tr>
Save your changes. Now, if you look closely you'll see some handy things to know. First, we added a whole new row to the Taxes and Shipping section. Inside that row, we defined a row header with a label that describes the field. In the row column, we defined a single Checkbox to represent the on/off of the free-shipping flag.

"Swell - I've got the field but it doesn't work" you might say. That's correct - all we've done is display a checkbox. We haven't told the server to save (or load) the checkbox value. Read on and I'll explain how to read and write the actual product custom field values.

Save/Load a Product Custom Field

Able did a fantastic job with the data classes. Everything ties together nicely so that it's almost always quick and easy to find a related piece of data. In our case, the primary object is a product. But a part of that product is a collection of sub-objects. One such sub-object is the product custom fields class. Since the product custom fields are stored in their own seperate table in the database, we're free to create as many as we like for each product.

In our project today, we just need to create one product custom field. We're going to call it "freeship". You could also call it "freeshipping" or even "customertakesmyprofitsagain" but "freeship" self-explanatory without being excessively lengthy. Keeping field names to a reasonable length (<10) keeps your programming code more organized and easier to follow down-the-road.

Let's get started with adding a custom field. This step is broken into two parts - The Save and the Load. When someone edits the product, we want to save whether the checkbox was checked or not. When someone pulls up the product record to edit it, we need to make sure the checkbox is set to the value of the "freeship" custom field.

Start with the Save step by editing the ~/Admin/Products/EditProduct.aspx.cs code file. In the file, search for "SaveButton_Click". It should take you straight to this code:

Code: Select all

public void SaveButton_Click(object sender, EventArgs e)
    {
        ValidateFieldsLengths();
        if (Page.IsValid)
        {
            //BASIC INFO
Now just replace that code with this code below:

Code: Select all

public void SaveButton_Click(object sender, EventArgs e)
    {
        ValidateFieldsLengths();
        if (Page.IsValid)
            {
                //BASIC INFO
                // BEGIN MOD: AbleMods.com
                bool _PCFExists = false;
                string _FreeShipValue = chk_FreeShip.Checked.ToString();

                foreach (ProductCustomField _PCF in _Product.CustomFields)
                    {
                        if (_PCF.FieldName == "freeship") 
                            {
                                _PCF.FieldValue = _FreeShipValue;
                                _PCF.Save();
                                _PCFExists = true;
                                break;
                            }
                    }

             if (! _PCFExists)
                {
                    ProductCustomField _NewPCF = new ProductCustomField();
                    _NewPCF.ProductId = _Product.ProductId;
                    _NewPCF.FieldName = "freeship";
                    _NewPCF.FieldValue = _FreeShipValue;
                    _NewPCF.Save();
                }
            // END MOD: AbleMods.com
Double-check you pasted everything in the right place and save it. Once you've saved it, let's make the changes needed to LOAD the assigned value. That way the proper value is already set whenever the admin edits this product. Go to the top of the file and search for the text "Page_Load". You should see this code:

Code: Select all

protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
            {
                //BASIC INFO
Got it? Great! Now replace that code with this code:

Code: Select all

protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
            {
                //BASIC INFO
                // BEGIN MOD: AbleMods.com
                foreach (ProductCustomField _PCF in _Product.CustomFields)
                    {
                        if (_PCF.FieldName == "freeship")
                            {
                                chk_FreeShip.Checked = AlwaysConvert.ToBool(_PCF.FieldValue, false);
                                break;
                            }
                    }
                // END MOD: AbleMods.com
Review your changes carefully and then save it. You're done! Go test it out by editing a product. You should be able to set the checkbox on certain products and see that the checkbox is NOT set on other products. Click around a few products and test it out. Pretty cool huh?

Displaying the Product Custom Field

Finally we're to the fun part - the visitor display side. Here's where we get to enjoy the fruits of our effort. For today's project, the free shipping indicator, we want something to appear on the product page when the product qualifies for free shipping. We've already added a custom field for free shipping, so now we just need to see if that value exists for the currently displayed product. Since all product pages will use the BuyProductDialog user control, we're going to make our modification there. Open your ~/ConLib/BuyProductDialog.ascx.cs file and search for the text "Page_PreRender". You should find this line:

Code: Select all

protected void Page_PreRender(object sender, EventArgs e)
    {
Replace those two lines with this code:

Code: Select all

protected void Page_PreRender(object sender, EventArgs e)
    {
    //BEGIN MOD: AbleMods.com
    // Show Free Shipping image if product qualifies
    foreach (ProductCustomField _PCF in _Product.CustomFields)
        {
            if (_PCF.FieldName == "freeship")
                {
                    if (_PCF.FieldValue == "True")
                        {
                            this.Controls.Add(new LiteralControl("<img src='/images/freeship.gif'/>"));
                            break;
                        }
                }
        }
        // END MOD: AbleMods.com
Double-check your copy/paste efforts and save the file. You'll notice I didn't add text to the page, what I added was a reference to an image file. Images draw attention far better than text. You want to make sure this free-shipping deal is something your visitors notice. So, find or create a small graphic image you want to use to represent your free shipping. Store in your store ~/Images/ folder and name it freeship.gif. Or change the above code to represent the image file name you want to use. Don't want an image? No problem, just take out everything within the double-quotes and replace it with the text you want to say like "FREE SHIPPING available on this product!". Any HTML is possible within the double-quotes so feel free to experiment.

The image (or text) will appear directly below the add-to-cart button. Feel free to play with the size of the image to suite your particular site design needs.

The Next Step

Now that you've gone through the entire process of adding a product custom field, you probably have some questions. Here are some common questions and answers to help you get further:

Q: What if I want a text box instead of a checkbox? I have several possible values for a single custom field.

A: No problem. On the EditProduct.ascx page, you're going to add an <asp:Textbox> control instead of a checkbox. Then in the EditProduct.ascx.cs Page_Load() code, make sure you change the "chk_freeship.Checked" to "chk_FreeShip.Text". Then change the AlwaysConvert.ToBool() function to AlwaysConvert.ToString(). In the SaveButton_Click() function change the chk_FreeShip.Checked.ToString() to chk_FreeShip.Text. Finally, on the BuyProductDialog.ascx.cs page, change the line that looks for "= True" to " = whateveriwant". It'd be easier to code a dropdown list but that goes beyond the scope of this document.

Q: What if I want more than one custom field? I have lots of needs!

A: Easy as pie. Duplicate all the code you've done for each unique custom field you want. Just be sure to use different names for each one so they don't overlap or confuse the web server.

Q: This seems like a lot of work for one custom field. Why again didn't we use a product template?

A: How many product records did you have to edit so they would show a free shipping checkbox? I thought so.

Conclusion

Able went to a lot of trouble to design an excellent database structure. By leveraging this structure in ways that go beyond the admin pages available, you find all sorts of new ways to enhance your storefront. In this project, we've added a nifty checkbox to the edit-product page. When the checkbox is checked, an enticing graphic is automatically displayed on the visitor-side product page to indicate free shipping is available. This same concept can be applied to other product-specific situations like flat-rate shipping or in-store purchase required. The possibilities are endless.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

ZLA
Commodore (COMO)
Commodore (COMO)
Posts: 496
Joined: Fri Mar 13, 2009 2:55 pm

Re: How to add a Product Custom Field

Post by ZLA » Mon Aug 17, 2009 7:55 am

Where is the Able Commerce documentation on product custom fields? That is where in the wiki or help sites does it exist?

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: How to add a Product Custom Field

Post by AbleMods » Mon Aug 17, 2009 8:04 am

If history is any indicator, You're looking at it. Able hasn't posted very many articles on specific DAL components. Their articles tend to be more generalized.

You can find the API reference guide here http://wiki.ablecommerce.com/index.php/ ... uilder_API - look for the link "compiled help file". It's pretty thick reading though, I find it much easier to explore the classes using Visual Studio.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

ZLA
Commodore (COMO)
Commodore (COMO)
Posts: 496
Joined: Fri Mar 13, 2009 2:55 pm

Re: How to add a Product Custom Field

Post by ZLA » Mon Aug 17, 2009 8:22 am

Up till now, I've used product template merchant / customer fields for my customizations because that's what the documentation and forums have shown me so far. I might have done some things differently if I known product custom fields existed at the beginning of my current project.

At least it was Able Commerce's oversight rather than my own.

Thanks for all of your posts Joe.

BTW, with hindsight, I have one difference of opinion with you on how to customize (style) a site. Once you handle the header and footer and such, I would not use the home page as the page to style and customize when starting out. I would use the product category and product detail pages as they will probably be more standard across the site than the home page. It also lets the user get more familiar with how AC breaks a page up than the home page. Just a thought.

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: How to add a Product Custom Field

Post by AbleMods » Mon Aug 17, 2009 8:38 am

No problem. The question came up in another post and it seemed a good topic.
ZLA wrote:BTW, with hindsight, I have one difference of opinion with you on how to customize (style) a site. Once you handle the header and footer and such, I would not use the home page as the page to style and customize when starting out. I would use the product category and product detail pages as they will probably be more standard across the site than the home page. It also lets the user get more familiar with how AC breaks a page up than the home page. Just a thought.
I'm not sure I follow you. I don't remember making any recommendations about how to style a site. I'm terrible at site design and page layout.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

ZLA
Commodore (COMO)
Commodore (COMO)
Posts: 496
Joined: Fri Mar 13, 2009 2:55 pm

Re: How to add a Product Custom Field

Post by ZLA » Mon Aug 17, 2009 8:48 am

My mistake. I remembered your heavily modified AC7 forum post and mixed it up with AC's comments on how to approach a site's customization. They suggested that you customize the header and footer and home page look and feel. Apologies. :oops:

mkeith1
Commander (CMDR)
Commander (CMDR)
Posts: 120
Joined: Wed Jul 25, 2007 12:46 pm
Contact:

Re: How to add a Product Custom Field

Post by mkeith1 » Thu Aug 27, 2009 9:19 am

Ok, one question i have is, "how do you populate customized fields using dataport 7.0.3? I want to add 3 text fields to each product, and i want to be able to populate those 3 fields using dataport.

As a side note is anyone out there able to help me make those three fields searchable?

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

Re: How to add a Product Custom Field

Post by mazhar » Thu Aug 27, 2009 7:42 pm

Quick answer would be to simply set some custom field for a product and then make XML product export and then inspect exported XML. This will help you understand and will provide you a visual example about how you can modify XML to import custom fields via DataPort.

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: How to add a Product Custom Field

Post by AbleMods » Thu Aug 27, 2009 9:14 pm

Does Dataport support exporting the ProductCustomFields class now?
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

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

Re: How to add a Product Custom Field

Post by mazhar » Sun Aug 30, 2009 8:31 pm

Yep, it import/export product custom field data along with respective products.

mkeith1
Commander (CMDR)
Commander (CMDR)
Posts: 120
Joined: Wed Jul 25, 2007 12:46 pm
Contact:

Re: How to add a Product Custom Field

Post by mkeith1 » Mon Aug 31, 2009 10:23 am

Once I add custom fields, can i still use DATAPORT to import new items in a .csv format?

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

Re: How to add a Product Custom Field

Post by mazhar » Mon Aug 31, 2009 6:38 pm

CSV import/export don't support product custom fields. In order to import/export product custom fields you need to make use of XML import/export.

Mike Callaway
Ensign (ENS)
Ensign (ENS)
Posts: 2
Joined: Thu Sep 03, 2009 7:50 pm

Re: How to add a Product Custom Field

Post by Mike Callaway » Thu Sep 03, 2009 8:00 pm

This is a great frunction. I would like to use this for serveral display options. I tried the code and it works great for 1 custom feild. I could get multiple feilds to display in the product edit window. I could only get 1 to save the check box. Could you please show the code in the .cs sheet to save more than one feild.

Thanks Mike

Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Re: How to add a Product Custom Field

Post by Mike718NY » Fri Sep 25, 2009 11:59 am

This works great and thanks. But I need to update fields in the database using the Custom Field.
The code I added has this very weird problem:
When I first check the Checkbox and click "SAVE", the field "Engraving" is updated in the database
but the field "ProductTemplateId" is not and the template doesn't get added.
But if uncheck the box, SAVE it, . . then check the box again, SAVE it a second time,
it works and the "ProductTemplateId" is updated to "4".

The only thing I noticed using a breakpoint is this code part:

Code: Select all

          foreach (ProductCustomField _PCF in _Product.CustomFields)
          {
            if (_PCF.FieldName == "freeship")
            {
              _PCF.FieldValue = _FreeShipValue;
              _PCF.Save(); 
is skipped over on the first SAVE but is run only on the second SAVE.
I can't understand why it's doing this. Anyone have any clues? Here's the code:
(Yes I know hard coding values is bad practice but this will save the user time)

Code: Select all

        if (Page.IsValid)
        {
          // BEGIN MOD: AbleMods.com
          bool _PCFExists = false;
          string _FreeShipValue = chk_FreeShip.Checked.ToString();

          //     ***** ADDED THIS TO UPDATE DATABASE ****************************
          string query = string.Empty;
          if (_FreeShipValue == "True")
          {
            query = "UPDATE ac_Products 
                     SET ProductTemplateId = 4, Engraving = 1 WHERE ProductID = " + Request.QueryString["ProductId"];
          }
          else
          {
            query = "UPDATE ac_Products 
                     SET ProductTemplateId = NULL, Engraving = 0 WHERE ProductID = " + Request.QueryString["ProductId"];
          }
          Microsoft.Practices.EnterpriseLibrary.Data.Database database = Token.Instance.Database;
          System.Data.Common.DbCommand updateCommand = database.GetSqlStringCommand(query);
          int result = (int)database.ExecuteNonQuery(updateCommand);
          //     ***** TO HERE ****************************

          foreach (ProductCustomField _PCF in _Product.CustomFields)
          {
            if (_PCF.FieldName == "freeship")
            {
              _PCF.FieldValue = _FreeShipValue;
              _PCF.Save();
              _PCFExists = true;
              break;
            }
          }
          if (!_PCFExists)
          {
            ProductCustomField _NewPCF = new ProductCustomField();
            _NewPCF.ProductId = _Product.ProductId;
            _NewPCF.FieldName = "freeship";
            _NewPCF.FieldValue = _FreeShipValue;
            _NewPCF.Save();
          }

          // END MOD: AbleMods.com

User avatar
igavemybest
Captain (CAPT)
Captain (CAPT)
Posts: 388
Joined: Sun Apr 06, 2008 5:47 pm

Re: How to add a Product Custom Field

Post by igavemybest » Mon Oct 12, 2009 8:53 pm

Joe,

Does this create a new field in the database?

Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Re: How to add a Product Custom Field

Post by Mike718NY » Wed Nov 04, 2009 10:55 am

The custom fields you add in EditProduct.aspx will not appear
on the AddProduct.aspx page when adding a new product.
I'm guessing I need to repeat this code on that page too.

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

Re: How to add a Product Custom Field

Post by mazhar » Thu Nov 05, 2009 4:23 am

Yes Add/Edit are two different pages if you want to have this on both then you would need to merge changes on this page too.

platterat
Ensign (ENS)
Ensign (ENS)
Posts: 19
Joined: Mon Sep 19, 2005 9:00 pm
Location: casper, wy
Contact:

Re: How to add a Product Custom Field

Post by platterat » Sun Mar 28, 2010 5:50 pm

This was very helpful and it worked for me, but wondering if it is possible to add free Shipping check box so it will show in batch edit and what code I would change to make it work? This would save folks a lot of time that have numerous products.
Mark

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: How to add a Product Custom Field

Post by AbleMods » Mon Mar 29, 2010 4:55 am

platterat wrote:This was very helpful and it worked for me, but wondering if it is possible to add free Shipping check box so it will show in batch edit and what code I would change to make it work? This would save folks a lot of time that have numerous products.
It's possible however it's very complex. The shipping charges are calculated via subroutines in the compiled DLLs. Without full source code, you aren't able to fully control the shipping calculations and thus cannot control it.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

tariqjamil
Ensign (ENS)
Ensign (ENS)
Posts: 5
Joined: Thu Oct 07, 2010 1:47 pm

Re: How to add a Product Custom Field

Post by tariqjamil » Fri Oct 08, 2010 1:42 pm

is there any way customer can buy product without creating an account and login.

any help is greatly appreciated.

Regards,
haroon

User avatar
s_ismail
Commander (CMDR)
Commander (CMDR)
Posts: 162
Joined: Mon Nov 09, 2009 12:20 am
Contact:

Re: How to add a Product Custom Field

Post by s_ismail » Sat Oct 09, 2010 5:51 am

tariqjamil wrote:is there any way customer can buy product without creating an account and login.
Yes it is possible. Go to ConLib/OnePageCheckout.ascx.cs and locate the following code
private bool _AllowAnonymousCheckout = false;
and replace with this one
private bool _AllowAnonymousCheckout = true;

WholesaleSally
Ensign (ENS)
Ensign (ENS)
Posts: 1
Joined: Mon Apr 25, 2011 2:28 pm

Re: How to add a Product Custom Field

Post by WholesaleSally » Mon Apr 25, 2011 5:03 pm

Hey, everyone. Sorry for my throwing myself in an older thread, but I wanted to thank you guys for all the info you provided. I'm pretty new to the AbleCommerce software (or any sort of order fulfillment / eCommerce shopping cart software, for that matter), so any sort of plug-ins, tricks and implementations is super helpful. The only issue is that it looks like a lot of programming; which I'm also new to. I'm starting up a wholesale cell phone parts business, so ultimately there are a lot of products to manage. Once I get the hang of this program, I'll check out this thread again and see how I can implement this. Gotta set up my inventory somehow. . . and my shopping cart.

Anyway, thanks everyone for all your help. Can't wait to meet you all soon. I know I'll need help in the future. ;)
Last edited by WholesaleSally on Tue Apr 26, 2011 9:48 pm, edited 1 time in total.
Sally

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: How to add a Product Custom Field

Post by AbleMods » Mon Apr 25, 2011 7:10 pm

WholesaleSally wrote:Gotta set up my inventory somehow. . .
DataPort has some excellent import features, be sure to check it out. You can find it here in the forums: viewtopic.php?f=61&t=15138

Welcome to the forums and good luck !
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

RKS_213
Lieutenant (LT)
Lieutenant (LT)
Posts: 69
Joined: Mon Dec 26, 2011 2:48 pm

Re: How to add a Product Custom Field

Post by RKS_213 » Mon Jan 02, 2012 11:28 am

I know this is an old thread (especially considering when it was initially posted) but I was wondering what I needed to change here to create a custom upload field for the admin UI. For example, each product will have it's own downloadable manual, safety brochure, etc. It's free and anyone can download. So it's not a product itself but a part of each product display and each manual is unique to each product. Therefore, the admin needs a way to upload this into each product when creating or editing products. I tried editing the editproducts.aspx but I don't know the proper asp:label, asp:hyperlick, or whatever. I thinkt he standard way is to have the field with a browse button that admins can use to locate the file on their computer and save it to the product that way. Hopefully this is something simple like asp:upload or something and that would be fantastic.

Even if no one is tracking this thread anymore, thanks for posting and sharing this information. It's great for people like me who are just now coming to the forums and starting to use AC.

RKS_213
Lieutenant (LT)
Lieutenant (LT)
Posts: 69
Joined: Mon Dec 26, 2011 2:48 pm

Re: How to add a Product Custom Field

Post by RKS_213 » Mon Jan 02, 2012 3:32 pm

Okay, in another thread someone mentioned I might be using an older version of AC. I have AbleCommerce 7.0.5 build 14053. Is this too old to use these tutorials here on the site?

All I ever get is Runtime errors. I followed the above posting EXACTLY. I just wanted to check and see if I was doing something wrong here. I didn't even get the Free Shipping bool or anything. All I got was Runtime Error. Maybe there's something else I should know about? Thanks.

Post Reply