What Happened to the Whats New Feature?
What Happened to the Whats New Feature?
In Able Commerce 5.5, we had the What's New feature (newprods.aspx), where we could see all new products recently added to the site. I'm not seeing this in Gold. Is it there somewhere and I'm just missing it or was it removed. Was a VERY helpful feature.
Re: What Happened to the Whats New Feature?
I guess we just missed it years ago and no one has said anything. It came up in some discussions a few weeks back and I requested the feature. It will be in the next version of Gold R8.
Thank you for choosing AbleCommerce!
http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support
http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support
Re: What Happened to the Whats New Feature?
Thanks Katie. I have a client that I am upgrading from AC 5.5 to Gold and he misses it sorely, and we haven't even launched yet. It helps him in more ways than just customers seeing what he has added to his site lately, which he works on daily. I woudln't think it'd be too awfully difficult. Just run a query and display products sorted by date most recent,right?
-
- Commodore (COMO)
- Posts: 436
- Joined: Tue May 07, 2013 1:59 pm
Re: What Happened to the Whats New Feature?
I guess the closest thing in Gold would be in the Admin UI, you can go to the Products page (the blue t-shirt icon) and sort on the Last Modified column. That doesn't help for the store front, but it least it could help the store owner keep track of what he's been working on. You could customize the code on that page to show the CreatedDate field instead of or in addition to the LastModifiedDate field.
Jay
- ForumsAdmin
- AbleCommerce Moderator
- Posts: 399
- Joined: Wed Mar 13, 2013 7:19 am
Re: What Happened to the Whats New Feature?
This has been done for our next release.
Re: What Happened to the Whats New Feature?
Super! Thanks for listening! Looking forward to having the functionality back!
Re: What Happened to the Whats New Feature?
As a workaround for now, could my client create a custom category called "What's New" and simply add Latest Modified products to this category (along with the correct category the product belongs to)? Is there a way to assign multiple products to a category at once? How soon until this feature is available, realistically?
Re: What Happened to the Whats New Feature?
Does anyone have an idea when this former feature (What's New) will once again be available in AbleCommerce?
- ForumsAdmin
- AbleCommerce Moderator
- Posts: 399
- Joined: Wed Mar 13, 2013 7:19 am
Re: What Happened to the Whats New Feature?
In the very next release ... R8.
- ForumsAdmin
- AbleCommerce Moderator
- Posts: 399
- Joined: Wed Mar 13, 2013 7:19 am
Re: What Happened to the Whats New Feature?
If you can't wait for R8, use the following code to load the new products and display them in your custom control.
Code: Select all
public IList<Product> GetNewProducts(bool useDays, int numberOfDays, string sortExpression = "LastModifiedDate DESC", int maximumRows = 0, int startRowIndex = 0)
{
DateTime date = new DateTime();
if (useDays && numberOfDays > 0)
{
date = LocaleHelper.LocalNow.AddDays(-1 * numberOfDays);
}
ICriteria criteria = NHibernateHelper.CreateCriteria<Product>("P", maximumRows, startRowIndex, sortExpression)
.Add(Restrictions.Eq("P.DisablePurchase", false))
.Add(Restrictions.Eq("P.VisibilityId", (byte)CatalogVisibility.Public));
if (useDays)
{
Disjunction firstCriteria = new Disjunction();
firstCriteria.Add(Restrictions.Ge("P.CreatedDate", date))
.Add(Restrictions.Ge("P.LastModifiedDate", date));
criteria.Add(firstCriteria);
}
// LIMIT PRODUCTS BY USER GROUP RESTRICTIONS
var user = AbleContext.Current.User;
int[] groupIds = null;
if (user != null) groupIds = (from ug in user.UserGroups select ug.GroupId).ToList<int>().ToArray();
else groupIds = new int[0];
if (!user.IsAdmin)
{
if (groupIds.Length > 0)
{
Disjunction disjunction = new Disjunction();
DetachedCriteria secondCriteria = DetachedCriteria.For<ProductGroup>("PG")
.Add(Restrictions.EqProperty("PG.Product.Id", "P.Id"))
.Add(Restrictions.In("PG.Group.Id", groupIds))
.SetProjection(Projections.Property("PG.Group.Id"));
disjunction.Add(Restrictions.Eq("P.EnableGroups", false));
disjunction.Add(Subqueries.Exists(secondCriteria));
criteria.Add(disjunction);
}
else
{
criteria.Add(Restrictions.Eq("P.EnableGroups", false));
}
}
return criteria.List<Product>();
}
Re: What Happened to the Whats New Feature?
Thanks! I'll give this a go, if I can figure out where to implement it!
Re: What Happened to the Whats New Feature?
Ok, I am struggling with this just a bit. How do you add a custom control so that it shows up in the control list where I would add this code? A little guidance to get this up and running would be greatly appreciated! TIA!