Jump to content

How to handle products in custom pages


Recommended Posts

Hello guys!

 

 

I have my custom page to use as a landing page.  I did creating PHP files, Controller, php (root) and tpl.

 

Now, I need to get the products at this page, either a category or a single product. The questions are: how do I get the products from this site? There are some tutorial or documentation for the handling of products?

 

PD: Im using PS 1.6

 

 

 

Thanks!  :)

Link to comment
Share on other sites

 

 

Now, I need to get the products at this page, either a category or a single product. The questions are: how do I get the products from this site? There are some tutorial or documentation for the handling of products?

there are no tutorial about that, but you can check how other controllers work.

for example, 

 

in .php file you have to create object with product:

 

$myproduct = new Product(21); //21 is an ID number of product

 

then you have to pass $myproduct variable to smarty array (with smarty->assign function)

 

now you will be able to display $myproduct variable informations in .tpl file

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