if you intend to cryptographically encode it, that only shoots you in the foot. product id/name are neither sensitive data (otherwise you wouldn’t put them to display) nor do they trigger an modifying action. and a good part of your PHP scripts will need to work with (at least) the product id, so it should be easily accessible (not to mention that you couldn’t do something with it on the server level where PHP is not yet invoked).
though it still could be looked by viewing the html source if you want to be really secure so it can’t be viewed at all then another method is going to be needed, then someone else might know of something. Though I can’t what harm viewing the product name or id would do?