PrestaShopCorp / dotpay

Dotpay payment module
1 stars 13 forks source link

hookPaymentReturn is_guest check #8

Closed pkarecki closed 9 years ago

pkarecki commented 9 years ago

[08-Feb-2015 16:16:28 Europe/Warsaw] PHP Notice: Undefined variable: is_guest in (...)\prestashop\modules\dotpay\dotpay.php on line 275

This error is caused by

if ($is_guest) $form_url=$this->context->link->getPageLink('guest-tracking', true);

in hookPaymentReturn.

Please advise how to determine if order was placed by guest?

Thanks, Piotr Karecki

gaillafr commented 9 years ago

Hi @pkarecki, to check if a customer is identified as guest you should check:

(bool)Context::getContext()->customer->is_guest;

Thank you, Kind regards.