Jump to content

[HELP] How to create custom mysql requests to display a list of products ?


Recommended Posts

hi all !

first, excuse me for my not-perfect english, i'm french :)

ok, so i've just started with prestashop and never worked with templates and smarty before, so it's a little bit hard for me.
i have created my own theme for a e-commerce website where my client will sell silver/gold rings for weddings.

my problem/answer is :
in the first page, index.tpl, i have to display 3 lists of products :
1) one selected product (selected by his id, by exemple), in big
2) 3 random products, in small
3) the 3 last products

so, how can i do this?
what did i have to do in the index.php file, and in the themes/mytheme/index.tpl file?

in the "themes/mytheme/product-list.tpl" file by exemple, we just have this foreach while :

    {foreach from=$products item=product name=products}



and then we put our html code to display the thumbnails/product name/price/etc...

if i can have an equivalent thing for each one of the three lists on my index page, it can be just wonderfull!! :)

any help is really welcome ! :)

have a nice day all,

jb

Link to comment
Share on other sites

  • 3 weeks later...

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...