Jump to content

Solution To Domain Diferent Prices And Transfer Handling :)


PauloV

Recommended Posts

To Blesta Devs ;)

 

 

 

A quick and great way to work around of the main problems in Domains :)

 

 

 

[solution for Diferent Prices for Register/Transfer/Renew Domains]

 

 

We have seen, that we can on getPackageFields() create "types" on Modules, for exemple, only exists for now the type "domain" in domain modules.

 

Blesta can add 2 new types by default called:

 

domain_renew (with this type we can create diferent prices for domain renewing)

domain_transfer (with this type we can create diferent prices for domain transfer)

 

but for this to work correctly, blesta have to make some small changes to "order" plugin.

 

In order plugin blesta have to make some connection/verification if there is a type "domain_transfer", if exists that type, wen clicking on the "button transfer" will get the prices from the type "domain_transfer".

 

If we are registering a new domain, the type is "domain", after a domain is registered, wen a domain is added as "Active", have to be a function that change the "type" from "domain" to "domain_renew" to reflect the new prices on renewing domains. (this is only for "domain" type and not for "domain_transfer" type)

 

 

[solution for Handelling Domain transfer's checks]

 

We all know (i only know yesterday), that domains transfer are not handling correctly because it dosent check if the domain was transfered or not.

 

So wen a client order a Domain Transfer, after payment, the Registrar Module will add a Calender Event 5 days after the initiation of the domain transfer, to remind us that there is a domain xxxxxx.tld that needs to be verified if everithing went smooth.

 

Blesta also can, after implementing the above "Solution for Diferent Prices for Register/Transfer/Renew Domains", modification, we can check all domains in type "domain_transfer", it will only make a simple check to domain whois, every day (by blesta cron), if the whois from the registrar responds sucessful, then it will change the type from "domain_transfer" to "domain_renew" and corret the expiration/renew date from the expiration date in the "whois" response because the renew date is always the new expiration date after a sucessful transfer from the domain.

 

 

This way all domains problems will be resolved and dosent need a new "Domain Plugin/Module" that we think is beeing made and will take a lot more time to implement.

 

If some one could support my theory, or have any question, please ask :)

 

We whant to resolve all Domains problems now :P

Link to comment
Share on other sites

They are sorting this out soon mate. They are re-doing the domain system into it's own section to have a table for register / transfer / renew prices. That's when the openSRS module will come out hopefully.

 

 

Because we dont had any feedback or core status or timeline we have to go foward and not wait ;)

 

We know that Blesta Devs are working hard, thats why we try to make solutions to help ;)

 

We whant badly to migrate from WHMCS to Blesta, but we cant migrate until:

 

1- Diferent Prices for Domain Types / Domain Transfer Handelling (we dont have any timeline or status)

2- Price Override (we know it will be on Blesta 3.3, and this can be somehow workedarround now with duplicated packages or discount cupons)

3- Pro-Forma Invoices (we know it will be on Blesta 3.3)

Link to comment
Share on other sites

Because we dont had any feedback or core status or timeline we have to go foward and not wait ;)

 

We know that Blesta Devs are working hard, thats why we try to make solutions to help ;)

 

We whant badly to migrate from WHMCS to Blesta, but we cant migrate until:

 

1- Diferent Prices for Domain Types / Domain Transfer Handelling (we dont have any timeline or status)

2- Price Override (we know it will be on Blesta 3.3, and this can be somehow workedarround now with duplicated packages or discount cupons)

3- Pro-Forma Invoices (we know it will be on Blesta 3.3)

 

You could merge but have to cope with the same prices for the domains until it's out as it's going to be hard for them to update it yet.

Link to comment
Share on other sites

  • 4 weeks later...

We can't upgrade until the opensrs module is available. I am happy to make a donation towards its development if we can have it sooner rather than later.

 

