Jump to content

Important if you use namespinner


Recommended Posts

Don't forget folks if you use the namespinner alternate domain suggestion tool. And you have added other currencies. It will default to the last currency you added.

 

I just discovered this, i added MXN and now the price is thru the roof when someone looks up a name.

 

I am currently working on the fix to either set it to the first currency in the table or allow them to choose.

 

I will keep you posted on the fix..

 

In the mean time if anyone has already done this fix to namespinner please share to save me some time..

 

Thanks :)

Link to comment
Share on other sites

ok folks here is the quick fix. i have not yet added the option to the template for dif currencies, i thought it would be better to get this quick fix out there first so people can still use your feature.

 

basically what i did was i added a default currency value

 

at the top of namespinner.tpl

 

i added this ( i got the value from the tblcurrencies (id))

 


       //set value of default currency
        $defcurrency = '1';  //USD

 

then in this section i just added

 
AND tp.currency = '$defcurrency'";

 

like so...


//Get domain pricing
	if ($gotnamespinner)
                {
		$sql = "SELECT tdp.extension, msetupfee year1, qsetupfee year2, ssetupfee year3, asetupfee year4, bsetupfee year5, monthly year6, quarterly year7, semiannually year8, annually year9, biennially year10
				FROM tbldomainpricing tdp, tblpricing tp
				WHERE tdp.extension in ".$tldsqlstr."
				AND tp.type = 'domainregister'
				AND tp.relid = tdp.id
                                       AND tp.currency = '$defcurrency'";

 

there is your quick fix and i will update this when i get the selection menu on the page up and running. :)

Link to comment
Share on other sites

Here is the form stuff to select the currency.

 

since i dont know what your page name is that you have your initial form in. Just go to your form page that you input the domain name into for the namespinner.

 

 

and add this... i found its better to put it on the bottom for less obstruction of the other fields.

 

now of course you dont have to use select, you can use radio style or whatever you want, but anywhere between the form tag and the submit button.

 

of course your currencies will differ and you can del or change anything here.

remember the values in the select 1 2 3... should coincide with what you have in tblcurrencies (id)

 


<br />
Choose Currency:   <select name="cur">
                       <option value='1' selected="selected">USD</option>
                       <option value='2'>CAD</option>
                       <option value='3'>GBP</option>
                       <option value='4'>EUR</option>
                       <option value='5'>MXN</option>
                       </select>
<br />
<br />

 

and now go back to your namespinner tpl (if you did the previous mod on the last post)

where you had

 


    //set value of default currency
        $defcurrency = '1';  //USD 

 

and change that to this

 


  //set value of default currency
        $defcurrency = intval($_POST['cur']);

 

save the file and your done..

 

now whatever they choose on your html page will grab that currency from the namespinner query.

 

happy days.

Link to comment
Share on other sites

Hello durangod

 

Thanks for providing this solution. Always appreciated.

 

As always folks, user submitted solutions are always welcome but remember - they have not been tested and are not supported by WHMCS. Please use at your discretion.

 

--Thanks

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.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated