AbleCommerce Forums
»
AbleCommerce
»
AbleCommerce 9 Bug Reports
»
ProductItemDisplay Manufacturer needs ? in link 9.0.6
Rank: Advanced Member
Groups: Developers
Joined: 11/7/2018(UTC) Posts: 303
Thanks: 21 times Was thanked: 5 time(s) in 5 post(s)
|
@if (ShowManufacturer && Model.Manufacturer != null) { <div class="branding"> <a href="@Url.Content("~/Search" + new { m = Model.Manufacturer.Id.ToString() }.ToQueryString())"> @Model.Manufacturer.Name </a> </div> }
There needs to be a ? after ~/Search like ~/Search?
|
|
|
|
Rank: Advanced Member
Groups: Developers
Joined: 11/7/2018(UTC) Posts: 303
Thanks: 21 times Was thanked: 5 time(s) in 5 post(s)
|
Also, I couldn't get the manufacturer to show until I populated it in the productsModel on the CategoryGridPage in the controller. Maybe I'm doing something wrong? When I stepped through the view, I got a value for the @Model.Manufacturer.Name @if (ShowManufacturer && Model.Manufacturer != null) { <div class="branding"> <a href="@Url.Content("~/Search?" + new { m = Model.Manufacturer.Id.ToString() }.ToQueryString())"> @Model.Manufacturer.Name </a> </div> }
I didn't understand what was going on, so I just took the path of least resistance and populated the manufacturer in the productsModel
|
|
|
|
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)
|
The code changes you did for populating Manufacturer Name are correct. It was not displayed in the view because ShowManufacturer will always be false. The display was initially handled from widget settings but we hide the option as the discussion was going on about the display position. Along with the changes in the controller, to fix the display issue you can enable to widget setting and then hide/show from the retail widget setting pop-up. 1. Open file E:\Workspace\AbleCommerce9\trunk\Website\Models\ProductModels.cs 2. Search for Code:[Browsable(false)]
[DisplayName("Show Product Manufacturer")]
[DefaultValue(false)]
[Description("If true manufacturer is displayed")]
3. Replace with Code:[Browsable(true)]
[DisplayName("Show Product Manufacturer")]
[DefaultValue(false)]
[Description("If true manufacturer is displayed")]
4. Compile the project
|
|
|
|
AbleCommerce Forums
»
AbleCommerce
»
AbleCommerce 9 Bug Reports
»
ProductItemDisplay Manufacturer needs ? in link 9.0.6
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