+1 I'm up for a small donation towards it, I know if you would like to sponsor it you can by emailing sales[a.t]blesta.com. The main issue is the new domain module, it's going to be revamped.

Link to comment
Share on other sites

Just to ask Blesta Devs, if there is any news about the new Domain system?

 

We now have some extra free time again :) and we want to start making the new Universal Domain Registrar called "Umail" that works like a normal registrar module, but it sends an Email with the details of the action (Register, Transfer, Update Whois, etc), insted of making API calls.

 

This module will be a litle tricky because it as to be built in with a "Domain Whois Check" to support all TLD's

 

We dont whant to start this and Blesta Devs tell us that they are almost done coding the new Domain System ;)

 

( Update to this:  just got the answer it will take litle more time, but they will trie to relesed this year :), in the mean time we will start our solution in the first post, after that we will build the Univerdal Domain Registrar Module ;)  )

Edited by PauloV
Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

Regarding to this tread and for the releasing of OpenSRS Domain Module :)
 
We see that on Domain Modules we can check the "$package->meta->type" (has i describe on first post of this forum)
 
and we can add new types in getPackageFields() on array $types
 
So what we have try several times, but we didnt succeed 100% is this:
 
1º- We have added two new types called:
 
- domain_renew
- domain_transfer
 
because we want to add diferent prices for domain_renew, domain_transfer, and for domain (regist a new domain).
 
This part is 100% and we can create packages with diferent prices witout any problems :)
 
 
 
2º- On Domain Order Form, in Client Area, we want wen a client click on the button "Transfer" to get the prices from the "type" domaintransfer, we have trie many things bu we still dont find an easy solution, so we ask.
 
Can you help me, and point to the right direction? how can we get on "Domain Order Form" wen clicking on "Transfer Domain" to display the TLD's with the process from the type "domaintransfer"?
 
 
 
3º- This step is easy for us, and is the last step, wen a client regist a domain or transfer a domain, we simple execute a query to change the "type" to "domainrenew" to get the correct prices for renewing domains.
 
 
With this 3 simple steps we fix 100% the problem on Domains Modules, and we only need a way to implement the "2º" step ;)
 
 
After this is resolved, its easy to implement some news things like for exemple import TLD's from registrars, or even import an CSV to add/update TLD, prices.

Link to comment
Share on other sites

I dont know if (Cody or Tyson)  can help me on the last post above :)

 

Can you help me, and point to the right direction? how can we get on "Domain Order Form" wen clicking on "Transfer Domain" to display the TLD's with the process from the new "type"  "domain_transfer"?

 

Thanks in advance :P

Link to comment
Share on other sites

i never touched the order form and never tried it , yes is true , because i'm still using 2.5 :( . but what i have do in v2.5 , i have created a order form based on the API and not the native one , with that i have the ability to create my own based conditions and task .

have you tried order form based on the API ? the data that youcan't get it from the core you can set it ine the API based form . with that i have resolved my problemes in v2.5 .

another time, i'mnot sure if this can help but need to try .

Link to comment
Share on other sites

i have get some time to think to your solution paulov , what i have found that you need to change the package for every domain action (register/transfer). this two type is just the wanted on the order form . if this is the case , what i can do as a solution is to make a new order type like the "domain" , let say "domaine" . then try to change the package if the request is transfer (line 186 in order_types_domain.php ) .

 

i have not tested as i never check the order structure . and another probleme is how to determinate wich package for transfer , to resolve this you need to help with plugin that let you spicify wich package for domain and for transfer and for renewal .

 

mybe my solution is NULL , but that what i have thinked now .

Link to comment
Share on other sites

Thanks naja7host :)

 

In the past I alredy had found the file to mess with, that change the "Package ID" manually to get the Meta Type "domaintransfer" but I never got to see how could I get a real solution to not mess with all core files to get what I want :)

 

So after some more hours testing I finally got the real solution for all our problems to Configure Diferent Prices for each Type (Regist a Domain, Transfer a Domain and Renew a Domain) :)

 

