Jump to content
thirty bees forum
  • 0

tb_cart having non-existing id_carriers


30knees

Question

Hi,

I am having some weird behaviour. Some orders are displaying in tbcart idcarriers that don't exist. This does not affect tb_orders.

I have these carriers:

0_1511503669889_Carriers.JPG

In the database under tb_carriers I have all these entries:

0_1511503761758_tb_carrier.JPG

Question 1: Can I delete the ones that don't exist anymore?

But in tbcart some orders have three figure idcarriers:

0_1511503932122_tb_cart.JPG

Because the idcarriers for idcarts 307, 317, 319 don't exist, I'm getting problems where some action relies on the idcarriers entry in tbcarts.

Question 2: Does anyone have an idea where these idcarriers could be coming from/getting into tbcart (and not into tb_orders)?

Of the three carts, one was non-ordered/abandoned and two were PayPal orders using @mdekker new PayPal module (no idea whether coincidence or not - other PayPal orders have been processing fine).

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

Wow, 23 carriers and only 5 in use.

Without looking at the code, my guess is that carriers never get really deleted, but marked as deleted in the database. This way they stay available for older orders, which used these no longer existing carriers back then.

If you have no orders, yet, I see no reason to not delete them. Looking at the deleted flag in the tb_carrier table might give some insights.

Link to comment
Share on other sites

  • 0

The code in the paypal 6 module, in controllers/front/expresscheckoutconfirm.php, function assignCartSummary(), the assignment: $cart->idcarrier = arraykeys($deliveryOption)[0]

Could that be the problem? Other code in core that picks the id_carrier from deliveryOptions does it differently.

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...