strife's devLog

Category: Snippets

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


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.


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.


mysql-logoMySQL: How to Round Prices to Nine Ninety Nine at the end (9.99)

Hi there,

Here’s the example how to round values to 9.99 at the end. For example if we have a price 45023.12 and we wanna change it to 45029.99, we should simple use this code:

See ya!