The solution only needs to change 2 core files, and I hope, Blesta (Paul/Tyson/Cody) implement on Blesta 3.4 this changes (I dont want any credits, I only want to in Blest Core :P )

 

 

1º- Create 2 new types on "Domain Modules", like enom/LogicBoxes/InternetBS etc with the meta name:

 

domaintransfer

domainrenew

 

(I will explain later how to to this, but Cody and Tyson, alredy knows how to do it because thete is an SSL description to add SSL options to enom module)

 

2º- After that wen you create a new Package using a Domain Module, you will see that you can choose to configure TLD's and Prices for each Type (Domain, Domain Transfer, Domain Renew).

 

3º- Finaly just edit this files like so:

 

Open file: /[blesta intalation]/app/models/packages.php
 
Find on line 1520:
private function getPackageMeta($package_id) {
change to:
public function getPackageMeta($package_id) {

Open File: /[blesta intalation]/plugins/order/lib/order_types/domain/order_type_domain.php

 

Find on line 129:

            $tlds = $this->getTlds();

Replace with:

        // If it is a tranfer get only the domaintransfer package id's
        if (isset($post['transfer'])){
	    	$tlds = $this->getTlds(TRUE);
        }
        else{
            $tlds = $this->getTlds();
        }

Find on line 331:

	private function getTlds() {

Replace with:

	private function getTlds($transfer=NULL) {

Find on line 345:

		foreach ($packages[$group->package_group_id] as $package) {
			$package = $this->Packages->get($package->id);

			if (isset($package->meta->tlds)) {
				foreach ($package->meta->tlds as $tld) {
					if (isset($tlds[$tld]))
						continue;

					$tlds[$tld] = array($package, $group);
				}
			}
		}

Replace with:

		foreach ($packages[$group->package_group_id] as $package) {

  			$packagemeta = $this->Packages->getPackageMeta($package->id);

            // If it is a tranfer get only the domaintransfer package id's
            if(isset($transfer)) {

                // Get only the packages from the meta type domaintransfer
                if ($packagemeta->type == "domaintransfer")
                    $package = $this->Packages->get($package->id);

            }else{
            // Get only the packages from the meta type domain
                if ($packagemeta->type == "domain")
                    $package = $this->Packages->get($package->id);
            }

			if (isset($package->meta->tlds)) {
				foreach ($package->meta->tlds as $tld) {
					if (isset($tlds[$tld]))
						continue;

					$tlds[$tld] = array($package, $group);
				}
			}
		}

So there you have it :)

 

Diferent Prices for each Domain Type:

 

Regist a Domain

Transfer a Domain

Renew a Domain

 

And all wittout a new type of Domain System ;)

 

I will post on Monday the Code of one of Our Domain Modules (InternetBS and OPENSRS) with the implemantation of the 2 new Domain Meta Types, and how is handled :)

 

Wen a Domain is Registed/Added, and normaly will fetch the normail prices and the client will pay that prices, after that the funtion will change to the type "domainrenew" to get the Domain Renew prices for the next renew date.

 

Wen a Client Clicks on Transfer Domain, the order form will fetch the domaintransfer prices, and after added, the funtion will also change to the type "domainrenew" to get the Domain Renew prices for the next renew date.

 

If Paul, Cody or Tyson can advise me if this is the best solution, of yuor have any outher ideia, please share because of the new OpenSRS Domain Module :)

Link to comment
Share on other sites

helo @PauloV .

 

with your solution we will have 3 packages ? no ? or one package we can give it different price for every meta ?

EDIT :  after test , it will have three packages .

 

it seem like you have not explain a proccess or there is something wrong with my logic .

 

as it should be switch from package to package . i don't know how it will recognize the package from the packagemeta , and what happend if we have more that 1 package with  the same meta type ?

 

how do you get the package_id from the order form ?

 

 

but i will test it this weekend .

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...