@@ -33,7 +33,7 @@ class Netresearch_OPS_Block_Form extends Mage_Payment_Block_Form_Cc
3333
3434 protected $ config = null ;
3535
36- protected $ _aliasDataForCustomer = array ();
36+ protected $ aliasDataForCustomer = array ();
3737
3838 /**
3939 * Frontend Payment Template
@@ -240,7 +240,7 @@ public function getRedirectMessage()
240240 * @return array | null - array the alias data or null if the customer
241241 * is not logged in
242242 */
243- protected function getStoredAliasForCustomer ()
243+ public function getStoredAliasForCustomer ()
244244 {
245245 if (Mage::helper ('customer/data ' )->isLoggedIn ()
246246 && Mage::getModel ('ops/config ' )->isAliasManagerEnabled ($ this ->getMethodCode ())
@@ -256,11 +256,11 @@ protected function getStoredAliasForCustomer()
256256
257257
258258 foreach ($ aliases as $ key => $ alias ) {
259- $ this ->_aliasDataForCustomer [$ key ] = $ alias ;
259+ $ this ->aliasDataForCustomer [$ key ] = $ alias ;
260260 }
261261 }
262262
263- return $ this ->_aliasDataForCustomer ;
263+ return $ this ->aliasDataForCustomer ;
264264 }
265265
266266 /**
@@ -347,10 +347,10 @@ protected function getStoredAliasDataForCustomer($aliasId, $key)
347347 $ returnValue = null ;
348348 $ aliasData = array ();
349349
350- if (empty ($ this ->_aliasDataForCustomer )) {
350+ if (empty ($ this ->aliasDataForCustomer )) {
351351 $ aliasData = $ this ->getStoredAliasForCustomer ();
352352 } else {
353- $ aliasData = $ this ->_aliasDataForCustomer ;
353+ $ aliasData = $ this ->aliasDataForCustomer ;
354354 }
355355
356356 if (array_key_exists ($ aliasId , $ aliasData ) && $ aliasData [$ aliasId ]->hasData ($ key )) {
@@ -360,4 +360,42 @@ protected function getStoredAliasDataForCustomer($aliasId, $key)
360360 return $ returnValue ;
361361 }
362362
363+ /**
364+ * @param $methodCode
365+ * @param $storeId
366+ * @return mixed|string
367+ */
368+ public function getHtpTemplateName ($ methodCode , $ storeId = null )
369+ {
370+ return $ this ->getConfig ()->getHtpTemplateName ($ methodCode , $ storeId );
371+ }
372+
373+ /**
374+ * get customer birthdate and gender
375+ *
376+ * @return array
377+ */
378+ public function getCustomerData ()
379+ {
380+ $ data = array ();
381+ $ quote = $ this ->getQuote ();
382+ $ birthDate = $ quote ->getCustomerDob ();
383+ $ gender = $ quote ->getCustomerGender ();
384+
385+ $ data ['birthdate ' ] = isset ($ birthDate ) ? $ birthDate : '' ;
386+ $ data ['gender ' ] = isset ($ gender ) ? $ gender : '' ;
387+
388+ return $ data ;
389+ }
390+
391+ public function getGenderOptions ()
392+ {
393+ $ genders = Mage::getSingleton ('eav/config ' )
394+ ->getAttribute ('customer ' , 'gender ' )
395+ ->getSource ()
396+ ->getAllOptions ();
397+
398+ return $ genders ;
399+
400+ }
363401}
0 commit comments