Jump to content

How can i get current product link on prestashop custom blocks?


Recommended Posts

Hi,  i'm trying to create a whatsapp button on prestashop. I want to send the link of the current product on whatsapp. I'm writing a code into a custom block.

My code is

<a href="https://api.whatsapp.com/send?phone=905xxxxx&text= <?php {$urls.current_url} ?>">

But  

<?php {$urls.current_url} ?>

 this section display as a text on web browser.

How can i get current product link on prestashop custom blocks?  Thanks  for help.

Sorry my bad English. 

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

On 2/3/2020 at 11:20 AM, ndiaga said:

Hi,

If  you are  in  a template  handled  by the  product  controller  you can  use:



{$product.url}

 

thanks for answer. I watched a video on youtube.  i wrote a simple a module. I solved my problem.

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