strife's devLog

Tag: prestashop 1.4.3

prestashop-logoHow to Add a New Custom Field in Prestashop

I’ve figured out how to add new field to database using Prestashop (1.4.3, but I think for the newer versions would be the same). This solution gives you new field in database and you will be able to edit / save data to this field in your admin panel, for my example I needed a field which was called “number of photos”. Below you can see how it works.
Read the full article »


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 :)