Categories

Featured templates

Magento. 如何编辑订单确认页面

Alice Weasley August 24, 2015
Rating: 5.0/5. From 2 votes.
Please wait...

Magento. 如何编辑订单确认页面

本教程展示了如何 编辑订单确认页在Magento:

Magento_How_to_edit_Order_Confirmation_page_1

  1. Navigate to app/design/frontend/ /基地/违约/模板checkout/success.phtml inside your site directory on the server via FTP or on your hosting cPanel and copy the success.phtml file to the app/design/frontend/ /默认/ themeXXX /模板checkout folder.

  2. In order to test the changes,请执行以下步骤:

    1. If your payment method is not Saved CC, set it to it in System -> Configuration -> Sales -> Payment Methods in your dashboard and use a test credit card 签出并显示成功页面. Visa测试卡号为4111111111111111:

      Magento_How_to_edit_Order_Confirmation_page_2

      Magento_How_to_edit_Order_Confirmation_page_3

    2. 临时编辑Magento Core代码文件以禁用清除 session 注释掉第227行周围的代码 app/code/core/Mage/Checkout/控制器/ OnepageController.php:

      replace

      $session->clear();

      with:

      //$session->clear();
  3. In app/design/frontend/ /默认/ themeXXX /模板checkout/success.phtml 您可以编辑订单确认页代码.

    我们强烈建议 编辑前备份文件:

    Magento_How_to_edit_Order_Confirmation_page_4

    1. To 编辑默认文本,将单引号之间的文本替换为您的. For example:

      Replace

      __('Your order has been received.') ?>

      with

      __('Great, we got your order!!!') ?>

    2. For 显示收货地址 add this code:

        

      Shipping Details

      getLastRealOrderId();?> loadByIncrementId($order_id);?> _data["shipping_description"];?> getShippingAddress();?> " . 美元shipping_address_data(“firstname”);?> " . 美元shipping_address_data(“街”);?> " . 美元shipping_address_data(“城市”);?> " . 美元shipping_address_data [' country_id '];?>
    3. 下面的代码将显示 订单汇总金额:

        

      Order Amounts


      Subtotal:' . Mage::helper("core")->currency($order_details->subtotal) . "

      ";?> Tax:' . Mage::helper("core")->currency($order_details->tax_amount) . "

      ";?> Discount:' . Mage::helper("core")->currency($order_details->discount_amount) . "

      ";?> Amount Paid:' . Mage::helper("core")->currency($order_details->total_paid) . "

      ";?>
    4. In order to display a custom static CMS block, for example social-buttons-block, use this code:

        
        
        getLayout()->createBlock('cms/block')->setBlockId('social-buttons-block')->toHtml();?>
      

Magento_How_to_edit_Order_Confirmation_page_5

你可能也需要 clear the cache.

请随时查看下面的详细视频教程:

Magento. 如何编辑订单确认页面

Magento商店模板
这个条目被张贴了出来 Magento Tutorials and tagged confirmation, Magento, order, page. Bookmark the permalink.

Submit a ticket

如果您仍然无法找到关于您的问题的足够的教程,请使用以下链接向我们的技术支持团队提交请求. 我们将在接下来的24小时内为您提供我们的帮助和协助: Submit a ticket