-  Knowledge of the details of the electric field inside the shock is essential forunderstanding ion and electron dynamics. Theoretical modeling of the electric field distribution in the whole structured profile of a quasi-perpendicular collisionless high-Mach-number shock is a difficult problem. Ramp, however, is sufficiently narrow to be analyzed in a simple and efficient way. Behavior of the cross-shock electric field inside the ramp of low-Mach-number shocks and high-Mach-number shocks has a number of features which can be considered as common for most shocks. We reconsider the distribution of the cross-ramp electric potential in low-Mach-number shocks in close connection with the ion motion across the ramp. We derive the relation between the electric potential in the ramp and density of transmitted ions taking into account the narrowness of the ramp. The derivation is based on the ion equations of motion and does not require additional model assumptions. The relation is valid (at least as a good approximation) in a wide range of shock parameters and can be applied (with suitable corrections) to high-Mach-number shocks as well. If the ion and electron β are moderate, it is possible to establish a useful approximate relation of the potential to the magnetic field in the ramp. We suggest that using the derived relations may allow direct testing of the shock models by comparison of high-resolution electric field measurements with measurements of ion density and magnetic field across the ramp. On the other hand, the ion and magnetic field measurements may complete the electric field measurements, when they are insufficient alone (e.g., only two components are measured).