How the construction of contracts are done in contractual laws.

Contracts are usually created with many clauses set up by a drafter, however, even if the best drafter is hired, they can easily be defeated by court management controls that seek to strike unfair clauses down.
Whichever side you are on, usually the most powerful and controversial clauses would be perhaps Entire Agreement clauses, which would require contract management techniques to derive if there was indeed fairness in the contract creation.

Clauses that will provide a certain protection from suits from pre contractual representations:

Entire Agreement Clauses
Under the conditions and factual circumstances, can the defense for the contractor rely on an entire agreement clause to strike out previous; negotiations, representations, warranties
It is theoretically possible for an entire agreement clause to expressly preclude any reference to the factual matrix as an interpretative tool, allowing a cunning vendor to deal out faulty products or services with impunity.

If using English law or on english grounds, there is a possibility of bringing in UCTA (or other forms of clause control)
You must then check for the degree of reasonableness of the entire agreement clause, which may then depend on, inter alia,
(a) the relative equality of bargaining power between the parties;
(b) whether a party received an inducement to agree to the term, or in accepting it has an opportunity of entering into a similar contract with other persons without having to accept a similar term;
(c) whether the aggrieved party knew or ought reasonably to have known of the existence of the term (having regard, among other things, to any custom of the trade and any previous course of dealing between the parties); and
(d) whether it was reasonable or practicable at the time of the contract to expect compliance with the clause.
Alternatively most countries will have a sale of goods act regarding the sale of items to consumers or small businesses that would seek to remedy bad faith behaviors.

If not, we can look towards other provisions to see if there is indeed collateral contracts or pre-contractual representations.
There is the prosaic but time-honoured rule of thumb that a written contract articulated in precise terms cannot be varied or qualified by extrinsic evidence.
This "parol evidence rule" is usually statutorily encapsulated and prohibits the admissibility of any extrinsic evidence seeking to prove that the intention of the parties was other than that appearing on the face of the document.
It is also trite law that statements made in the course of negotiations for a contract may, if intended to be binding commitments, sometimes amount to a separate or collateral contract and be sued upon as such.
Such "collateral agreements" have been portrayed, and are reflected in statutes usually as exceptions to the parol evidence rule.

If you are the one making the contract, then you must take care to see if the clause you are intending to insert in will be held valid in the eyes of the law.
So you would probably want to know:
When would the courts circumvent your protection clauses?

They would decide upon the facts in the case and see if it qualifies itself as a collateral agreement, or as an exception.
To imply in on warranty is very popular and is done by "creating" or "finding" collateral agreements.
A collateral contract is one where the consideration is the entry into another contract, and co-exists side by side with the main contract.
For example, a collateral contract is formed when one party pays the other party a certain sum for entry into another contract.
A party to an existing contract may attempt to show that a collateral contract exists if their claim for a breach of contract fails because the statement they relied upon was not held to be a term of the main contract.

What could possibly be oral assurances amounting to a collateral term or a collateral contract?
An Oral warranty is defined as to being a representation that induces a party into contract

Dick Bentley Productions Ltd v. Harold Smith
representation... actually inducing him to act upon it, by entering into the contract, that is prima facie ground for inferring that it was intended as a warranty - Denning

City and Westminster Properties Ltd v Mudd
tenant induced to sign a new lease restricting use of premises to business purposes by the landlord's oral assurance that tenant could continue to live on the premises; landlord was prevented from forfeiting the lease against the tenant for doing so

Curtis v Chemical Cleaning and Dyeing Co Ltd
C took a wedding dress to CCD for cleaning and was asked to sign a 'receipt' exempting CCD from liability for 'any damage howsoever arising'; C did so after being assured that CCD's exemption was only in relation to any damage to beads or sequins on the dress. The dress was retained badly stained. CCD was not allowed to rely on the wide exclusion clause, but only to the limited representation.

What other loopholes must you look out for?
The following are some methods courts have used that may prove useful.
Overriding privity - Shanklin Pier Ltd v Detel Products Ltd
Detel's promise of paint properties supported by Shanklin consideration in directing its contractor to buy D's paint
Overriding unreasonable exemption clause
J Evans and Sons (portsmouth) Ltd v Andrea Merzario Ltd
A shipping contract was made with oral assurance goods would be shipped under deck.
In the end, goods were shipped on deck, and were lost overboard.
Oral assurance was treated as a breach of a collateral term qualifying the contractual document, rendering the liability exclusion clause within the document invalid

From a policy perspective, it should be reiterated that the courts will strive to give effect to the parties' expressed intent and their legitimate expectations. The courts seek to honour the legitimate expectations that the parties hold when they enter into a contract.

In summary, contract clauses perform useful roles as legitimate devices in allocating risk between parties, subject to an overriding judicial liberty to police clauses oppressively employed against people of unequal bargaining power.
In jurisprudential terms, the objective is to strike a happy medium, ensuring on the one hand that a dominant bargaining position is not abused, while on the other hand preserving freedom of contract and the fair allocation of risk.

If you are interested you can also read more about fraudulent inducement, where the law exerts controls over people who falsely influences people into contracts.