AbleCommerce Forums
»
AbleCommerce
»
Content Management System
»
How to add Product Template under Product Listings in Grid
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!
|
|
|
|
Rank: Advanced Member
Groups: Admin, Developers, Registered, HelpDesk, Authorized User Joined: 10/5/2018(UTC) Posts: 704
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 } })
|
|
|
|
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!
|
|
|
|
Rank: Advanced Member
Groups: Admin, Developers, Registered, HelpDesk, Authorized User Joined: 10/5/2018(UTC) Posts: 704
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.
|
|
|
|
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!
|
|
|
|
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?
|
|
|
|
Rank: Advanced Member
Groups: Admin, Developers, Registered, HelpDesk, Authorized User Joined: 10/5/2018(UTC) Posts: 704
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 } })
|
|
|
|
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!
|
|
|
|
AbleCommerce Forums
»
AbleCommerce
»
Content Management System
»
How to add Product Template under Product Listings in Grid
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.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close