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
judy at Web2Market  
#1 Posted : Monday, May 15, 2023 1:20:27 PM(UTC)
judy at Web2Market

Rank: Advanced Member

Groups: Developers
Joined: 11/7/2018(UTC)
Posts: 289

Thanks: 21 times
Was thanked: 5 time(s) in 5 post(s)
I've made a new widget that I want to display above the product tabs, (similar to how product custom fields shows below) but I'm missing something. If I put it at the top of the _ProductTabs view, it shows, but if I add it from design in the admin, it doesn't get triggered. Here is the start of the code in the controller
[RegisterWidget(DisplayName = "W2M Alt Format Product List", Category = WidgetCategory.Product, Description = "Displays a listing of alt format products")]

public ActionResult _W2M_AltFormatProductList(int ProductId =0)
{
if (ProductId == 0)
ProductId = PageHelper.GetProductId();


Here is the content of the view (someone else did this)
@if (ViewBag.HasProducts == true)
{
<div class="row grid" id="products">

@foreach (ProductModel product in ViewBag.Products)
{
<div>
@Html.Partial("_ProductItemDisplayAltFormat", product, new ViewDataDictionary
{})
</div>
}
</div>
}

What am I missing?
Thanks!

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

shaharyar  
#2 Posted : Tuesday, May 16, 2023 4:21:34 AM(UTC)
shaharyar

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)
Quote:
If I put it at the top of the _ProductTabs view, it shows, but if I add it from design in the admin, it doesn't get triggered


What I understand is that controller action method is not being called when its placed from admin.


CMS Changes made from the retail side take priority over the changes made from the admin side. I suspect you are facing the same issue.
Try to Reset the custom changes from Admin - Website - Customized Pages

Hope this helps.
Users browsing this topic
Guest (2)
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.