Jump to content

Mobile application Post data to Prestashop by web service


yifeilyf

Recommended Posts

Hi guys,

 

I am working on a mobile application. I am doing signup page to help new customers to register their account. I already figure out post data to Prestashop database. I use the ionic framework with angular js. The following code is test code.

let body = "<prestashop><customer><firstname>yifei</firstname><lastname>luo</lastname><email>[email protected]</email><passwd>21312312</passwd><hear_from_us>Most</hear_from_us></customer></prestashop>" ;

// JSON.stringify(customerData)
this.http.post(link, body, {headers: headers}).map(res => res.json()).subscribe(data => {
console.log(data);
console.log(body);
}, (err) => {
console.log(err);
});

After I click signup button, this action triggers. When I check my API throughout API, I can see this (image 1), which means that my data post into the database successfully.

 

When I open my back office, I could see the new customer (image2). However, it does not show the status of enabling. When I click the edit button. I receive the error (image 3). I go through my file manager and find these code (image 4 and image 5).

 

 

Anyone could help about this.

 

Cheers,

Yifei

 

post-1389831-0-95821200-1497427355_thumb.pngpost-1389831-0-10435300-1497427370_thumb.pngpost-1389831-0-54043000-1497427385_thumb.pngpost-1389831-0-15734000-1497427402_thumb.pngpost-1389831-0-23404500-1497427421_thumb.png

 

update:

The first error solved. The second one is confused about "Notice on line 654 in file /home/linkarwi/public_html/tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code

[8] Undefined index: query" . The weird thing is that it is comment on 654 line????

Edited by yifeilyf (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Hello yifeilyf,

 

I am following your steps and I do not have your errors. The only difference is that I add to body parameters, id_default_group, group associations and active=1(to be enable automatically).

Maybe that error could be of something not related to webservice post.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...