(b) That's right. Merely showing a sample of something to a buyer does not make the transaction a 'sale by sample'. A sale is only 'by sample' when the parties agree to define the quality of the goods by reference to a sample. Where such an intention is shown to exist, the sale of goods legislation requires that the bulk of the goods must have the same qualities as the sample. See a list of the relevant sections.
In the present case, B showed the sample to A only for the purposes of choosing the colour. The other aspect of quality (the grade of the carpet) was decided by description. It was not therefore intended that the quality of the carpet be determined by reference to the sample, and the statutory term would not be implied into the contract.