-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Hi thank you for the hard work and an excellent module !
In the last few versions i'm encountering errors on the
Orders > Orders > View (+) Page
It seems the cuplrit is the
[Connect to customer account] Button
I needed to make changes to the files :
everblock.php
Line 4599=> function hookActionGetAdminOrderButtons
/**
* Add buttons to main buttons bar
*/
public function hookActionGetAdminOrderButtons(array $params)
{
$order = new Order(
(int) $params['id_order']
);
if (Validate::isLoadedObject($order)) {
$everToken = $this->encrypt($this->name . '/everlogin');
$link = new Link();
$connectLink = $link->getModuleLink(
$this->name,
'everlogin',
[
'id_ever_customer' => $order->id_customer,
'evertoken' => $everToken,
'ever_id_cart' => Cart::lastNoneOrderedCart($order->id_customer),
]
);
/** @var \PrestaShop\PrestaShop\Core\Action\ActionsBarButtonsCollection $bar */
$bar = $params['actions_bar_buttons_collection'];
$bar->add(
new \PrestaShop\PrestaShop\Core\Action\ActionsBarButton(
'btn-info',
['href' => $connectLink, 'target' => '_blank'],
$this->l('Connect to customer account')
)
);
}
}
and
controller/front/everlogin.php
=> line 31
// 🔐 Sécurité du token
if (
!Tools::getIsset('evertoken')
|| $this->module->encrypt($this->module->name . '/everlogin') !== Tools::getValue('evertoken')
|| !Module::isInstalled($this->module->name)
) {
Tools::redirect('index.php');
}
Metadata
Metadata
Assignees
Labels
No labels