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
dennis3396677  
#1 Posted : Wednesday, April 14, 2021 12:45:53 PM(UTC)
dennis3396677

Rank: Member

Groups: Authorized User, Developers
Joined: 4/7/2021(UTC)
Posts: 18

I am trying to figure out how to add the Product Template field to the product display grid when viewing categories of products. On my old site using AC Gold, we used the Product Template to track product inventory status (shows as either In Stock or Out Of Stock). This may not be entirely ideal but works for our setup. I figured out how to add it when viewing each product individually, but I would also like it to display when viewing products in the Category grid like our old site did as well. TIA for any assistance!

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

shaharyartiwana25816656  
#2 Posted : Thursday, April 15, 2021 2:41:33 AM(UTC)
shaharyar

Rank: Advanced Member

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

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
You need to customize the product item display view that is used for the product listing.

As a workaround:
Open the file \Website\Views\Shared\_ProductItemDisplay.cshtml
Try adding the following line of code.

Code:
@Html.Action("ProductCustomFieldsDialog", new { parameters = new ProductCustomFieldsDialogParams() { ProductId = Model.Id } })
dennis3396677  
#3 Posted : Friday, April 16, 2021 10:10:51 AM(UTC)
dennis3396677

Rank: Member

Groups: Authorized User, Developers
Joined: 4/7/2021(UTC)
Posts: 18

Thank you for your reply. Is there a specific place in that file where that line of code should go? Or just at the bottom of the file?

Thank you!
shaharyartiwana25816656  
#4 Posted : Tuesday, April 20, 2021 1:27:45 AM(UTC)
shaharyar

Rank: Advanced Member

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

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
You can add this line where you want to display the product template values.
dennis3396677  
#5 Posted : Tuesday, April 20, 2021 10:34:12 AM(UTC)
dennis3396677

Rank: Member

Groups: Authorized User, Developers
Joined: 4/7/2021(UTC)
Posts: 18

This worked absolutely great! Thank you so much for your help and direction! I really appreciate it!
dennis3396677  
#6 Posted : Monday, April 26, 2021 10:27:43 PM(UTC)
dennis3396677

Rank: Member

Groups: Authorized User, Developers
Joined: 4/7/2021(UTC)
Posts: 18

I have a bug to report with this. While the method worked, I have a problem now when categories are clicked under the Browse Store link. Here is the error it throws:

A public action method 'ProductCustomFieldsDialog' was not found on controller 'AbleCommerce.Controllers.CategoryController'.

How can I fix this please?
shaharyartiwana25816656  
#7 Posted : Tuesday, April 27, 2021 7:59:57 AM(UTC)
shaharyar

Rank: Advanced Member

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

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Update the code from

Code:
@Html.Action("ProductCustomFieldsDialog", new { parameters = new ProductCustomFieldsDialogParams() { ProductId = Model.Id } })


to

Code:
@Html.Action("ProductCustomFieldsDialog", "Product", new { parameters = new ProductCustomFieldsDialogParams() { ProductId = Model.Id } })
dennis3396677  
#8 Posted : Tuesday, April 27, 2021 2:15:04 PM(UTC)
dennis3396677

Rank: Member

Groups: Authorized User, Developers
Joined: 4/7/2021(UTC)
Posts: 18

This worked great!!! Thanks so much for the follow-up and delivery on this custom request. The AC Dev team rocks!
Users browsing this topic
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.