strife's devLog

prestashop-logoGetting Cart From Prestashop

If you have a problem with getting cart from prestashop that would be interesting for you.

I had a huge problem with Prestashop (version 1.4.3) because I didn’t know how exactly I should get cart from Prestashop to the WordPress or somewhere else. However I spent some time to resolve that issue and I wrote that:

First of all we should get session data from Pretashop:

As you see you should add some lines from Prestashop configuration and then you should create a function in which you have cart ID. And then you can easily get all data from the cart:

(Sorry for quality of code but I had to wrote this as  quick as possible)

And that’s all :)

Share
« Previous post

2 ResponsesLeave one →

  1. Thank you so much

    Reply

Leave a Reply