Select products and config values from MySQL
Several things...

Indentation

This: 

if ( $id != 0 ) {
try {
// etc.
} catch (PDOException $exception) { // to handle error
    echo "Error: " . $exception-&gt;getMessage();
}
    }


Would read easier as such:

if ( $id != 0 ) {
    try {
        // etc.
    } catch (PDOException $exception) { // to handle error
        echo "Error: " . $exception-&gt;getMessage();
    }
}


Comments

Many of your comments are of very little use, when the code speaks for itself. For instance:

    } catch (PDOException $exception) { // to handle error


Or:

// select all data


Or even:

// store retrieved row to a variable


SQL

You will save yourself and Mr. or Ms. Maintainer a good deal of grief if you format your SQL in a way that SQL programmers will be familiar with. For instance this:

$query = "SELECT p.product_id AS product_id, p.product_title AS product_title, p.product_description AS product_description, categories.category_name AS category_name, p.product_category AS product_category, p.product_image AS product_image, p.product_image_thumb AS product_image_thumb FROM products p LEFT JOIN categories ON p.product_category=categories.category_id WHERE p.product_id = ? LIMIT 1";


Could instead be: 

$query = "SELECT 
            p.product_id AS product_id, 
            p.product_title AS product_title, 
            p.product_description AS product_description, 
            categories.category_name AS category_name, 
            p.product_category AS product_category, 
            p.product_image AS product_image, 
            p.product_image_thumb AS product_image_thumb 
        FROM products p 
        LEFT JOIN categories ON p.product_category=categories.category_id 
        WHERE p.product_id = ? LIMIT 1";


I will say that it is good that you are using PDO. More experienced PHP programmers will hopefully have more to say about PHP code, I'm mostly a SQL guy.