php – how do i add the base price dynamically adjusted to the price scale?
i want to display base price dynamically adjusted to the price scale. The base price should adjust dynamiclly.
For example: FFP2 mask 10pc. Package Price: 4,40€
base price for this scale Price: 4,40/10pc = 0,44€
Quantity Price table:
from 100 packages. 5,35€
from 200 packages. 4,80€
from 300 packages. 4,40€
so the base price per pc should be adjust to the price at table for quantity when you change the qty like: 5,35/10= 0,535€; 4,80/10=0,48€ ; 4,40/10=0,44€
On Shop page should be show the lowest base price like here: https://hygiene100.de/. On the single product page the dynamic unit price as well as the package price should be displayed.
how can i best implement this? how should i proceed