<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ## 安裝magento: 可以參考 :[http://www.hmoore.net/zouhongzhao/magento2-in-action/628424](http://www.hmoore.net/zouhongzhao/magento2-in-action/628424) ***** ## 配置paypal : 不需要安裝插件,直接利用magento后臺配置,要申請paypal商業賬號,創建商業賬號sandbox(us), 得到 商家用戶和客戶用戶 來測試支付和收入。 ![](https://img.kancloud.cn/c5/a8/c5a82364e30aa73a768af1f495d18991_694x410.png) 參考資料: 1,國外資料 [https://www.mageplaza.com/kb/how-to-configure-paypal-express-checkout-payment-method-magento-2.html](https://www.mageplaza.com/kb/how-to-configure-paypal-express-checkout-payment-method-magento-2.html) 2,國內資料 [http://www.hmoore.net/zouhongzhao/magento2-in-action/699199](http://www.hmoore.net/zouhongzhao/magento2-in-action/699199) ***** ## 配置 stripe 信用卡支付 (選): https://stripe.com/docs/plugins/magento-2 [Installing the Magento 2 Module | Stripe Documentation](https://stripe.com/docs/plugins/magento-2/install#manual) ![](https://img.kancloud.cn/35/a4/35a4577520169b463172a8db58eb2e95_779x639.png) 配置好,可以測試: ![](https://img.kancloud.cn/07/df/07dffda3a6b378074d02cb37c03c0968_1095x476.png) 支付成功,stripe配置是相對容易: ![](https://img.kancloud.cn/65/31/653149983edb1016c3696b83df9afa58_736x424.png) ***** ## 安裝mageplaza方的插件, 記得安裝 core: https://github.com/mageplaza/module-core 如果國內環境出現問題,解決方案: ![](https://img.kancloud.cn/c5/41/c541a363b5777bbacc9796268babf58b_651x195.png) 參考:[https://github.com/mageplaza/module-core/issues/26](https://github.com/mageplaza/module-core/issues/26) ``` // 修改這里的代碼則可以: **if($params\['extension'\] == 'Mageplaza\_Blog'){** **????$result\['success'\] = true;** **????$result\['key'\] = 'BLOG-XXXXXXXXXXXXXXXX';** //解決驗證問題,key在mageplaza后臺訂單有 **}** ``` ***** ## https的配置 : 參考:[http://www.hmoore.net/zouhongzhao/magento2-in-action/647798](http://www.hmoore.net/zouhongzhao/magento2-in-action/647798) ***** ***** ## SMTP郵件功能 magento需要配置smtp才能發郵件,例如Amazon云的郵件服務,mailgun等 需安裝插件: [https://www.mageplaza.com/magento-2-smtp/](https://www.mageplaza.com/magento-2-smtp/) ![](https://img.kancloud.cn/14/e1/14e1b97a69c7f0953e8e8784592f9f52_695x277.png) 郵件發信地址配置好: ![](https://img.kancloud.cn/25/57/25573678ecf3b5c240cee5df4c90bc16_1292x612.png) 測試發信成功: ![](https://img.kancloud.cn/fa/0c/fa0c76150df237ba5a29a38395d002f2_816x621.png) ***** ## 后臺配置全部檢查一次:(重要) ![](https://img.kancloud.cn/92/54/92543dee63f7c8c4ddb995c49e395c0f_612x724.png) ***** # 開發前準備: **1. 開啟調試功能 debug** 1.1 ,切換到 develop模式 ~~~ php bin/magento deploy:mode:set developer ~~~ 1.2,前端頁面提示 layout+container: ![](https://img.kancloud.cn/3e/d1/3ed1539105b0fedfb916d77ed56d9621_1523x555.png) ***** 1.3,debug后臺模塊位置: https://bbs.mallol.cn/question/m2-open-foreground-template-debugging-path/ ***** **2. 怎樣查看Log:** 參考:2.1,http://www.hmoore.net/zouhongzhao/magento2-in-action/681201 2.2,https://devdocs.magento.com/guides/v2.3/config-guide/log/custom-logger-handler.html ``` ~~~ 查看log,debug的地方: 主要看debug.log/exception.log 如果還沒有可靠的信息的話,就看apache/nginx里配置的error log。 ~~~ ``` **3,基本知識學習:** http://www.hmoore.net/zouhongzhao/magento2-in-action (國內) https://www.mageplaza.com/ (國外) **4, restful api的使用:** [REST API reference | Adobe Commerce Developer Guide (magento.com)](https://devdocs.magento.com/redoc/2.3/) 參考: http://www.hmoore.net/zouhongzhao/magento2-in-action/861578 ~~~ //通過rest/V1/integration/admin/token登錄后臺生成token $userData = array("username" => "zou", "password" => "zou用戶的密碼"); $ch = curl_init("http://magento2demo.texiaoyao.cn/rest/V1/integration/admin/token"); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($userData)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Content-Lenght: " . strlen(json_encode($userData)))); $token = curl_exec($ch); $ch = curl_init("http://magento2demo.texiaoyao.cn/rest/V1/customers/1"); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token))); $result = curl_exec($ch); var_dump($result); ~~~ 返回結果: ~~~ string(641) "{"id":1,"group_id":1,"default_shipping":"1","created_at":"2018-06-11 01:09:31","updated_at":"2018-11-30 05:01:44","created_in":"Default Store View","email":"zouhongzhao@126.com","firstname":"zou","lastname":"hongzhao","store_id":1,"website_id":1,"addresses":[{"id":1,"customer_id":1,"region":{"region_code":"\u6e56\u5317","region":"\u6e56\u5317","region_id":0},"region_id":0,"country_id":"CN","street":["\u9ad8\u65b0\u5927\u9053"],"telephone":"1510232345","postcode":"430000","city":"\u6b66\u6c49","firstname":"zou","lastname":"hongzhao","default_shipping":true}],"disable_auto_group_change":0,"extension_attributes":{"is_subscribed":false}}" ~~~ ***** ## 萬能命令,修復問題: ~~~ php bin/magento maintenance:enable rm -rf var/di/* && rm -rf var/generation/* && rm -rf var/cache/* && rm -rf var/page_cache/* && rm -rf var/view_preprocessed/* && rm -rf pub/static/* && rm -rf generated/* && mkdir var/di php bin/magento setup:upgrade && php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f && php bin/magento indexer:reindex && php bin/magento maintenance:disable && php bin/magento cache:clean && php bin/magento cache:flush ~~~ ## 服務器配置: 建議:4核16g =》同時250人/min =》達到基本要求
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看