Cubecart: Display Latest Products First on Homepage

Cubecart: Display latest products first on homepage

I know I’m not doing everything by the book. I’m just finding my own workarounds for now and I’d like to share this information with anyone who also wants to display latest products first in Cubecart.

Normally, Cubecart first displays your Homepage document (the one you can edit within your dashboard), followed by the Latest Products. In my case, I actually wanted a shorter introduction and display the rest of the text below the latest products. In other words, I had to figure out how to display latest products first on homepage.

Display Latest Products First in Cubecart

To edit the homepage in Cubecart and change when the latest products are displayed, I went to the file: (skin)/templates/content.homepage.php

There, I looked up in the file were the homepage document is displayed, the document that you can edit within the dashboard of Cubecart. It is with this code:

{if isset($DOCUMENT)}
<div id=”content_homepage”>
{if $DOCUMENT.hide_title==0}<h1 class=”content-title”>{$DOCUMENT.title}</h1>{/if}
{$DOCUMENT.content}
</div>
<br>
{/if}

Here, I edited this code to display a welcome message for the Cubecart shop. I took out the PHP code and removed the inclusion for the homepage document to display. This is the code that displays the homepage content as you’ve set it up in your dashboard: {$DOCUMENT.content}

So, I went all the way down in the file and copy pasted this exact code at the bottom. The latest products are now displayed before the homepage message as edited through the admin dashboard.

Note: I use the theme ‘amzin’.

I hope I was able to make this clear and if you’re looking to customize your Cubecart homepage, I hope this helps!

This is also a note to myself, so that I don’t forget how to edit the homepage in Cubecart. :-)


♥ I hope my post was useful to you! If this post helped you solve your problem, please consider supporting me by making a small donation via my Ko-Fi page!

Visits: 2