Jump to content

How to change the style and execute querys on the front product page


Recommended Posts

Hi!

 

I want to edit the appereance of my product page (the final one, where i can "add to cart" a product).

In particular, I want to add a calendar in it and i want to execute some querys for printing the results in the page.

Which files i need to override? I think i'm looking for a .tpl for the front part and a .php for executing the querys.

And, in that .php, how can i execute some querys?

 

I need to edit/add some javascript and css too.

 

Very thanks.

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

 

For the HTML code of the product page you can edit the following file:
 
/themes/YOUR_THEME/product.tpl
 
And for the PHP logic you can use the file at following path:
 
/controllers/front/ProductController.php
 
For adding the CSS and JS code you can do that in the product.tpl file itself.

 

 

Thnaks!

 

Because I'm a newbie with prestashop (and PHP object oriented programming) can you explain me quickly how can I execute some query in that php file?

I can create a public function in the ProductControllerCore class that executes some querys (like SELECT) and I already know how to assign the results to some variables but where I have to call the function that I created?

And then I will be able to use that variables into the product.tpl without problems (using smarty)? 

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