Jump to content

Need to Export Cart Data Using JSON Feed


StuartM
 Share

Recommended Posts

I've installed Prestashop and really look forward to using it. With that said, I've found myself at a road block. I need to export data from shopping carts to our manufacturing and distribution company. They need to be able to ping us using JSON to collect order data. I'll need to create a feed like the one below that they can use. Do you know how I can create a JSON feed that pulls from customers carts and that the distribution company can easily subscribe to?

 

Here's an example of what I'll need to provide:

 

{

"cart": {

"orders": [

{

"cart_id": "01",

"products": [

{

"id": "18",

"color": "54"

"quantities": [

{

"data": "Small",

"label": "S",

"quantity": "1"

},

{

"data": "Medium",

"label": "M",

"quantity": "0"

},

{

"data": "Large",

"label": "L",

"quantity": "0"

},

{

"data": "Extra Large",

"label": "XL",

"quantity": "0"

},

{

"data": "Double Extra Large",

"label": "2XL",

"quantity": "0"

}

]

},

],

"billing_info": {

"first name": "John",

"last name": "Doe",

"company": "Big Water Industries",

"address": "123 Test Rd",

"address 2": "Suite #405",

"city": "Orlando",

"state": "FL",

"zip": "32792",

"province": "",

"country": "USA",

"phone": "1235551234",

"email": "[email protected]"

},

"shipping_info": {

"first name": "Jane",

"last name": "Doe",

"company": "",

"address": "123 Banchory Dr.",

"address 2": "",

"city": "Orlando",

"state": "FL",

"zip": "32792",

"province": "",

"country": "USA",

"phone": "1235551234",

"email": "[email protected]"

},

"date_placed": "1312399800"

}

]

}

}

 

Does anyone know how I can implement this easily? Any help would be GREATLY appreciated.

 

If this should be in another section, feel free to move.

 

Thanks,

 

Stuart

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

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