Jump to content
GUNEZ

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)

Share this post


Link to post
Share on other sites
19 hours ago, GUNEZ said:

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

 

Hi,

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


{$product.url}

 

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
12 minutes ago, GUNEZ said:

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

 

you are welcom.

Share this post


Link to post
Share on other sites
17 hours ago, wanialai said:

Facing this issue will you please share the video url please to find the solution or anything where you got the solution.

I watched this video. www.youtube.com/watch?v=tvSQToK9PDc

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More