Hello,
There are products with a certain number of outputs
On-demand product search also selects the next option when out of stock
Sample:
If the product with 16 output is not available in stock, it moves to the next option.
“16”, “8-8” as
The following switch code is in the php file
I want to import this to the admin panel so that the admin options can be edited when needed
How should I do this?
I request your suggestion
switch($daire_sayisi){
case $daire_sayisi <= 8 : $hedefsecenek= array(
"8",
"12"); break;
case $daire_sayisi <= 12 : $hedefsecenek= array(
"12",
"16", "8-8"); break;
case $daire_sayisi <= 16 : $hedefsecenek= array(
"16", "8-8",
"20", "12-8"); break;
case $daire_sayisi <= 20 : $hedefsecenek= array(
"20", "12-8",
"24", "12-12", "16-8", "8-8-8"); break;
case $daire_sayisi <= 24 : $hedefsecenek= array(
"24", "12-12", "16-8", "8-8-8",
"20-8", "16-12", "12-8-8"); break;
case $daire_sayisi <= 28 : $hedefsecenek= array(
"20-8", "16-12", "16-8-8",
"32", "24-8", "20-12", "16-16", "16-8-8", "12-12-8", "8-8-8-8"); break;
case $daire_sayisi <= 32 : $hedefsecenek= array(
"32", "24-8", "20-12", "16-16", "16-8-8", "12-12-8", "8-8-8-8",
"24-12", "20-16", "20-8-8", "16-12-8", "12-12-12", "12-8-8-8"); break;
case $daire_sayisi <= 36 : $hedefsecenek= array(
"24-12", "20-16", "20-8-8", "16-12-8", "12-12-12", "12-8-8-8",
"32-8", "24-16", "20-20", "24-8-8", "20-12-8", "16-16-8", "16-8-8-8", "12-12-8-8", "8-8-8-8-8"); break;
case $daire_sayisi <= 40 : $hedefsecenek= array(
"40","32-8", "24-16", "20-20", "24-8-8", "20-12-8", "16-16-8", "16-8-8-8", "12-12-8-8", "8-8-8-8-8",
"32-12", "24-20", "24-12-8", "20-16-8", "16-16-12", "12-12-
continues…