Jump to content

How to add new button on product page


Recommended Posts

it will be hard to achieve without additional module / customization of classes/controllers of prestashop.

here are several possibilities

 

1) template modification, add several many if conditions but it's not useful solution

{if tools::getValue('id_product')==1}

button 1

{/if}

{if tools::getValue('id_product')==2}

button 2

{/if}

etc...

 

2) customization of controllers (a bit complicated, you will need to add new field to database, exten product object in product.php class + back office theme modification) + product.tpl modification

3) some custom module to display contents for product page, i've got one but it's not free

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Can I create a module which will link to the product details page ? if yes then how can I place that in specific position ? Can you give some idea ? I want to create a radio button and select shipping option there in the product details page. Is there any module available by which I can achieve the task ? may be paid or free module ?

Link to comment
Share on other sites

well you can use product page hooks like:

 

productActions

productFooter

displayProductLeft

displayProductRight

ProductTabContents

ProducTab

 

but i have no idea how to create there delivery options field which will be used in cart. i think it will be a bit hard to achieve (with modifications of controllers)

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Sorry for late reply..

 

I want to add like this , on each product page there is option to "add to cart". But i have disabled that on my site. I have enabled only "Online Only" option. But in some Product i want to add one or two button like "Buy now from xyz.com" or Buy now From xy.com" above product description. where xyz and xy example of anyother site. and "buy now from xyz.com" is text of Button. My site (http://www.slmobileprice.com

or check image.

 

post-736821-0-12456900-1394210874_thumb.jpg

Link to comment
Share on other sites

im confused a little due to the fact that you attached image which shows product lists (i think listing of products associated with viewed category page)

 

so, if you want to add this button on list - it will be hard to achieve, but it's possible. The simplest solution:

add several if conditions to check product id, and depending on ID - display wanted button.

{if $product.id==10}
<a href="http://google.com">Visit google.com</a>
{/if}

if you want to display it on product pages (not products listings) you can achieve it with module like product page content blocks. It's much easier in use than modification of .tpl files with if conditions

Link to comment
Share on other sites

image not showing product list.. only one product...price is different because ..everysite selling that product in different prize.. as Sony Xperia neo V price in http://x.com is 17000 Rs, and in y.com is 16000 Rs., so i want to add these site link below product.

 

Ok let me check with this solution, then i will get back to you.

Link to comment
Share on other sites

 

 

image not showing product list.. only one product...

i only see a little part of whole page, so it's hard to say what part of store it shows.

i see there several prices with several buttons to external pages, so it looks like product-list.tpl file.

Link to comment
Share on other sites

  • 3 months later...
  • 7 months later...
  • 3 years 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...