202-ecommerce / stripe_official

After years of hard work with Stripe connector for PrestaShop, 202 ecommerce stop the development of Stripe module on January 9th 2023. Thanks for all contributors that help us!
20 stars 20 forks source link

Backoffice - hookDisplayAdminOrderContentOrder problem #64

Closed carmas123 closed 3 years ago

carmas123 commented 3 years ago

There is a problem with 1.7.7.4 version of Prestashop, when we open an order into backoffice the template is not rendered. After some investigation I see that we need to change at row 1350 of "stripe_official.php"

FROM:

        $stripePayment = new StripePayment();
        $stripePayment->getStripePaymentByCart($params['order']->id_cart);

TO

        $order = new Order($params["id_order"]);
        $stripePayment = new StripePayment();
        $stripePayment->getStripePaymentByCart($order->id_cart);

This permit to have valid smarty parameters assignment. After that we cannot already see the correct tab:

image

This is because also into the hookDisplayAdminOrderTabOrder the $params does not contain "order" child, but only "id_order" and after whe have changed it to (at row 1334):

        $order = new Order($params["id_order"]);
        if ($order->module != 'stripe_official') {
            return;
        }

now all work fine.

image

mribeiro202 commented 3 years ago

Hello @carmas123

We are going to reproduce and correct this bug. Thank you for your help.

mribeiro202 commented 3 years ago

Hi @carmas123 The latest version of Stripe (v2.3.2) is now available, since this afternoon. Maybe you could try to update the module, we have corrected this problem.

Have a nice day.

mribeiro202 commented 3 years ago

Hi @carmas123

I take the liberty of closing this issue, do not hesitate to reopen if necessary.

Have a nice day