Jump to content

[SOLVED] How to add new square with info - product page


Recommended Posts

I want to add a new square on the product's page.
Inside it i want to display the contact email and phone numbers.

I want it to look just like the small square with short description, and i want to place it just below the 2 squares: short descriptions and add to cart.

I tried editing the product.tlp file, but no success.

How can i do that?

Link to comment
Share on other sites

Please remember that the moderators are volunteers. You can't ask many difficult questions and expect a quick answer to every one of them. I try my best to answer as many questions as I can in my free time, but I can only handle a couple of difficult questions a day. The moderators are here to help keep the forums organised and to provide information about Prestashop, not to do free programming. I choose to do free programming because I like to be helpful and want to contribute to making Prestashop the best it can be.

Anyway, back to the question. Just add the following code before line 288 (in Prestashop v1.2.5) of product.tpl in your theme's directory:

 

   Put your new div content here.



and then change the following line in the /* product.tpl */ section of your CSS on line 1849 (in Prestashop v1.2.5):

#primary_block #short_description_block {



to:

#primary_block #short_description_block, #primary_block #newdiv {



so that the new div is displayed the same way as the short description block and add the following:

#primary_block #newdiv { margin-top: 1.5em }



to add space above the new div. Change newdiv to something appropriate depending on the content of the div.

Link to comment
Share on other sites

Sorry, I wasn't really serious about that slow thing... I am most appreciative when it comes to voluntary work .... I try to help every here and there as well in the forum .... only the ones I think I know the answer to hehehe but hey I might be wrong ... anyway ... I have answered my own question, the one about the product list in grid view., it took me more than 24 hours to try every since thing.... and to think that I never have coded in CSS or PHP hahahah ... CSS is beginning to be fun ...

back to the post...

Great .... now I can put other links into the new box.... heheheh ..

Regards
Archproject

Link to comment
Share on other sites

Thank you very much for the solution.

It worked perfectly (although i had to make sure i put the new div into the correct position, because i modified the product.tpl code a little bit and the lines numbers weren't exactly as initially.)

P.S. I didn't want to upset you or any other moderator.

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