2011-10-10 78 views
2

我剛剛從magento 1.4.0升級到1.6。我有兩種付款方式:paypal和信用卡/借記卡。PayPal標籤丟失在onepage結帳

我的問題是,雖然我得到相關單選按鈕旁邊的信用卡/借記卡文本,但我沒有收到貝寶單選按鈕旁邊的任何貝寶文本(標籤)。我在paypal配置的標題中有一個描述,但是這沒有得到提取。

任何人都可以幫助我嗎?謝謝!

+0

似乎與軟件開發無關。 – Rob

+0

我有同樣的問題。它確實涉及軟件開發b/c該解決方案很可能挖掘到Magento的代碼來添加標籤。 –

回答

0

雖然這不是理想的答案,但下面是我用來手動添加標籤的快速解決方案。轉至app/design/frontend/base/default/template/mark.phtml。我編輯這個文件,只需添加一個文本標籤PayPal的圖像之前:

<!-- PayPal Logo --> 
Credit Card/PayPal &nbsp;&nbsp;<img src="<?php echo $this->escapeHtml($this->getPaymentAcceptanceMarkSrc())?>" alt="<?php echo Mage::helper('paypal')->__('Acceptance Mark') ?>" class="v-middle" />&nbsp; 
<a href="<?php echo $this->getPaymentAcceptanceMarkHref()?>" onclick="javascript:window.open('<?php echo $this->getPaymentAcceptanceMarkHref()?>','olcwhatispaypal','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, ,left=0, top=0, width=400, height=350'); return false;"><?php echo Mage::helper('paypal')->__('What is PayPal?') ?></a> 
<!-- PayPal Logo --> 

可選,將該文件複製到app/design/frontend/default/yourtemplatedir/template/mark.phtml,如果你不想讓你的變化將在未來升級覆蓋。

理想的解決方案是找到創建標籤的文件,並在那裏進行更改。此外,使用在配置設置中獲取PayPal標題的方法。但以上是我發現的第一個快速解決方案。

0

而不是更改mark.phtml文件,我prerer以避免顯示該文件。

我複製塊app\code\core\Mage\Paypal\Block\Standard\Form.php到我的地方(app\code\local\...)和改變

protected function _construct() 
{ 
    $this->_config = Mage::getModel('paypal/config')->setMethod($this->getMethodCode()); 
    $locale = Mage::app()->getLocale(); 
    $mark = Mage::getConfig()->getBlockClassName('core/template'); 
    $mark = new $mark; 
    $mark->setTemplate('paypal/payment/mark.phtml') 
     ->setPaymentAcceptanceMarkHref($this->_config->getPaymentMarkWhatIsPaypalUrl($locale)) 
     ->setPaymentAcceptanceMarkSrc($this->_config->getPaymentMarkImageUrl($locale->getLocaleCode())) 
    ; // known issue: code above will render only static mark image 
    $this->setTemplate('paypal/payment/redirect.phtml') 
     ->setRedirectMessage(
      Mage::helper('paypal')->__('You will be redirected to the PayPal website when you place an order.') 
     ) 
     ->setMethodTitle('') // Output PayPal mark, omit title 
     ->setMethodLabelAfterHtml($mark->toHtml()) 
    ; 
    return parent::_construct(); 
} 

... the same 
... 
    $this->setTemplate('paypal/payment/redirect.phtml') 
     ->setRedirectMessage(
      Mage::helper('paypal')->__('You will be redirected to the PayPal website when you place an order.') 
     ) 
     ->setMethodTitle('Paypal (my title)'); 
    return parent::_construct(); 
} 

加入我的自定義標題和移除標記文件。