<?php if ($item['action'] == 'transfer'): ?>
  <?php
  $parts = explode('.', $item['domain']);

  if (count($parts) == 2) {
      $extension = $parts[1]; // 'com' veya 'net' gibi
  }
  elseif (count($parts) == 3) {
      $extension = $parts[1] . '.' . $parts[2]; // 'com.tr' gibi
  }
  $domainPrices = $whmcs->GetTLDPricing($extension);
    ?>
  <div class="cart-item">
      <h4>Alan Adı Transferi</h4>
      <p id="service-duration-<?php echo $item['productId']; ?>" data-domain="<?php echo $item['domain']; ?>">
        <?php echo $item['domain'] ?> - Ürün / Hizmet - (1 Yıl) <usd>$<?php echo $domainPrices['register'][1]; ?></usd><try>₺<?php echo number_format($domainPrices['register'][1] * $currency_rate, 2); ?></try>
      </p>
      <div class="row">
        <div class="col-sm-10">
          <input class="form-control" type="text" name="" value="<?php echo $item['pers']['transferkodu']; ?>" placeholder="Lütfen transfer kodunuzu giriniz.">
        </div>
        <div class="col-sm-2">
          <form action="" method="post">
            <input type="hidden" name="delete" value="<?php echo $item['productId']; ?>">
            <button style="width:100%;" type="submit" class="btn btn-warning"><i class="fa-solid fa-trash"></i> Kaldır</button>
          </form>
        </div>
        <div style="display:none;">
          <span id="original-price-<?php echo $item['productId']; ?>" class="original-price">0.60</span>
          <span id="discounted-price-<?php echo $item['productId']; ?>" class="discounted-price">0.50 (%20 indirim)</span>
        </div>
      </div>
  </div>
<?php endif; ?>
