News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

google sheet to virtuemart products

Started by karmicsynergy, June 25, 2013, 15:46:58 PM

Previous topic - Next topic

karmicsynergy

Hi

i was chatting with some of the google drive team and they told me that one of there partners has make a google script and php script that will sync a google sheet (spreadsheet) with mysql database

as you most developers know customer from business world are not the most computer literate people in the world but can use excel or smiler in there office

so i was wondering if anyone has any ideas on if and how i could sync a google sheets with virtuemart to add and update stock

AH

Yes it is pretty easy to connect to MYSQL tables using excel

Use this driver to facilitate the connection:-

http://dev.mysql.com/doc/refman/5.0/en/connector-odbc-configuration-dsn-windows.html

http://office.microsoft.com/en-us/excel-help/overview-of-connecting-to-importing-data-HP010342748.aspx#BMunderstanding_data_connections

http://office.microsoft.com/en-us/excel-help/use-microsoft-query-to-retrieve-external-data-HA010099664.aspx

I create local copies of the database for reporting and load/play using heidisql  http://www.heidisql.com/

You cannot update (from what I can figure) via excel so I have posted a starting piece of code that we used for order updates based on VM1.1

This gives the starting point (framework) to allow CSV files to be updated to a tmep table on the server and then processed to update orders into stock

It shows the contents of the file to be loaded and any not found  mismatches of records in the file to skus on the database

We use the odbc connected database to retrieve lve stock and product detail from which we create orders and eventually the CSV files for order input using these function in the PHP file


Note: All update code is run from our local machines and is NEVER placed on the servers!  That would be very insecure

[attachment cleanup by admin]
Regards
A

Joomla 3.10.11
php 8.0

karmicsynergy

Hi

sorry I took me so long to replay

I dont want to use excel but google docs product sheet ( googles spreadsheet app witch is smiler to excel ) and does interact with google scripts which is based on java script

and using google scripts i want to connect to some php on my server and update VM 2 products etc