Jump to content

carrier problems


Refillman

Recommended Posts

Hello, newbie here đź‘‹

I’ve just upgraded my shop from PrestaShop V8 to V9 and I’m having trouble setting up my carrier.

Previously I had shipping configured as:

  • Paid delivery up to ÂŁ10
  • Free delivery for orders over ÂŁ10

Since the upgrade, I can only offer free postage. If I enable paid shipping, customers see the error:

       “Unfortunately, there are no carriers available for your delivery address.”

But if I remove the paid shipping rule, everything works fine.

Also, every time I try to set up the carrier, a “something went wrong” debug page appears.

Has anyone else experienced this after upgrading to V9? Any tips or fixes would be hugely appreciated.

Thanks in advance!

Link to comment
Share on other sites

  • 3 weeks later...

Greetings everyone,

 

I too am getting this error, have you any idea on how to fix it?

PrestaShop\PrestaShop\Adapter\Carrier\Repository\CarrierRepository::getOrdersCount(): Return value must be of type int, string returned

Link to comment
Share on other sites

  • 1 month later...
    public function getOrdersCount(CarrierId $carrierId): int
    {
        $qb = $this->connection->createQueryBuilder();

        $count = $qb->select('COUNT(*)')
            ->from($this->prefix . 'order_carrier', 'oc')
            ->where('oc.id_carrier = :carrierId')
            ->setParameter('carrierId', $carrierId->getValue())
            ->executeQuery()
            ->fetchOne();

        return (int)$count;
    }

Add (int)  to the $count

edit src\Adapter\Carrier\Repository\CarrierRepository.php

 

Edited by prestaholic
add note (see edit history)
  • Like 1
Link to comment
Share on other sites

I did notice in ps 9.0.0 and 9.0.1

admin-->experimental 

new carrier interface enabled by default, I disabled this as I prefered the original carrier interface.  I do not know if using experimental carrier creates other issues but I also had issue in 9.0.0 where 3rd party module not called when carrier associated to it.  I fixed the issue myself as one was not available on github yet, maybe now there is.  Hope this message in a bottle helps someone.


 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...