Fwh used for Prestashop shopcard (SOLVED)

Fwh used for Prestashop shopcard (SOLVED)

Postby Marc Venken » Wed Dec 14, 2016 11:54 am

Hey,

Does anyone used FWH for connecting to the popular shopcard Prestashop ?

I'm looking into connecting to it so I could stop using the import functions of Prestashop.
and change stuff directly.

I can read/open the files with phpMyAdmin, so it can be opend for sure with FWH and SQL

I didn't read into the differences yet like : SQL or ADO or Dolphin .... used be several in this forum.

The fact is that I will use Xbrowse as master data manipulation.

Any starting tips for with i should use ?

My level of programming is rather low :wink: , so I could go for SQL since I use this also in some php programs.
Last edited by Marc Venken on Fri Dec 16, 2016 9:15 am, edited 1 time in total.
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1425
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Fwh used for Prestashop shopcard

Postby Antonio Linares » Wed Dec 14, 2016 5:59 pm

Marc,

FWH already provide a built-in MySQL/MariaDB capabilities. You don't need any extra library.

Please review the docs:
viewtopic.php?f=3&t=33286&start=0
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42069
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Fwh used for Prestashop shopcard

Postby Marc Venken » Wed Dec 14, 2016 10:10 pm

Antonio,

I read some posts, and some speek of linking extra lib's (mayby fwh libs ?)

Also installing : mysql-connector-odbc-5.3.7-win32.msi came as a solution. (did install it)

Should I include something extra ?

Now I have these. I even think that i don't need all these includes...

#include "FiveWin.ch"
#include "report.ch"
#include "hbcompat.ch"
#include 'ord.ch'
#include "XBrowse.Ch"
#include "fileio.ch"


this code give a error. Should I activate some ODBC or so ?

Code: Select all  Expand view

function Presta()

   local oCn, oRs

   local cServer     := "http://www.kaboutersopglabbeek.be/"
   local cDataBase   := "mydatabasename"
   local cUser       := "myusername"
   local cPassWord   := "mypaswoord"


   ? "Start"
   oCn   := FW_OpenAdoConnection( { "MYSQL", cServer, cDataBase, cUser, cPassword }, .t. )
   if oCn == nil
      ? "Connection Fail"
      return nil
   else
      ? "Connected"
   endif

   oRs   := FW_OpenRecordSet( oCn, "ploegen2006" )
   XBROWSER oRs
   oRs:Close()
   oCn:Close()

return nil

 


Image
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1425
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Fwh used for Prestashop shopcard

Postby Antonio Linares » Thu Dec 15, 2016 8:38 am

Marc,

Just using

#include "FiveWin.ch"

compiles fine here.

I get the same error as you. We are reviewing it
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42069
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Fwh used for Prestashop shopcard

Postby nageswaragunupudi » Thu Dec 15, 2016 9:43 am

For MySql ADO to work, you need to download MySql ODBC connector from MySql site and install the msi file. Mr Marc Venken says he did it, but it appears not. He may please reinstall by way of caution.

Only #include "fivewin.ch" is enough.

Also please make sure that the server name, etc are correct.

If you have latest FWH versions, you do not need to do any of these things.

Just use FWH directly, without installing anything.
You may run this in fwh\samples\ folder
Code: Select all  Expand view

FWCONNECT oCn HOST cServer USER cUser PASSWORD cPassword DATABASE cDatabase
if oCn == nil
   ? "Failed to connect"
   return nil
else
   ? "Connected"
endif

oRs := oCn:RowSet( "ploegen2006" )
XBROWSER oRs
 


Important:
Please also let us know the FWH version you are using and ODBC connector version you download and install
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Fwh used for Prestashop shopcard

Postby Marc Venken » Thu Dec 15, 2016 12:13 pm

This version i have installed (instal with no errors, but I don't see if something changed)

mysql-connector-odbc-5.3.7-win32.msi

It was a link from your post somewhere on the forum.

The FWH version is : 16.11

Antonio has the same error on his system?
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1425
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Fwh used for Prestashop shopcard

Postby nageswaragunupudi » Thu Dec 15, 2016 12:42 pm

Antonio has the same error on his system?

That was because he did not install the connector.

If you are using 16.11, my sample should work, if the credentials (server name, etc ) are correct. You did not indicate the port number. Please make sure about port number also.

Please build and run the sample I provided in fwh\samples folder or copy \fwh\dll\libmysql.dll to your exe folder.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Fwh used for Prestashop shopcard (SOLVED)

Postby Marc Venken » Fri Dec 16, 2016 9:18 am

Running the sample in de samples folder of FWH .AND. using the buildh.bat file did it working.

Version 16.11 does not need the : mysql-connector-odbc-5.3.7-win32.msi to be installed as far as i see.

It seems that my build file and Mak file is not good, not linking all needed stuff? Have to look into it :oops:
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1425
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Fwh used for Prestashop shopcard (SOLVED)

Postby Antonio Linares » Fri Dec 16, 2016 9:29 am

Marc,

There are many makefiles examples in these forums

Search here for makefile
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42069
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Fwh used for Prestashop shopcard (SOLVED)

Postby Silvio.Falconi » Fri Dec 16, 2016 11:52 am

this feature I need also
a question I can use th esql archive of Prestashop directly on fw application or we must to converte on dbf and the reconverte into sql databse ?
I wish create a application because customer ask me th epossibility to change on local the clients,products,and print the order make on prestashop
I ask the gurus to make a teacher guide to use fwh and preestashop .Thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7034
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 92 guests