logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
ray22901031  
#1 Posted : Friday, August 16, 2019 8:48:09 AM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 827

Thanks: 3 times
Was thanked: 13 time(s) in 13 post(s)
A really neat feature for product templates would be the ability to hide the information from the public when using merchant fields. Certain fields could be hidden from view, this will give us the ability to have custom fields at the product level for back-end info only. Those who have access to the database, can use a third-party tool like Crystal reports to be able to run reports using these fields as queries. Just a thought.

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

Katie S  
#2 Posted : Friday, August 16, 2019 4:38:56 PM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 423

Thanks: 4 times
Was thanked: 34 time(s) in 33 post(s)
We actually have a "Custom Fields" feature that developers often use, but there is not a built-in UI for it.

If you want to use Merchant Fields, then you should be able to delete the widget from the page and then the information won't appear for the retail user.

Thanks
Katie
Thanks for your support!

Katie
Secure eCommerce Software and Hosting
ray22901031  
#3 Posted : Friday, August 16, 2019 4:51:55 PM(UTC)
ray22901031

Rank: Advanced Member

Groups: Authorized User, Developers
Joined: 2/17/2019(UTC)
Posts: 827

Thanks: 3 times
Was thanked: 13 time(s) in 13 post(s)
Hi Katie,

Not displaying the product template would defeat the purpose of using product templates in the first place, although it would benefit users if you could create a template it's hidden from view by a simple check field.

We are just going to manipulate the database tables themselves, but can you provide information on the custom fields feature used by developers.

Thanks
mazhar  
#4 Posted : Thursday, August 29, 2019 5:22:29 AM(UTC)
mazhar

Rank: Administration

Groups: Admin, Administrators, HelpDesk, System, Authorized User, Developers, Registered
Joined: 10/5/2018(UTC)
Posts: 175

Thanks: 8 times
Was thanked: 17 time(s) in 15 post(s)
ac_Products table has an associated ac_ProductCustomFields table which allows you add custom fields to any product. In API codes you can access the associated custom fields for any product using following code
Code:


//GET THE PRODUCT ID FROM THE URL
            Product product = _productRepo.Load(productId);

            ProductCustomField pcf = new ProductCustomField();
            pcf.Product = product;
            pcf.IsUserDefined = true;
            pcf.IsVisible = false;
            pcf.FieldName = "Internal Tracking Number";
            pcf.FieldValue = "XYZ 123";
            product.CustomFields.Add(pcf);
            _productRepo.Save(product);

            var customField = product.CustomFields
                .Where(field => field.FieldName == "Internal Tracking Number")
                .FirstOrDefault();
            string internalTrackingNumber = customField.FieldValue;



Users browsing this topic
Guest
Similar Topics
AC 9.0.7 Product Custom Fields! (General Questions)
by pdsteiner8198692 12/6/2022 1:26:04 PM(UTC)
Product custom fields on product page (AbleCommerce 9 Bug Reports)
by judy at Web2Market 11/7/2018 8:16:22 AM(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.