Jump to content

Bertrand

Members
  • Posts

    5
  • Joined

  • Last visited

Profile Information

  • Location
    France
  • Activity
    Developer

Recent Profile Visitors

2,515,416 profile views

Bertrand's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, I'm having a really strange problem with my Prestashop website (v 1.6.1.1) Default, and only available, language is French. Everything works as expected, and all the content is correctly displayed in French. BUT, in the last step of the order process, where the user must choose its preferred payment method, the content is displayed in English ! I'm using the theme "Leo Fashion Store". I've tried to switch to the "default-bootstrap" one, and content is displayed in French, except the Paybox payment option lines (Pay with CB / Pay with VISA / Pay with MasterCard). As I'm pretty new to Prestashop development, I'm not sure if this problem is related to the theme files, or Prestashop itself. Does anyone run into the same problem ? Bertrand
  2. You might need to know a bit more about Android and calling RESTful webservice. Here is a good tutorial that might help you : http://www.techrepublic.com/blog/android-app-builder/calling-restful-services-from-your-android-app/
  3. Hi, I also had troubles to figure out how to insert the API token in my HTTP requests. Here is the code that you have to use in order to be able to deal with the Prestashop WebServices in Android: First, create the DefaultHttpClient like this (API_AUTH_TOKEN is equal to your "mypasskey"): DefaultHttpClient client = new DefaultHttpClient(); AuthScope auth = new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT); UsernamePasswordCredentials apiToken = new UsernamePasswordCredentials(API_AUTH_TOKEN, ""); client.getCredentialsProvider().setCredentials(auth, apiToken); Then use it as usual for your different HTTP Request. For instance, here is my method to send HTTP Get request /** * Generic HTTP GET method sender * HTTP GET must be used to retrieve informations from remote PrestaShop database * @param apiMethod * @return the server response as string. This response must be parsed. */ private String sendHttpGetMethod(String apiMethod){ String url = BASE_API_URL + "/" + apiMethod; HttpGet get = new HttpGet(url); HttpResponse responseGet; try { responseGet = client.execute(get); InputStream is = responseGet.getEntity().getContent(); BufferedReader r = new BufferedReader(new InputStreamReader(is)); StringBuilder response = new StringBuilder(); String line; while ((line = r.readLine()) != null) { response.append(line); } return response.toString(); } catch (ClientProtocolException e) { e.printStackTrace(); return null; } catch (IOException e) { e.printStackTrace(); return null; } } I hope this will help you, Bertrand
  4. Ok I've found it The password is encode that way : md5( '_COOKIE_KEY_' + 'plain text password' ); See this thread for more information : http://www.prestashop.com/forums/topic/30984-password-encryption-psql-function/ The '_COOKIE_KEY_' is located in "settings/settings.inc.php" file of your prestashop folder
  5. Hi, I'm currently building an Android application that must connect to my Prestashop website. Here are the functionalities that I must develop : - Make the users able to login into my app using the same credentials as they have created on the website - Make new users able to create an account - Make the user able to see and edit his/her profile - Make the user able to buy some products directly from my app In order to do this, I've started to study the Prestashop Webservices. I've been through the different tutorials but I'm having some problem to figure out how to integrate the "login" functionality. Basically, I just want to check if the Webservice give me a "customer" object when I send a GET method like this : http://mywebsite.com/api/customers/?filter[email]=user@mail.com&filter[passwd]=my_password The thing is that the "my_password" value is encrypted in order to be saved securely in the Prestashop database. Thus, in the above request, I need to encrypt, in my app, the user password in order to get the same encrypted value that the one saved in the Prestashop database. Does anyone know how the password is encrypted? Am I choosing the correct solution to develop the login functionality? Thanks, Bertrand
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More