It depends on the fare bucket or the site. Normally, most tickets will earn miles, but there are exceptions.
For instance, tickets ordered through the "Name your own Price" system on PL will not earn miles, but tickets ordered through their regular booking engine will.