Author Topic: Update add not active stock 2x on sql database  (Read 4715 times)

Offline Beyond2000

  • Newbie
  • *
  • Posts: 44
  • Karma: +7/-1
    • View Profile
Update add not active stock 2x on sql database
« on: August 08, 2018, 09:42:38 AM »
Good day
With all my efforts to pinpoint my problem of not all of the stock update on my update run I found the following issue.
I logged in on the C-panel and looked up the product line on the sql database. to my shock I have 1500 pages of 250 rows per page stock!!! I sorted it according to the SKU columb. There are about 80 to 100 lines of the same sku number. I delete for 3 hours and suddenly think I must do a test run on the update.
Then the SKU numbers I deleted appeared again 2 times and I ran the update only one time :( :( :( :(
attached is my mapping.

the update program also attached
my data file that I'm using to export is at the following link.

https://drive.google.com/open?id=19haJLxgt67MnL_R8j12SOoc-0WqQ70FY

Can you please use that files and settings and see on the sql database itself if the stock is getting more and more with each run like mine. On the abantecart where you add the stock it shows only once.
Please help

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4358
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Update add not active stock 2x on sql database
« Reply #1 on: August 10, 2018, 06:31:20 AM »
What table are you looking in the database?
Quote
There are about 80 to 100 lines of the same sku number.
This is not clear to me as product table is unique based on proiduct_id.

Are you updating or creating new records?
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline Beyond2000

  • Newbie
  • *
  • Posts: 44
  • Karma: +7/-1
    • View Profile
Re: Update add not active stock 2x on sql database
« Reply #2 on: August 10, 2018, 06:54:37 AM »
Hi
It is the product line.
I did a sql delete on where the date availale is = 000-00-00 and deleted 367 000 items today. I ran the udpate only one time and you can see the SKU table has again 2 times of each item in that was deleted (not active stock get added 2 times) it seems that acitve stock does not get added again

Offline Beyond2000

  • Newbie
  • *
  • Posts: 44
  • Karma: +7/-1
    • View Profile
Re: Update add not active stock 2x on sql database
« Reply #3 on: August 10, 2018, 07:13:42 AM »
I logged in again on both abantecart admin and the cpanel myphpadmin. I looked at one item added and cannot find it on the AbanteCart interface. It is on our stock file but I had not loaded it yet online. I cannot find it with the sku kode as i find all the loaded items and previously loaded unactive items. On the sql data i see the items. On AbanteCart I do not see the added items.
It is confusing. Why does the udpate add the stock 2 times that is not active and why can't I find it on AbanteCart and only on the sql database admin screen.

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5772
  • Karma: +274/-2
    • View Profile
Re: Update add not active stock 2x on sql database
« Reply #4 on: August 10, 2018, 07:31:54 AM »
First of all clear AbanteCart cache.
Also if in your import you miss or set wrong store_id possibly your products loaded to another store.
 

Offline Beyond2000

  • Newbie
  • *
  • Posts: 44
  • Karma: +7/-1
    • View Profile
Re: Update add not active stock 2x on sql database
« Reply #5 on: August 10, 2018, 08:15:01 AM »
Hi
I've cleared the cache before I started with my fautl finding and few times during. The stock adds on the SQL database 2 times every time I do the  System -> data -> import and with the settings on my mapping I loaded. I cannot pick it up at all on the abantecart admin side just on the sql database with the database SQL database tools NOT abantecart tools.

Offline Beyond2000

  • Newbie
  • *
  • Posts: 44
  • Karma: +7/-1
    • View Profile
Re: Update add not active stock 2x on sql database
« Reply #6 on: August 13, 2018, 02:35:38 AM »
Hi
This topic is the result of one post started 7 August 2017     
cronjob stock update missess lots of items

Started by proteaapteek

I cleared all the stock on the SQL database and the update ran 100%
Then I added new stock. The stock did not appear in the AbanteCart like I explained earlier in this post. But it shows in the SQL database. After running an update again some of the stock did not update correclty. It is certainly because it updated the on on the SQL database with another produckt code and not the one assigned when I added the stock.

I see there are a few product udpate programs. the one I've posted here is the one mentioned in my post about csv import and was modiefied acorind the link of

 http://forum.abantecart.com/index.php/topic,6613.msg27828.html#msg27828

talked about in
Re: CSV import wizard #1127
« Reply #14 on: May 28, 2018, 02:47:42 AM »
my last post about this was.

Good day.
I've done the 2 steps over of modifying the import_process.php file. The one in #1127 and #1128 and its works.

Please help .

Offline Beyond2000

  • Newbie
  • *
  • Posts: 44
  • Karma: +7/-1
    • View Profile
Re: Update add not active stock 2x on sql database
« Reply #7 on: August 31, 2018, 04:18:18 AM »
Please delete this posst as after update of abantecart to ver1.2.13  problem is solved.

Enjoy your day.

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5772
  • Karma: +274/-2
    • View Profile
Re: Update add not active stock 2x on sql database
« Reply #8 on: August 31, 2018, 04:20:06 AM »
Great you find a soltion

 

Powered by SMFPacks Social Login Mod