HEX
Server: Apache/2.4.6 (CentOS) mpm-itk/2.4.7-04 mod_fcgid/2.3.9 PHP/5.4.16
System: Linux dvm.vladweb.ru 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: region-gk.ru (1016)
PHP: 8.2.27
Disabled: NONE
Upload Files
File: /home/bk/__backup/README
1. Simpla(Thank's) -> Okay(Thank's) -> Mgc (Magic)
2. Теперь админка задется произвольно, по умолчанию adminx


function getDeliveryPrice($orderItem, $deliveryId, $amount = false) {
	  $page = $orderItem->getItemElement();
	  $weight = $page->weight * ($amount ? $amount : $orderItem->item_amount);

	  if($deliveryId == 58271) { //АВИА ДОСТАВКА
		  if(1044*1.5+165*1.5*$weight < 1650) {
			  $deliveryPrice = 1650;
		  } else {
			  $deliveryPrice = 1044*1.5+165*1.5*$weight;
		  }

		   $deliveryPrice =  ceil(($deliveryPrice + $deliveryPrice * 0.15) * 100) / 100;
	  return $deliveryPrice;


	  }
	  if($deliveryId == 58273) { //ЖД ДОСТАВКА
		  if(40*$weight < 2200) {
			  $deliveryPrice = 2200;
		  } else {
			  $deliveryPrice = 40*$weight;
		  }
		    $deliveryPrice =  ceil(($deliveryPrice + $deliveryPrice * 0.15) * 100) / 100;
	  return $deliveryPrice<=3000?3000:$deliveryPrice;
	  }

	   $deliveryPrice =  ceil(($deliveryPrice + $deliveryPrice * 0.15) * 100) / 100;
	  return $deliveryPrice;
  }