strife's devLog

Tag: prestashop

prestashop-logo[Prestashop] How to Debug Prestashop API?

There are severals ways to make it right. Below I described my way of testing Prestashop API using cURL as the tool that checkes all dependencies. After enabling Prestashop API in your administration panel, save the API Key.

Depends what you want to check your xml files would be different. All possibilites you can find in the Prestashop API documentation, for instance: http://doc.prestashop.com/display/PS14/Chapter+4+-+Retrieve+Data+-+Retrieving+a+Client. Most important thing here is the XML file.

In our example we will add a new product to the Prestashop API. Here is ours XML file with data.

product.xml

Save it and execute command below.

Pretashop has RESTful API so it depends on the http methods that you would be able to add / edit or remove products.

Share

prestashop-logo[Prestashop] Adding Product Thumbnail to the Order Email

Find and open PaymentModule (directory classes).
There will be line similar to this (line 381).

We are adding the new cell to this table by getting product image from the database. Below you will the code.

Share

prestashop-logoHow to Change the Original Price in Prestashop

That’s a really useful snipet for anybody who wants to change the original price to the new one.

Solution for this is very easy …

Ok .. here it is:

Product.php, line 1686

:)

Share

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 »

Share

prestashop-logoPrestashop, Paypal Module Message Limit 1600

When you have a problem with paypal module in Prestashop. I mean that kind of problem when user come back from paypal.com:

You should edit Message.php (in classes) and change the limit of field. It’s line 54 and it should be look that:

And then you won’t have any problem with limits when user come back to your internet store.

Edited (03/03/2012)
I’ve noticed there are a lot of people who are finding this information. In addition I want to tell this problem shouldn’t appear in the new version of paypal module.

Share