Jump to content
thirty bees forum
  • 0

Editing carrier details creates a new id_carrier and deletes the old one


30knees

Question

I edited the price of two carriers and the id_carrier got changed and the old one deleted.

Specifically:

idcarrier 20 got replaced with idcarrier 29 idcarrier 21 got replaced with idcarrier 30 and then id_carrier 30 got replaced with 31

0_1511763720264_tb_carrier v2.JPG

This messes up modules that rely on the id_carrier and assume it stays stable.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

This behavior might be by design. The idea is probably that older orders are related to the older version of the carrier, while newer orders get the newer one.

The obvious assumption is that carriers don't change. Accordingly one has to set up carriers first, then configure these modules.

Can you give us an idea on why these carriers need changing?

Link to comment
Share on other sites

  • 0

All old prices can be kept in the old orders, for example.

Yes, this is one way of archiving history. The other one is to just store reference pointers, along with the unchanged reference its self. That's a design decision software developers have to do. Both approaches have advantages and disadvantages.

Prestashop took the choice to keep unchanged references. If some modules chokes on this I'd say they're simply not Prestashop or thirty bees compatible.

Link to comment
Share on other sites

  • 0

Case in point of how it was useful to me last week. I set up carriers on a site using a rate table 2 years ago. The guy calls me complaining about them not working correctly. Basically they were letting Canada orders through at US prices. He blamed me of course. So I checked everything and they were in fact broken. Then I looked at the database and I could tell they had been edited, because right when the issue started happening new carrier IDs were assigned to orders. So I knew it was not my fault and I charged him.

There are lots of other uses as well, but there is a real world use.

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