Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-4632

Update RegistrarModule to get pricing for specific TLDs

    Details

    • Type: Story
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5.0-b1
    • Component/s: None
    • Labels:
      None

      Description

      RegistrarModule::getTldPricing accepts only one argument $module_row_id. There is no option to limit the results by TLDs. This results in some pretty large inefficiencies, since registrars will fetch and format all available TLDs instead of only those required.

      In order to maintain backward incompatibility we'll need to create a new method to RegistrarModule:
      ```
      /**

      • Get a filtered list of the TLD prices
        *
      • @param int $module_row_id The ID of the module row to fetch for the current module
      • @param array $filters A list of criteria by which to filter fetched pricings including but not limited to:
      • - tlds A list of tlds for which to fetch pricings
      • - currencies A list of currencies for which to fetch pricings
      • - terms A list of terms for which to fetch pricings
      • @return array A list of all TLDs and their pricing
      • [tld => [currency => [year# => ['register' => price, 'transfer' => price, 'renew' => price]]]]
        */
        public function getFilteredTldPricing($module_row_id = null, $filters = []) { return $this->getTldPricing($module_row_id); }

        ```

      We'll use a generic $filters parameter to give more flexibility in usage and backward compatibility, though this may negatively impact clarity of usage.

      In addition we'll want to update registrars and the domain manager TLD sync to use this method for efficiency.

      Registrars should still fetch all available prices for caching, but only format and return prices that match the criteria. Caching should also be updated to store API results, rather than formatted list of prices (and thus the fetched cache results will need to go through formatting instead of being immediately returned).

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            abdy Abdy Franco
            Reporter:
            jonathan Jonathan Reissmueller
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              29/Jun/22

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 3 hours, 18 minutes
              3h 18m

                Agile