【问题标题】:Magento how to escape from the shipping method from the checkout page?Magento 如何从结帐页面逃避运输方式?
【发布时间】:2014-07-08 07:43:27
【问题描述】:

我尝试了不同的选项来逃避 magento 默认结帐页面的运输方式。 Blog 但我找不到解决方法,我已经在 magento 论坛上问过这个问题,但没有回复。如果有人尝试过,请给出答案。如何从结帐页面删除送货方式Magento Forum

【问题讨论】:

    标签: php magento plugins checkout magento-1.8


    【解决方案1】:

    简而言之,您不能在没有送货方式的情况下跳过结帐,因为 Magento 不会在没有送货方式的情况下保存订单。如果你真的想跳过,你必须作弊。在内部分配任何运输方式 有多个步骤:

    1. 扩展Mage_Checkout_OnepageController

    2. 覆盖Mage_Checkout_OnepageControllersaveBillingActionsaveBillingShippingAction 方法并保存运输方法。

      $method = 'freeshipping_freeshipping'; $result = $this->getOnepage()->saveShippingMethod($method); Mage::getSingleton('checkout/type_onepage')->getQuote()->getShippingAddress()-> setShippingMethod($method)->save();

    3. 同时扩展 Mage_Checkout_Block_Onepage_Abstract 并覆盖 Mage_Checkout_Block_Onepage_Abstract::_getStepCodes 以在结帐时隐藏运输步骤。

    【讨论】:

      猜你喜欢
      • 2012-12-03
      • 1970-01-01
      • 1970-01-01
      • 2015-10-17
      • 2013-06-21
      • 1970-01-01
      • 2012-09-30
      • 1970-01-01
      • 2014-10-12
      相关资源
      最近更新 更多