What's New By Date

Ask the community for help and support.
gabbysplaza
Posts: 37
Joined: Tue Oct 26, 2021 5:33 pm
Has thanked: 18 times
Been thanked: 2 times

What's New By Date

Post by gabbysplaza »

Merry Christmas!

I want to ask is there's anyway to have my what's new products listed by date product was added instead of the default listing by product id in the products table? I'm sure you are wondering why I want this. I want to be able to push a product to the top of listed of new products by manually altering that date it was added in the database.

Perhaps, there's a better way to control what's listed first instead of basing it in the product id?

Thanks for suggestions.
User avatar
Kofod95
VIP Member
VIP Member
Posts: 605
Joined: Sat Feb 06, 2021 7:38 pm
Has thanked: 80 times
Been thanked: 141 times

Re: What's New By Date

Post by Kofod95 »

1) Make a copy of: /includes/modules/content/index/cm_i_card_products.php and related files (template and language(s)
2) Replace "card_products" with whatever you think makes sense in the three files names and inside each of the three files
3) Change line 44 of your new module-file to something like

Code: Select all

order by p.product_added DESC
(I'm not at the PC at the moment, so the database field may have a different name).
4) Upload, install and configure your new module, and use admin to remove the core module

You have now created a module that does what you want. It will never be overwritten by updates, and it is easy to revert back to core functionality, if you would want that at some point.

Note: There is an addon for featured products, which might be better for what you want

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
raiwa
PhoenixCart Developer
PhoenixCart Developer
Posts: 1184
Joined: Sat Dec 21, 2019 8:08 am
Has thanked: 38 times
Been thanked: 102 times

Re: What's New By Date

Post by raiwa »

You could also add a sort order column to the products table, the correspondent input field in admin/include/actions/catalog/... and the sql modification for sort order in cm_i_card_products.php.php like explained above.
Public Phoenix Change Log Cheat Set on Google Sheets
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Need Help?viewtopic.php?f=10&t=27
14Steve14
VIP Member
VIP Member
Posts: 549
Joined: Fri Oct 25, 2019 7:01 pm
Has thanked: 8 times
Been thanked: 49 times

Re: What's New By Date

Post by 14Steve14 »

Also why not add the featured products addon. You can then add what ever products you like and have them shown when you like. You can even choose what pages they show on I believe.

The addon can be found here app.php/addons/free_addon/featured_products
gabbysplaza
Posts: 37
Joined: Tue Oct 26, 2021 5:33 pm
Has thanked: 18 times
Been thanked: 2 times

Re: What's New By Date

Post by gabbysplaza »

Thanks you all for your comprehensive replies and options. I try these out and see which works best for me. Thanks you!
gabbysplaza
Posts: 37
Joined: Tue Oct 26, 2021 5:33 pm
Has thanked: 18 times
Been thanked: 2 times

Re: What's New By Date

Post by gabbysplaza »

Hi All,

I'd like to remove the new products box on my index page so I can show more products with the featured products addon. How do I achieve this? I don't want to remove the new products module from my shop. I just want to remove it from the index page of my shop.
14Steve14
VIP Member
VIP Member
Posts: 549
Joined: Fri Oct 25, 2019 7:01 pm
Has thanked: 8 times
Been thanked: 49 times

Re: What's New By Date

Post by 14Steve14 »

gabbysplaza wrote: Fri Jan 14, 2022 3:06 pm Hi All,

I'd like to remove the new products box on my index page so I can show more products with the featured products addon. How do I achieve this? I don't want to remove the new products module from my shop. I just want to remove it from the index page of my shop.
That section of the index page is a module so go into your admin area - select the modules listing in the top bar, in the drop down select content. In the page that opens go down the list and select the New Products module that is in the Index section and click edit. Turn the option to false.

Leaving the New Products module selected in the index nested list will still show the new products in the categories area of the site.
gabbysplaza
Posts: 37
Joined: Tue Oct 26, 2021 5:33 pm
Has thanked: 18 times
Been thanked: 2 times

Re: What's New By Date

Post by gabbysplaza »

14Steve14 wrote: Fri Jan 14, 2022 3:22 pm That section of the index page is a module so go into your admin area - select the modules listing in the top bar, in the drop down select content. In the page that opens go down the list and select the New Products module that is in the Index section and click edit. Turn the option to false.

Leaving the New Products module selected in the index nested list will still show the new products in the categories area of the site.
Thank you so much @14Steve14 !

That's works great except the featured products only show first page of featured products. No next 1,2,3 etc for other products. I have featured products set to show 8 products per page. I only see the first page on my index but if I click the featured pages link, I see the first pages with pagination at bottom for remaining pages.
gabbysplaza
Posts: 37
Joined: Tue Oct 26, 2021 5:33 pm
Has thanked: 18 times
Been thanked: 2 times

Re: What's New By Date

Post by gabbysplaza »

I'm guessing Phoenix does not do pagination when it lands on index page? No worries, I can live with that.
ozeworks
PhoenixCart Developer
PhoenixCart Developer
Posts: 16
Joined: Tue Dec 21, 2021 2:58 pm
Has thanked: 5 times
Been thanked: 1 time

Re: What's New By Date

Post by ozeworks »

The featured products module shows the nominated number of items and then has a read more to go to a new page showing them all.

So I suggest your use that module as it more closely suits your needs.

But I would clone it as to make a new product module which will meet your needs 100%.
Post Reply