I'm a newbie for PHP ecommerce applications. For my academic activities, I need to complete a shopping cart system with basic shopping cart functions. I have studied several apps which are already developed. I noticed that most of them are using encrypted product ids. I mean they are not just plain numbers. As I think the purpose is to make it ambiguous for those who see it and think about some malicious activity. Not related with the security directly.I know this is not suitable question for SO. I do not want any source code. Can anyone please answer to give me some light in this area?UpdateI might be wrong definitely. Should be a hash there. Please find this example product edit url. I really meant such a thing.example.com/product/dc85058a-a69e-11e5-e112-44da4901619b/edit
Purpose of encrypted product ID/key in shopping carts
php
The answer to your question, that number you are seeing is called a GUID.  Its a number format that can be generated quickly, and is mathematically just short of being guaranteed that neither yourself or anyone else will generate a new guid, with the same value.It is quite likely that this is used as the identifier in the database record for that product.  Its less likely that this is a manufacturers product number.My original answer is below, although no longer relates to the question that was asked.There are places during the on-line purchase where encryption, and security are critical.  In particular the interactions between the website and the on-line payment system are critical, for ensuring that the customer pays the amount that the merchant expects, and that the merchant can rely 100% on the payment system notification that a specific order has been paid.However, during the browsing and shopping phase, product ID's are just a way to identify the items that the customer is considering buying.  I see no value in making this part of the process more complex than it needs to be.What you may be looking at, is the cookie data.  If the shopping basket is being stored as a cookie, by the web browser then this would explain the use of encryption. It is good practice for cookie data to be encrypted.