我正在使用CE 1.7,目前正在尝试从Onepage结帐中删除送货,送货方式和付款步骤。我已经从中删除了步骤local\mage\checkout\block\onepage\abstract.php
。我的问题来自尝试从帐单信息发展到我单击“继续”时进行审阅时,它加载的加载下一步图片比静止图片要多。任何想法将不胜感激。
我正在使用CE 1.7,目前正在尝试从Onepage结帐中删除送货,送货方式和付款步骤。我已经从中删除了步骤local\mage\checkout\block\onepage\abstract.php
。我的问题来自尝试从帐单信息发展到我单击“继续”时进行审阅时,它加载的加载下一步图片比静止图片要多。任何想法将不胜感激。
Answers:
尝试使用以下功能重写以下块文件:
改写类 Mage_Checkout_Block_Onepage_Billing
public function canShip()
{
return false;
}
改写类 Mage_Checkout_Block_Onepage_Shipping_Method
public function isShow()
{
return false;
}
改写类 Mage_Checkout_Block_Onepage_Shipping
public function isShow()
{
return false;
}
我希望现在不会发生与进度有关的问题。
有点旧,但是在这里看看:
删除登录 http://excellencemagentoblog.com/magento-onestep-checkout-remove-login-step
删除付款+运输 http://excellencemagentoblog.com/magento-onestep-checkout-remove-payment-and-shipping-method-step
删除付款 http://excellencemagentoblog.com/magento-onestep-checkout-remove-payment-method-step
删除运输 http://excellencemagentoblog.com/magento-onestep-checkout-remove-shipping-method-step
添加步骤 http://excellencemagentoblog.com/magento-onestep-checkout-add-step
@ heaven7我总体上在OnepageController.php中更改了这些位,我所做的不只是操纵它,而且我将列出我的代码,以便您可以看到我所做的更改。只需记住仅在本地副本而不是在核心文件夹中执行此操作。
`protected $_sectionUpdateFunctions = array(
/* 'payment-method' => '_getPaymentMethodsHtml',
'shipping-method' => '_getShippingMethodsHtml',*/
'review' => '_getReviewHtml',
); public function saveBillingAction()
{
if ($this->_expireAjax()){
return;
}
if ($this->getRequest()->isPost()) {
$data = $this->getRequest()->getPost('billing', array());
$customerAddressId = $this->getRequest()->getPost('billing_address_id', false);
$result = $this->getOnepage()->saveBilling($data, $customerAddressId);
// if (!isset($result['error'])) {
// if ($this->getOnepage()->getQuote()->isVirtual()) {
$this->loadLayout('checkout_onepage_review');
$result['goto_section'] = 'review';
$result['update_section'] = array(
'name' => 'review',
'html' => $this->_getReviewHtml()
);
}
/*elseif (isset($data['use_for_shipping']) && $data['use_for_shipping'] == 1) {
$this->saveShippingMethodAction();
$this->loadLayout('checkout_onepage_review');
$result['goto_section'] = 'review';
$result['update_section'] = array(
'name' => 'review',
'html' => $this->_getReviewHtml()
);
$result['allow_sections'] = array('shipping','review');
$result['duplicateBillingInfo'] = 'true';
}*/
/* else {
//$result['goto_section'] = 'shipping';
//TODO There is an error with loading the layout of the Review tab.
$result['goto_section'] = 'review';
}*/
// }
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
}
public function saveShippingAction()
{
if($this->_expireAjax()){
return;
}
if ($this->getRequest()->isPost()) {
$data = $this->getRequest()->getPost('shipping', array());
$customerAddressId = $this->getRequest()->getPost('shipping_address_id', false);
$result = $this->getOnepage()->saveShipping($data, $customerAddressId);
if (!isset($result['error'])) {
$this->saveShippingMethodAction();
$this->loadLayout('checkout_onepage_review');
$result['goto_section'] = 'review';
$result['update_section'] = array(
'name' => 'review',
'html' => $this->_getReviewHtml()
);
}
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
}
}
public function saveShippingMethodAction()
{
if ($this->_expireAjax()) {
return;
}
if ($this->getRequest()->isPost()) {
$data = $this->getRequest()->getPost('shipping_method', '');
$result = $this->getOnepage()->saveShippingMethod($data);
/*
$result will have erro data if shipping method is empty
*/
if(!$result) {
Mage::dispatchEvent('checkout_controller_onepage_save_shipping_method',
array('request'=>$this->getRequest(),
'quote'=>$this->getOnepage()->getQuote()));
$this->getOnepage()->getQuote()->collectTotals();
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
$result['goto_section'] = 'review';
$result['update_section'] = array(
'name' => 'review',
'html' => $this->_getReviewHtml()
);
}
$this->getOnepage()->getQuote()->collectTotals()->save();
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
}
}
请点击此链接
http://sapnandu-magento.blogspot.in/2012/04/magento-onestep-checkout-remove.html
要么
http://knowledgevalley.blogspot.in/2012/01/magento-skip-shipping-method-from.html
它可以帮助你