What Happened to the Whats New Feature?

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
VIPER7
Captain (CAPT)
Captain (CAPT)
Posts: 247
Joined: Fri Apr 15, 2005 2:49 pm

What Happened to the Whats New Feature?

Post by VIPER7 » Thu Apr 17, 2014 5:42 pm

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.

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: What Happened to the Whats New Feature?

Post by Katie » Fri Apr 18, 2014 8:58 am

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

VIPER7
Captain (CAPT)
Captain (CAPT)
Posts: 247
Joined: Fri Apr 15, 2005 2:49 pm

Re: What Happened to the Whats New Feature?

Post by VIPER7 » Fri Apr 18, 2014 10:58 am

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? :)

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: What Happened to the Whats New Feature?

Post by jguengerich » Mon Apr 21, 2014 5:52 am

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

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: What Happened to the Whats New Feature?

Post by ForumsAdmin » Wed Apr 23, 2014 12:41 am

This has been done for our next release.

VIPER7
Captain (CAPT)
Captain (CAPT)
Posts: 247
Joined: Fri Apr 15, 2005 2:49 pm

Re: What Happened to the Whats New Feature?

Post by VIPER7 » Thu Apr 24, 2014 3:24 pm

Super! Thanks for listening! Looking forward to having the functionality back!

VIPER7
Captain (CAPT)
Captain (CAPT)
Posts: 247
Joined: Fri Apr 15, 2005 2:49 pm

Re: What Happened to the Whats New Feature?

Post by VIPER7 » Tue Apr 29, 2014 9:05 am

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?

VIPER7
Captain (CAPT)
Captain (CAPT)
Posts: 247
Joined: Fri Apr 15, 2005 2:49 pm

Re: What Happened to the Whats New Feature?

Post by VIPER7 » Wed May 21, 2014 9:15 am

Does anyone have an idea when this former feature (What's New) will once again be available in AbleCommerce?

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: What Happened to the Whats New Feature?

Post by ForumsAdmin » Wed May 21, 2014 11:19 pm

In the very next release ... R8.

User avatar
ForumsAdmin
AbleCommerce Moderator
AbleCommerce Moderator
Posts: 399
Joined: Wed Mar 13, 2013 7:19 am

Re: What Happened to the Whats New Feature?

Post by ForumsAdmin » Wed May 21, 2014 11:22 pm

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>();
        }

VIPER7
Captain (CAPT)
Captain (CAPT)
Posts: 247
Joined: Fri Apr 15, 2005 2:49 pm

Re: What Happened to the Whats New Feature?

Post by VIPER7 » Thu May 22, 2014 7:21 am

Thanks! I'll give this a go, if I can figure out where to implement it! ;)

VIPER7
Captain (CAPT)
Captain (CAPT)
Posts: 247
Joined: Fri Apr 15, 2005 2:49 pm

Re: What Happened to the Whats New Feature?

Post by VIPER7 » Fri May 30, 2014 10:24 am

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!

Post Reply