magmi-git icon indicating copy to clipboard operation
magmi-git copied to clipboard

Severe bug with special price and other attributes in a multistore environment

Open ayalon opened this issue 9 years ago • 4 comments

I found a sever bug in the latest version of magmi and I need help from the devs to fix it @dweeves .

I'm running magmi in a multi-store environment.

I imported first the base data in the admin / base store. After the import, I created a second import file for a specific store holding some special prices.

Example: "store";"sku";"special_price";"special_from_date";"special_to_date" "mystore";"123456";"19.0500";"09.03.2016 00:00:00";"07.06.2016 00:00:00"

From then on, I debugged for a long time, why the indexer does not update the price index correctly and why in some cases ( grouped products) the special price is not correctly displayed. I saw the value in magento backend but it did not display in the frontend. I first thought, its a caching issue but it was not. As soon as I save the product in the magento backend, the prices are correctly displayed.

I then started to find the difference between the magmi import and the magento default saved values and I found the following:

If I import the row above, magmi correctly creates a row in the "catalog_product_entity_decimal" table for the price and for the store.

Because the base store has NO special price, for some reason, magento core creates another empty row for the base store with a null value. As soon as this row is there, everything works correctly.

Correct data from magento product save: image

Incorrect data from magmi: image

I need now help in fixing that. The problem is, that is additional row only is need, if there is no special price in the base store. If there is none, I have to somehow created this null value row.

The example is just for the special_price attribute, but also the date is affected. As far as I can see, it has become a problem for the special_price field.

Any ideas?

ayalon avatar Mar 15 '16 09:03 ayalon

Here is my proposed fix: https://github.com/ayalon/magmi-git/commit/d67ca07bc904e14dce56f9a2b3c2b207f3f6f60e

Diff https://github.com/ayalon/magmi-git/commit/d67ca07bc904e14dce56f9a2b3c2b207f3f6f60e.diff

ayalon avatar Mar 15 '16 10:03 ayalon

Can you issue a pull request so that i can integrate your fix ?

dweeves avatar May 04 '16 18:05 dweeves

I havae made a lot of changes in my fork. I have no clue how to create a pull request qith just one commit. Couldn't you just open the diff and apply the patch? @dweeves ?

ayalon avatar May 23 '16 22:05 ayalon

As this issue is still open: has the fix been applied in the current version?

simonrl avatar Apr 24 '17 07:04 simonrl