672 users online
Register
Log in
Shopping Cart
(0)
Home
Product
Overview
Features
Store demo
Screenshots
Showcase - live shops
Copyright Notice Removal
System Requirements
Roadmap
Contribute
Team Members
License
Downloads
Download nopCommerce
Extensions
Release Notes
Support
Documentation
Forums
Partners
Recommended Hosting
Solution Partners
Become a Partner
Community sponsorship program
My Account
Contacts
Tweet
Home
/
Forums
/
General
/
HTML, XHTML, CSS, Design Questions
/
Change font for some featured products on home page
Change font for some featured products on home page
Reply
dlna
Total Posts:
3
Karma:
15
Joined:
1/21/2012
Location:
United States
PM
Posted:
4 months ago
Quote
Hi,
I'd like to change the font for featured products for which the "Available end date" in Product Variant Info is past the current date.
So, for e.g. if the Available end date for a product is Jan 20, 2012 and today's date is Jan 21, 2012, then show the title of the featured item in gray on the home page instead of the default blue color.
Thanks in advance for your help.
0
Please
login or register
to vote for this post.
(click on this box to dismiss)
Ciwan
Total Posts:
510
Karma:
3302
Joined:
1/15/2011
Location:
United Kingdom
PM
Posted:
3 months ago
Quote
How familiar are you with MVC ? Cause you'll need to do some Date Checking, and that isn't really ideal in the View. Which means you'll have to set a flag in the ViewModels and do a checking on the controller.
Or at least, that is how I'd go about it, perhaps someone can confirm.
0
Please
login or register
to vote for this post.
(click on this box to dismiss)
nopCommerce v2.xx themes >> http://www.ncthemes.com
Want better front end features for nopCommerce 2.xx ? Vote up this >> http://nopcommerce.codeplex.com/workitem/10622
dlna
Total Posts:
3
Karma:
15
Joined:
1/21/2012
Location:
United States
PM
Posted:
3 months ago
Quote
Thanks for the response. Any pointers on what files I should look at? I'm using v2.3.
0
Please
login or register
to vote for this post.
(click on this box to dismiss)
Ciwan
Total Posts:
510
Karma:
3302
Joined:
1/15/2011
Location:
United Kingdom
PM
Posted:
3 months ago
Quote
Sure, the ViewModel sits in [ Nop.Web > Models > Catalog > ProductModel.cs ].
That is the ViewModel used in the Product Details Page (i.e. the page that you come to, if you clicked on a Product link on the homepage).
You might find the file easy to understand, or really confusing depending on your C# knowledge. But in a nut shell (in my method of doing it) you will need to add a new property, for example:
public bool IsBeyondDate { get; set; }
Then in your Catalog Controller, which sits in [ Nop.Web > Controllers > CatalogController.cs ] you will find the relevant ActionMethod [ ActionResult Product(int productId) ] and analyse that to see how it does its jobs (it calls other classes/services that do the hard bit) and from that how you can do the checking of the dates.
I hope that makes it clearer !! ;)
-1
Please
login or register
to vote for this post.
(click on this box to dismiss)
nopCommerce v2.xx themes >> http://www.ncthemes.com
Want better front end features for nopCommerce 2.xx ? Vote up this >> http://nopcommerce.codeplex.com/workitem/10622
dlna
Total Posts:
3
Karma:
15
Joined:
1/21/2012
Location:
United States
PM
Posted:
3 months ago
Quote
Thanks-- this helps.
Ciwan wrote:
Sure, the ViewModel sits in [ Nop.Web > Models > Catalog > ProductModel.cs ].
That is the ViewModel used in the Product Details Page (i.e. the page that you come to, if you clicked on a Product link on the homepage).
You might find the file easy to understand, or really confusing depending on your C# knowledge. But in a nut shell (in my method of doing it) you will need to add a new property, for example:
public bool IsBeyondDate { get; set; }
Then in your Catalog Controller, which sits in [ Nop.Web > Controllers > CatalogController.cs ] you will find the relevant ActionMethod [ ActionResult Product(int productId) ] and analyse that to see how it does its jobs (it calls other classes/services that do the hard bit) and from that how you can do the checking of the dates.
I hope that makes it clearer !! ;)
0
Please
login or register
to vote for this post.
(click on this box to dismiss)