Topic: Item Syncing

I'm not sure if anyone here can help me out or not but you seem like a smart bunch!

I have an OpenCart website that is synced to FrontAccounting using the Cartbooks syncing solution. I've loaded my 1000 products in OpenCart using Excelport (imported via excel spreadsheet). Everything works fine except for the fact that my products don't sync to FrontAccounting unless I "edit" & "save" a product in OpenCart backend. I don't even need to make changes to my product, just click "edit" & "save". Then it magically syncs to my FrontAccounting (upon loading the php sync page). I've talked to both Cartbooks & ExcelPort and obviously they're pointing the finger at each other. I can't manually edit & save 1000+ products.

Hope someone can help.

Thanks FrontAccounting! - Your software is awesome!!

Re: Item Syncing

It seems the synchronisation is triggered by the "save" action. Unfortunately, it also seems the import bypasses this completely.

I guess Cartbooks simply ignores products already in the database, until it detects an update (identified by a click on the "save" button). That means you would have had the same problem if your products had already been in the database.

I can see the following possible solutions:
1. Cartbooks could implement a "forced" sync option to upload all items currently in the database.
2. Excelport could import the items through the web interface, or at least generate a "save" click/event for each item to allow OpenCart and/or its plugins to respond to the change.

Both are features which would not be unreasonable to expect.

But if you have any programming background you could probably explicitly invoke the sync function of Cartbooks from a script of your own. Or at least script the clicking of the save button.

Re: Item Syncing

Thanks tm for your input! I would think the trigger, from what little I understand - would be the php page I load to do my initial sync. I really think the answer's in that page somewhere but don't know enough to know what I'm looking for. LOL

Here's the process.
1. Upload my excel sheet.
2. All products are automatically populated in opencart.
3. Enter the url in my browser to the initial sync php file.
4. Check FrontAccouting for my products. - hmm - Nothing there!?
5. Go back into OpenCart Admin, click "edit" on any product, click "save" on any product.
6. Run my php file again
7. Go to FrontAccounting - What do you know! The product I just edited magically appears (even though I technically didn't edit a thing).

So I don't think it's the "save" button that is the key to all this. It's likely the php file called sync-opencart-fa.php (which I'd be more than happy to send someone if they want to look at it).

Thanks again for your input! I've really got to figure this one out.

Mike

Re: Item Syncing

Aha. I may have misread your original post somewhat. So all synchronisation is triggered by that php page? And it only works for items which you have edited/saved from OpenCart?

Then it would have to keep track of previously synced items, presumably by looking at their "modified" timestamps. Are they set by the import script? Even so, if they are equal to the "created" timestamp they could be (wrongly, in this case) assumed to not need to be synced.

You could update them all from phpmyadmin (or whatever tool you use) by a simple SQL statement, like "UPDATE oc_product SET date_modified=NOW() where 1"

Re: Item Syncing

OMG tm! You are the smartest person on the planet!!! How will I ever repay you? I've been stuck on this for like 3 days straight. Now I can go to sleep!! LOL  THANK YOU THANK YOU THANK YOU!!!!

Re: Item Syncing

Thanks tm, I also will have to remember that little poke to the system. I have about 13,400 products to sync!