本文整理汇总了PHP中Mage_Payment_Model_Method_Abstract::getTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Payment_Model_Method_Abstract::getTitle方法的具体用法?PHP Mage_Payment_Model_Method_Abstract::getTitle怎么用?PHP Mage_Payment_Model_Method_Abstract::getTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Payment_Model_Method_Abstract
的用法示例。
在下文中一共展示了Mage_Payment_Model_Method_Abstract::getTitle方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMethodTitle
/**
* Return method title for payment selection page
*
* @param Mage_Payment_Model_Method_Abstract $method
*/
public function getMethodTitle(Mage_Payment_Model_Method_Abstract $method)
{
$form = $this->getChild('payment.method.' . $method->getCode());
if ($form && $form->hasMethodTitle()) {
return $form->getMethodTitle();
}
return $method->getTitle();
}
示例2: getTitle
/**
* translate method title shown in payment selection
* the methode code is the key, if no transaltion found
* use the title setting
*
* @return string
*/
public function getTitle()
{
/** @var Wirecard_CheckoutPage_Helper_Data $helper */
$helper = Mage::helper('wirecard_checkoutseamless');
$translated = $helper->__($this->_paymentMethod);
if ($translated == $this->_paymentMethod) {
return parent::getTitle();
}
return $translated;
}
示例3: getTitle
public function getTitle()
{
if (Mage::helper('buckaroo3extended')->getIsKlarnaEnabled()) {
return parent::getTitle();
}
if (!Mage::helper('buckaroo3extended')->isOneStepCheckout()) {
return parent::getTitle();
}
$block = Mage::app()->getLayout()->createBlock('buckaroo3extended/paymentMethods_ideal_checkout_form')->setMethod($this);
$title = parent::getTitle() . ' ' . $block->getMethodLabelAfterHtml(false);
return $title;
}
示例4: getTitle
/**
* override parent method to get the user-configured title, not the one from config.xml
*
* @return string
*/
public function getTitle()
{
if ($this->getConfig() instanceof Payone_Core_Model_Config_Payment_Method_Interface) {
return $this->getConfig()->getName();
}
try {
// order has higher priority than quote
$order = $this->getInfoInstance()->getOrder();
if ($order instanceof Mage_Sales_Model_Order and $order->hasData()) {
return $this->getConfigByOrder($order)->getName();
}
/** @var $session Mage_Checkout_Model_Session */
$session = Mage::getSingleton('checkout/session');
$quote = $session->getQuote();
if (!$quote instanceof Mage_Sales_Model_Quote or !$quote->getId()) {
$quote = $this->getInfoInstance()->getQuote();
}
if ($quote instanceof Mage_Sales_Model_Quote and $quote->getId()) {
return $this->getConfigForQuote($quote)->getName();
}
} catch (Exception $e) {
return parent::getTitle();
// if for some reason config was not found, use parent method
}
// call parent method if no config available
return parent::getTitle();
}
示例5: getTitle
/**
* Override parent getTitle in order to translate the config.xml title (thank you magento)
*/
public function getTitle()
{
// If there was an error, inform the user
if (is_string($this->_api->methods)) {
return Mage::helper('core')->__($this->_api->methods);
}
// If this is a void field to be filled, fill it
if ($this->isValidIndex()) {
return Mage::helper('core')->__($this->_api->methods[$this->_index]['description']);
}
// Otherwise, translate the title from config.xml
return Mage::helper('core')->__(parent::getTitle());
}
示例6: getTitle
/**
* Get payment title
*
* @return string
*/
public function getTitle()
{
return Mage::helper('sofort')->__(parent::getTitle());
}