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

2 Pages<12
Options
Go to last post Go to first unread
ray22901031  
#21 Posted : Saturday, May 2, 2020 9:06:08 PM(UTC)
ray22901031

Rank: Advanced Member

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

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
Thank you for your reply, since I'm just learning cshtml and razor, I am not sure how I would implement this in your existing code above.

Thanks again
mazhar  
#22 Posted : Saturday, May 2, 2020 9:37:32 PM(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)
I have updated my previous comment. You can simply use that entire code block and replace the following entire code block with it
Code:
@if (Model.ShowOurPrice)
{
}

Edited by user Saturday, May 2, 2020 9:38:06 PM(UTC)  | Reason: Not specified

ray22901031  
#23 Posted : Saturday, May 2, 2020 10:07:23 PM(UTC)
ray22901031

Rank: Advanced Member

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

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
You have gone beyond what you needed to do, and for that I am extremely grateful. Please note that I came very close to making the else statement work. Just wasn't sure where the default code block was. Hopefully in a couple of months when I become more familiar with razor, and this should be second nature to me.

Everything is fully functional, and I would recommend that this fix be included in any future release. More and more vendors are requiring merchants to use MAP pricing, and this might become a sticking point in the future for many new merchants.

Again you have gone beyond what was expected, and I applaud and thank your efforts.

-Ray
ray22901031  
#24 Posted : Saturday, May 2, 2020 10:09:42 PM(UTC)
ray22901031

Rank: Advanced Member

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

Thanks: 3 times
Was thanked: 15 time(s) in 15 post(s)
Just saw your last comment, could you please paste the entire code block, since all these curly brackets can be quite confusing for someone who is learning razor syntax?

Thanks
Users browsing this topic
Guest (3)
2 Pages<12
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.