checkout / checkout-magento2-plugin

Checkout.com Magento 2 official extension
MIT License
32 stars 32 forks source link

Error on rendering Checkout page #541

Closed diogobox closed 9 months ago

diogobox commented 9 months ago

Hi, i have installed your latest version of the plugin on my magento store 2.4.3-p1 and when i tried to go to checkout it wasn't rendering anything. After investigation i found out that the problem was on the file Model/Checkout/Payment/OrderHistory.php where on the function getOrderHistoryObject on the part where you were quering the telephone attribute if this value was an array you guys were using eq instead of in to query the database.

if ($phone && $this->config->getValue(Config::KEY_ORDER_HISTORY_USE_PHONE)) { if (!is_array($phone)) $phone = [$phone]; $attributes[] = [ 'attribute' => 'shipping_o_a.telephone', 'eq' => $phone ]; $attributes[] = [ 'attribute' => 'billing_o_a.telephone', 'eq' => $phone ]; }

    `if ($phone && $this->config->getValue(Config::KEY_ORDER_HISTORY_USE_PHONE)) {
        if (!is_array($phone)) $phone = [$phone];
        $attributes[] = [
            'attribute' => 'shipping_o_a.telephone',
            'in' => $phone
        ];
        $attributes[] = [
            'attribute' => 'billing_o_a.telephone',
            'in' => $phone
        ];
    }`
diogobox commented 9 months ago

sorry wrong repository please delete this issue