• Closed by: Anonymous Submitter
  • Closed on:
  • Reason: Not a bug

Ticket #23672 - Whasapp

Hi Fred

By accessing whatsapp you are generating this url

https://api.whatsapp.com/send?phone=34602693817?ref=pkfacebook

and it should be this

https://api.whatsapp.com/send?phone=34602693817

can you please check it. Or you tell me how to fix it.

Thank you

Comments

Fred 17 Aug 2022, 17:54

Hi, José Antonio Huerta Jiménez.
Open the file /modules/pkfacebook/pkfacebook.php
find and remove the string around the line #576

?ref=pkfacebook
José Antonio Huerta Jiménez 17 Aug 2022, 19:02

Hi Fred,
Line 565 - end - > and it is not ?ref=pkfacebook


$tabs[] = (new PrestaShop\PrestaShop\Core\Product\ProductExtraContent())→setTitle($title)→setContent($content);

    return $tabs;
  }
  return (new PrestaShop\PrestaShop\Core\Product\ProductExtraContent())->setTitle($title)->setContent('<div class="alert alert-info">Facebook Comments is not configured</div>');
}
public function hookDisplayBeforeBodyClosingTag($params)
{
  if (isset($this->config['whatsapp_type']) && $this->config['whatsapp_type'] == 'personal')
  {
    $this->config['whatsapplink'] = isset($this->config['whatsapp_number']) ? 'https://api.whatsapp.com/send?phone='.$this->config['whatsapp_number'] : '';
  } else {
    $this->config['whatsapplink'] = isset($this->config['whatsapp_group']) ? 'https://chat.whatsapp.com/'.$this->config['whatsapp_group'] : '';
  }
  $this->context->smarty->assign('pkfacebook', $this->config);
  return $this->fetch($this->templates['endofpage']);
}
public function hookDisplayBackOfficeHeader()
{
  if (defined('_PS_ADMIN_DIR_') && (Tools::getValue('configure') == $this->name))
  {
    $this->admin_webpath = str_ireplace(_PS_CORE_DIR_, '', _PS_ADMIN_DIR_);
    $this->admin_webpath = preg_replace('/^' . preg_quote(DIRECTORY_SEPARATOR, '/') . '/', '', $this->admin_webpath);
    $this->context->controller->addCSS(__PS_BASE_URI__.$this->admin_webpath.'/themes/new-theme/public/theme.css', 'all', 1);
    $this->context->controller->addCSS($this->_path.'views/assets/css/admin.css', 'all');
  }
}

}

Fred 17 Aug 2022, 20:47

Sorry, my bad.
That was wrong file. I have already fixed that in this one

/modules/pkfacebook/views/templates/hook/endofpage.tpl
José Antonio Huerta Jiménez 17 Aug 2022, 23:51

Thanks a lot

José Antonio Huerta Jiménez 18 Aug 2022, 13:13

Hi Fred, Since I changed the domain and installed the theme again, I’m having the problem you solved in Ticket #23521. Can you look at it please or tell me what I have to do?

Fred 18 Aug 2022, 19:44

Try the following trick:
1. Open the file /themes/alysum/assets/js/libs/sharer.js and copy all code
2. Open the file /themes/alysum/assets/js/alysum.js and paste copied code before all existing code

José Antonio Huerta Jiménez 19 Aug 2022, 00:29

Thanks

Fred 19 Aug 2022, 09:12

You are welcome!