Jump to content

New Products on Homepage


Recommended Posts

How could new products be shown on the homepage? Particulary the list of products that shows when using the new products controller




I would like, that my homepage /index.php would automatically show the new products the same way as the link /index.php?controller=new-products shows. I already tried a redirect in .htaccess but it is not really working. Somehow I managed to make a Module and register it to the homepage hook (display home) with the new-products controller files copied to the module surprisingly it nearly works, but without the product-sort form on the top. Would there be another possibility?

Edited by TwoPenceCritter (see edit history)
Link to comment
Share on other sites

If Vekia's right I suggest you use ajax pagination when clicking on the sort. Have your module add a javascript file, and call your ajax file (which calls your module file) when clicking on the pagination. Then from the module's called method simply run a query that accepts the page number as parameter (optionally, the order by as well) and return the list. then fetch a template and replace the currently displaying list with the new page

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...