Jump to content

ajalex

Retired Forum Member
  • Posts

    8
  • Joined

  • Last visited

About ajalex

ajalex's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. Hello! I don't know if there is already or someone has solved the problem, I have searched and found nothing by ninugn laho so I tried to make a hook with which to re-splice the date. Actually I use the standard date in the DD/MM/YYYYYY commands, but at the end of the mails I had in the global template {$date} and I didn't realize that it arrived in English even though I have it in Spanish. I made a small hook that could be adapted, for this I made a new varibale {$date_locale} that will be the output and the one that will remain in the template. Then I read the client language that is given by default by the variables in the hook $vars['mergefields']]['client_language'] I tried Lang::trans but it didn't work so since we already get the client's language, I made an include to attach the client's language. include ROOTDIR . "/lang/".$vars['mergefields']['client_language'].".php"; Now I read the date given by the varialbes and in this case I need "date" so I pass it to strtotime and then using arrays I replace it with $_LANG['dateTime'] and change the output format to my liking. add_hook('EmailPreSend', 1, function($vars) { $merge_fields = []; if (!array_key_exists('date_locale', $vars['mergefields'])) { include ROOTDIR . "/lang/".$vars['mergefields']['client_language'].".php"; $date = strtotime($vars['mergefields']['date']); $NumberDay = date('j', $date); $Day = date('l', $date); $Month = date('F', $date); $Year = date('Y', $date); $Days_Translate = array( $_LANG['dateTime']['monday'], $_LANG['dateTime']['tuesday'], $_LANG['dateTime']['wednesday'], $_LANG['dateTime']['thursday'], $_LANG['dateTime']['friday'], $_LANG['dateTime']['saturday'], $_LANG['dateTime']['sunday'] ); $Days_En = array("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"); $NameDay = str_replace($Days_En, $Days_Translate, $Day); $Month_Translate = array( $_LANG['dateTime']['january'], $_LANG['dateTime']['february'], $_LANG['dateTime']['march'], $_LANG['dateTime']['april'], $_LANG['dateTime']['may'], $_LANG['dateTime']['june'], $_LANG['dateTime']['july'], $_LANG['dateTime']['august'], $_LANG['dateTime']['september'], $_LANG['dateTime']['october'], $_LANG['dateTime']['november'], $_LANG['dateTime']['december'] ); $Months_EN = array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); $NameMonth = str_replace($Months_EN, $Month_Translate, $Month); $merge_fields['date_locale'] = $NameDay.", ".$NumberDay." de ".$NameMonth." de ".$Year; } return $merge_fields; }); As in my case I wanted the date when the mail was sent I used $vars['mergefields']['date'] but if you need another date you can use the ones allowed by the template for example from invoices: invoice_date_created and invoice_date_due etc.. and replace it with $vars['mergefields']['date'] ex : $vars['mergefields']]['invoice_date_created'] You can change the directory to include instead of the main language the one included in the overrides directory in case you want to make different settings or different texts and not lose it in the updates. I hope it helps, I also have a hook to replace the image of 2co, Paypal and Stripe if you are interested. Regards!
  2. Hi, currently I manage two currencies but in some products I don't want the cron to change the price of those products because I want to leave them fixed, does it require any way in the api with some hook where I can specify which products I don't want to change the price ? regards! alex
  3. Hi I have the following error: I transfer a domain to ResellerClub GODDADDY but I get the error: Required parameter missing: state my client data are not necessary to correct any data but still get the error when making the transfer I hope you can help me thanks!
  4. si cuentas con WHMCS ingresa a tu Area de Cliente de aqui y en Licencias y te dran Gratis el Reseller de Opensrs, ResellerClub y Enom con eso no tienes que hacer ningun pago inicial para poder obtenerlos
  5. Hola! tengo un problema con Opensrs, he abierto los puertos necesarios para que coencte a la API y en Opensrs tambien he añadido a la lista blanca la ip donde esta alojado el WHMCS pero sigue con el mismo error Could not get credentials for reseller nextvision. Alguien que use Opensrs u otro que me recomienden apra registro de dominios .mx,.com.mx ???
  6. Hello, just hired a plan where I can get WHCMS hostdime.com no cost, I have entered the site to register but do http://www.whmcs.com/hostdime/ lost my internet connection and just enter my domain and go the next step, from there I could not. now I try to log in again and says, "Sorry, you Have Already Been Issued a license for domain nextvision.mx WHMCS on August 23, 2011" not reach the step where I enter my username and password or download WHCMS, as I can get it? my domain is nextvision.mx I await your response as soon Thanks!
×
×
  • 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