apt install composer apt-get install composer joe /var/www/html/catalog/model/catalog/product.php joe /var/www/html/system/library/cart/cart.php https://getcomposer.org/2 composer self-update --2 /var/www/html/image/catalog/demo oc_manufacturer -> 11:Unbranded oc_manufacturer_to_store --------------------- oc_product -> product_id, model, quantity, stock_status_id, image, manufacturer_id, shipping, price, points, tax_class_id, date_available, weight, weight_class_id, length, width, height, length_class_id, subtract, minimum, sort_order, status, viewed, date_added, date_modified, domestic oc_product_description -> product_id, language_id, name, description, meta_title oc_product_image -> product_image_id, product_id, image, sort_order oc_product_option -> product_option_id,product_id,option_id,required oc_product_option_value -> product_option_value_id,product_option_id,product_id,option_id,option_value_id,quantity,subtract,price,price_prefix,points,points_prefix,weight,weight_prefix oc_product_to_store -> product_id,store_id oc_option -> option_id,type,sort_order oc_option_description -> option_id,language_id,name,description oc_option_value -> option_value_id,option_id,image,sort_order oc_option_value_description -> option_value_id,language_id,option_id,name oc_product -> source_from, source_id cart + depot 綜合語言包 视频? 原始ID->oc_product_ext->source_id(20) 类型->oc_product_ext->source_from(5) 商品货号->oc_product_ext->collect_id(30) 品牌名称->oc_product_ext->brand(128) 店铺名称->oc_product_ext->shop_name(128) 店铺地址->oc_product_ext->shop_url(128) 客服号->oc_product_ext->shop_service(50) 地址->oc_product_ext->item_url(128) 所有属性->oc_product_ext->else_attr(256) 价格段1数量 价格段1价格 价格段2数量 价格段2价格 价格段3数量 价格段3价格->discount 起订量=minimum(產品page提示) 先作3層有短缺測試用csv + 分段 discount 货品库存=0->排除不用 第1層各取1最高價(货品销售价)+颜色图 第2層取在第1層都存在對應的最高價 (對應每value->X,XL,L..) 第3層取在第12層都存在對應的最高價 最後才寫入SQL wget 118.163.15.73/bpc/dv/popupop.twig -O /var/www/html/catalog/view/theme/default/template/product/popupop.twig -N wget 118.163.15.73/bpc/dv/product.php0 -O /var/www/html/catalog/controller/product/product.php -N wget 118.163.15.73/bpc/dv/product.php0 -O /var/www/storage/modification/catalog/controller/product/product.php -N store.initDataObj.goods.goodsID:98305814196 store.initDataObj.goods.goodsName:"金钱肚新鲜金钱肚蜂窝肚新鲜牛肚子批发清真半成品熟金钱肚包邮" ali->data-feature-json C:\Users\dv-10\AppData\Local\Google\Chrome\User Data\Default\Cache store.initDataObj.goods.skus[0].thumbUrl thumbUrl: "https://img.pddpic.com/mms-material-img/2020-08-16/28329ba4-80d8-4628-8e1f-e91f033ec388.jpeg.a.jpeg" "https://img.pddpic.com/mms-material-img/2020-06-09/459eb65f-e251-43a1-923a-b598f89f1f24.jpeg" "https://img.pddpic.com/mms-material-img/2020-07-27/0322df81-a866-42ce-9130-256726654b33.jpg.a.jpeg" "https://img.pddpic.com/mms-material-img/2020-07-27/e8b5435a-0c89-4d2b-96bc-4b9e97ae10e5.jpg.a.jpeg" "https://img.pddpic.com/mms-material-img/2020-07-27/e8b5435a-0c89-4d2b-96bc-4b9e97ae10e5.jpg.a.jpeg" https://img-2.pddpic.com/mms-material-img/2021-01-04/5ddce740-fb3c-4629-bb66-dd74a76bbc02.jpeg.a.jpeg?imageView2/2/w/400/q/80/format/webp store.listData.list[0].goodsID:195177802523 store.listData.list[0].goodsName:"【牛肚|10斤】(全熟牛肚丝/牛肚块)4斤半成品牛肚块火锅牛肚丝牛肚1斤熟牛肚" {"orientation":"Up","RequestId":"1dff2854-edc9-4610-8275-1a13f3c7c9b5","lanFrom":"zh-CHS","textAngle":"0.0","errorCode":"0","lanTo":"en","exif":"Up","resRegions":[{"boundingBox":"0,569,524509628,70","color":"default","linesCount":1,"lineheight":70,"context":"活动价","tranContent":"Activity price","dir":"h","lang":"zh-CHS","colors":["default"],"text_align":"left"}]} ========================================================================================================================= 有道翻譯圖片 (!! 如果文字在圖片上下四周會被忽略不翻譯 !!) 1.) dvonyd + aa2233zz + 13538792973 -> 应用名称 wg-1 应用ID 2c39cff707d6a625 应用密钥 OfXBzMwbqb4nWPDQqDXlF66UflDMUwf5 2.) 新增实例 -> 绑定应用 实例名 wg-pic 产品类型 自然语言翻译服务-图片翻译 实例ID 760e9e9007ea1ad9 3.) joe /var/www/html/dv/dv-youdao.php -> define("APP_KEY", "2c39cff707d6a625"); // 替换为您的应用ID define("SEC_KEY", "OfXBzMwbqb4nWPDQqDXlF66UflDMUwf5"); // 替换为您的密钥 //必加否則不會回傳圖片 function do_request($q){ ... $args['render'] = 1; //新增函數將回傳圖片 base64 在 ['render_image'] 轉存圖片文件 base64_image_content($ret['render_image'],'pic-'.date('YmdHis')); ... function base64_image_content($base64_image_content,$path){ --- 20210306 有道翻譯圖片 ========================================================================================================================= opencart-3.0.3.6 新增 SSL oc.wg-1.com 1.) freessl.com -> 1837794505@qq.com + aa2233zz + 13538792973 //申請 TrustAsia 免費一年 CA 證書 2.) keymanager.org -> download software + aa2233zz //在 PC 安裝軟體產生 CSA 向 CA (freessl) 申請證書 3.) godaddy.com -> TXT-> _dnsauth.oc -> 2021030503093620g83x0fdfkbvpvhafqohun9hv8cj30ccyf0baaky8dautbfer //將 CA 給的認證資料填在 DNS 管理商的平台上等待 CA 認證 4.) oc-wg-1-com-apache-0306113952.zip -> aws-sd //將 CA 證書 + 證書 + 私鑰上傳到網站指定位置 /etc/ssl/certs/oc.wg-1.com.crt /etc/ssl/private/oc.wg-1.com_key.key /etc/apache2/ssl.crt/ca_bundle.crt 5.) joe /etc/apache2/sites-available/default-ssl.conf //修改 3 個位置的設定 SSLCertificateFile /etc/ssl/certs/oc.wg-1.com.crt SSLCertificateKeyFile /etc/ssl/private/oc.wg-1.com_key.key SSLCACertificateFile /etc/apache2/ssl.crt/ca_bundle.crt 6.) ln -s /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-enabled/default-ssl.conf //生效 SSL 的設定 apachectl configtest a2enmod ssl systemctl restart apache2 7.) opencart 後台->System->Setting->Store->Server->Security->Use SSL->Yes //修改 opencart 前後台所有相關設定(設定的 url 必需符合申請證書的 url) joe /var/www/html/config.php -> define('HTTPS_SERVER', 'https://oc.wg-1.com/'); joe /var/www/html/admin/config.php -> define('HTTPS_SERVER', 'https://oc.wg-1.com/admin/'); define('HTTPS_CATALOG', 'https://oc.wg-1.com/'); --- 20210306 opencart-3.0.3.6 新增 SSL oc.wg-1.com ========================================================================================================================= 1.) oc_product_source //存放采集到的暫用不到的原始資料 product_id source_id source_from collect_id source_brand shop_name shop_url shop_service source_url else_attr video_list 2.) oc_product_ext //存放實現新功能的 product 相關資料 product_id domestic disable_options->15-30-38,15-30-39 --- 20210303 opencart-3.0.3.6 新增 SQL 資料表 ========================================================================================================================= 1.) Extensions->Installer->upload oc3036.ocmod.zip ->error: mkdir permission denied ->cd /var/www/html/catalog/language/ chmod 777 zh-cn -R ->cd /var/www/html/admin/language/ chmod 777 zh-cn -R 2.) Extensions->Modifications->Clear + Refresh 3.) System->Localisation->Languages->Add New --- 20210228 opencart-3.0.3.6 安裝簡體中文錯誤-> 修改 catalog/language, admin/language 權限 ========================================================================================================================= 修改 shopping cart + forward depot 流程結構 ------------------------------------------------------------------------------- tab shopping cart + tab forward depot 1.) 進入購物車 -> tab-cart + tab-depot joe /var/www/html/catalog/controller/checkout/cart.php //抓取 db->oc_cart, oc_depot 資料傳參 checkout/cart.twig ->$this->response->setOutput($this->load->view('checkout/cart', $data)); //修改判斷 cart 為空時不調用 error\not_found //新增判斷 cart 為空 depot 不為空時直接 active tab-depot joe /var/www/html/catalog/view/theme/default/template/checkout/cart.twig //移除原購物車明細改為調用 checkout/tabcart.twig ->{% include('default/template/checkout/tabcart.twig') %} 1-1.) tab-cart 點 shipping comparison -> 展開折疊運費比較表 joe /var/www/html/catalog/view/theme/default/template/checkout/tabcart.twig //新增 tab-cart 按折疊按鈕 ajax 調用 tabestship.php 產生可折疊運費比較表 ->$.ajax({ url: 'index.php?route=checkout/tabestship', //新增判斷 tab-cart 為空提示 -> The shopping cart is empty! 1-2.) tab-depot 點 checkbox -> 自動更新運費 + shipping methods //新增 tab-depot + checkbox 變化時 ajax 調用 tabestship/depotship 函數上傳選項後回傳新資料 json 更新運費 ->$.ajax({ url: 'index.php?route=checkout/tabestship/depotship', //新增判斷 tab-depot 為空提示 -> The forward depot is empty! //新增判斷 cart 為空 depot 不為空時直接 active tab-depot ->
  • ->
    ------------------------------------------------------------------------------- shopping cart checkout 2.) tab-cart 點 checkout -> 進入 cart checkout joe /var/www/html/catalog/controller/checkout/checkout.php //新增 session 保存上傳 cart select 內容 ->$this->session->data['cartselect']=$this->request->post['selected']; //修改為跳過 shipping_address, shipping_method 步驟 ->$data['text_checkout_payment_method'] = sprintf($this->language->get('text_checkout_payment_method'), 3); $data['text_checkout_confirm'] = sprintf($this->language->get('text_checkout_confirm'), 4); joe /var/www/html/catalog/view/theme/default/template/checkout/checkout.twig ->{# --- {% if shipping_required %} ... {% endif %} --- #} //合併 payment_method, confirm 步驟 ->{# ---
    ...
    --- #} 2-1.) 未 login 客戶 Step 1 選擇 New -> 進入填表頁 joe /var/www/html/catalog/view/theme/default/template/checkout/register.twig //刪除不需填的地址欄位 company, address_1, address_2, city, zone, postcode + 訂閱 2-1-1.) 未 login 客戶填表頁完成 -> 成為已 login 客戶重新進入 2-2.) joe /var/www/html/catalog/controller/checkout/register.php //刪除判斷必填加直接預設值 company, address_1, address_2, city, zone, postcode ->public function save() { ... $this->request->post['zone_id']=3624; // CA 2-2.) 已 login 客戶直接進入 Step 3 payment_method //修改為已 login 直接 ajax 調用 checkout/cartorder 步驟 joe /var/www/html/catalog/view/theme/default/template/checkout/checkout.twig ->$.ajax({ url: 'index.php?route=checkout/cartorder', //以 confirm.php 為主加 payment_method.php 產生 $method_data 部分 joe /var/www/html/catalog/controller/checkout/cartorder.php //修改預產生 order 加參數 db->oc_order->mode ->$order_data['mode'] = 'cart'; //新增來源於 cheque.php 的函數 confirm() 用於確認定單後修改 db->oc_order->order_status + 跳轉成功頁 ->public function confirm() { //修改寫入 SQL 加參數 db->oc_order->mode joe /var/www/html/catalog/model/checkout/order.php ->$this->db->query("INSERT INTO ... mode = '" . $this->db->escape($data['mode']) . "'"); 2-3.) Step 3 payment_method 點 confirm order -> 確認定單並跳轉到成功頁 //修改按確認後直接 ajax 調用 cartorder/confirm joe /var/www/html/catalog/view/theme/default/template/checkout/cartorder.twig ->$.ajax({ url: 'index.php?route=checkout/cartorder/confirm', //新增函數 duptoDepot() 將 select cart 資料複制到 db->oc_depot joe /var/www/html/system/library/cart/cart.php ->public function duptoDepot() { //修改函數 clear() 將刪除 all cart -> select cart //新增調用函數 duptoDepot() joe /var/www/html/catalog/controller/checkout/success.php ->$this->cart->duptoDepot(); ------------------------------------------------------------------------------- forward depot checkout 3.) tab-depot 點 checkout -> 進入 depot checkout joe /var/www/html/catalog/controller/checkout/depotcheckout.php //複制原 checkout.php 並修改調用 template ->$this->response->setOutput($this->load->view('checkout/depotcheckout', $data)); //新增 session 保存上傳 depot select 內容 ->$this->session->data['cartselect']=$this->request->post['selected']; //複制原 checkout.twig 為 depotcheckout.twig 3-1.) 只有 login 客戶可以點 checkout -> 進入 Step 2 payment_address joe /var/www/html/catalog/controller/checkout/payment_address.php //新增判斷 default_address 是否不完整->複制原 account/address->getForm() 讀取地址資料預設定表格變數值部分 ->if($data['addresses'][$data['address_id']]['address_1']=='' || $data['addresses'][$data['address_id']]['city']==''){ ->if(!$default_address){ ... joe /var/www/html/catalog/view/theme/default/template/checkout/payment_address.twig //新增判斷 default_address 是否不完整->導入編輯地址表格 template ->{% else %} {% include('default/template/checkout/edit_default_address.twig') %} 3-1-1.) default_address 不完整客戶 -> 填寫地址表格 joe /var/www/html/catalog/view/theme/default/template/checkout/edit_default_address.twig //複制原 account/address_form.twig 編輯地址表格部分 //修改所有 for 屬性 "input- -> "input-payment- -> //修改 continue 按鈕 -> 3-2.) 完成 payment_address 按 continue -> 進入 Step 3 shipping_address joe /var/www/html/catalog/controller/checkout/payment_address.php //新增判斷保存 default_address 是否不完整->editAddress() ->$this->model_account_address->editAddress($address_id, $this->request->post); 3-3.) 完成 shipping_address 按 continue -> 進入 Step 4 shipping_method 3-4.) 完成 shipping_method 按 continue -> 進入 Step 5 payment_method //修改為 ajax 調用 checkout/depotorder 步驟 joe /var/www/html/catalog/view/theme/default/template/checkout/depotcheckout.twig ->$.ajax({ url: 'index.php?route=checkout/depotorder', //複制 cartorder.php 為主修改所有讀取資料由 cart -> depot //修改預產生 order 加參數 db->oc_order->mode ->$order_data['mode'] = 'depot'; //新增傳參 $data['products']['unit_weight'], ['weight'] //修改刪除傳參 totals 中的 Sub-Total, Domestic-Shipping joe /var/www/html/catalog/controller/checkout/depotorder.php //修改函數 confirm() 跳轉成功頁目標 ->$json['redirect'] = $this->url->link('checkout/depotsuccess'); 3-5.) Step 5 payment_method 點 confirm order -> 確認定單並跳轉到成功頁 //修改按確認後直接 ajax 調用 depotorder/confirm joe /var/www/html/catalog/view/theme/default/template/checkout/depotorder.twig ->$.ajax({ url: 'index.php?route=checkout/depotorder/confirm', //新增複制函數 clear() -> depotclear() 將刪除 select cart -> select depot joe /var/www/html/system/library/cart/cart.php ->public function depotclear() { //修改調用函數 depotclear() joe /var/www/html/catalog/controller/checkout/depotsuccess.php ->$this->cart->depotclear(); --- 20210225 opencart-3.0.3.6 修改 shopping cart + forward depot 流程結構 ================================================================================================= 解決無法同時設定 seesion shipping_address payment_address 1.) joe /var/www/html/catalog/controller/account/login.php -> if ($this->config->get('config_tax_customer') == 'payment') { ... $this->session->data['shipping_address'] = $this->session->data['payment_address']; if ($this->config->get('config_tax_customer') == 'shipping') { ... $this->session->data['payment_address'] = $this->session->data['shipping_address']; 2.) joe /var/www/html/catalog/controller/checkout/tabestship.php -> if(!isset($this->session->data['shipping_address'])){ $this->session->data['shipping_address']['country_id'] = $this->config->get('config_country_id'); $this->session->data['shipping_address']['zone_id'] = "0"; --- 20210225 opencart-3.0.3.6 解決無法同時設定 seesion shipping_address payment_address ================================================================================================= Shopping Cart 頁新增 Shipping Comparison 折疊區 (!!用 php debug 直接 echo 會改變 user agent stylesheet 不可測!!) 1.) joe /var/www/html/catalog/view/theme/default/template/checkout/tabcart.twig //新增在 panel-group modules 後插入折疊塊 div panel, panel-heading, panel-title, panel-body ->
    ...
    //新增點折疊箭頭 ajax 調用 tabestship 上傳 select cart 取得比較表傳入折疊塊 ->$.ajax({ url: 'index.php?route=checkout/tabestship', //修改 checkbox 改變時自動折疊 Shipping Comparison 折疊區 ->$(".collapse.in").collapse("toggle"); 2.) joe /var/www/html/catalog/controller/checkout/tabestship.php //新增 $shippings 傳參計算4種 weight type 組合(morecart, selectcart, allcart, alldepot) 的 shipping //新增函數 getAllShippings() 根據 shipping_address 有效物流取回各家所有 weight_type 的報價相關資料 ->public function getAllShippings() { //新增函數 getMinShipping() 根據 weight_type 取回最低物流的報價相關資料 ->public function getMinShipping($quotes, $weight_type) { (20210225 for tabcart.twig ajax 調用取得 json 報價相關資料) //新增函數 depotship() 以 json 格式小到大排序取回各家所有 weight_type 的報價相關資料 ->public function depotship() { 3.) joe /var/www/html/catalog/view/theme/default/template/checkout/tabestship.twig //複制 product/compare.twig 內容為主 + 使用 aweson icon --- 20210224 opencart-3.0.3.6 Shopping Cart 頁新增 Shipping Comparison 折疊區 ========================================================================================================================= 新增多家 shipping extension dv_yw01->燕文專線追踪普貨 1.) joe /var/www/html/admin/controller/extension/shipping/dv_yw01.php //修改 class name + 所有變數 dv_eub -> dv_yw01 2.) joe /var/www/html/admin/language/en-gb/extension/shipping/dv_yw01.php //修改所有說明 dv_eub -> dv_yw01 3.) joe /var/www/html/admin/view/template/extension/shipping/dv_yw01.twig //修改所有變數 dv_eub -> dv_yw01 4.) Extensions->Extensions->Shipping->install + edit //後台先安裝 extension -> db->oc_extension 自動產生 shipping dv_yw01 -> edit total 0.01 + status enable + sort order 3 5.) joe /var/www/html/catalog/model/extension/shipping/dv_yw01.php //修改 class name + 所有變數 dv_eub -> dv_yw01 6.) joe /var/www/html/catalog/language/en-gb/extension/shipping/dv_yw01.php //修改所有說明 dv_eub -> dv_yw01 7.) joe /var/www/html/system/library/cart/cart.php //新增函數根據不同目標統計重量 allcart, selectcart, alldepot, selectdepot ->public function getAllWeights() { 8.) joe /var/www/html/catalog/model/extension/shipping/dv_yw01.php //根據符合的 range 計算所有 type weight 的運費 ->$typecost[$type]=round(($range['fix']+$range['rate']*$costwgt/1000)*$rmb,2); //新增最大 range 的運費->max ->$typecost['max']=round(($ranges[count($ranges)-1]['fix'] + $ranges[count($ranges)-1]['rate']*$ranges[count($ranges)-1]['to'])*$rmb,2); --- 20210222 opencart-3.0.3.6 新增多家 shipping extension ================================================================================================= 新增 dv_eub shipping extension 1.) cp /var/www/html/admin/controller/extension/shipping/free.php -> dv_eub.php //複制後台 extension controller + 改 class name(必需要和php名相同) + 改所有變數 free -> dv_eub 2.) cp /var/www/html/admin/language/en-gb/extension/shipping/free.php -> dv_eub.php //複制後台語言包 + 改所有常數 free -> dv_eub 3.) cp /var/www/html/admin/view/template/extension/shipping/free.twig -> dv_eub.twig //複制後台 extension template + 改所有變數 free -> dv_eub 4.) Extensions->Extensions->Shipping->install + edit //後台先安裝 extension -> db->oc_extension 自動產生 shipping dv_eub -> edit total 0.01 + status enable + sort order 3 5.) cp /var/www/html/catalog/model/extension/shipping/item.php -> dv_eub.php //複制前台 extension model + 改 class name(必需要和php名相同) + 改所有變數 item -> dv_eub //計算和產生 $method_data 的核心程式 6.) cp /var/www/html/catalog/language/en-gb/extension/shipping/free.php -> dv_eub.php //複制前台語言包 + 改所有常數 free -> dv_eub --- 20210220 opencart-3.0.3.6 新增 dv_eub shipping extension ================================================================================================= 使用 FontAwesome icon 1.) 用 FontForge 打開 /var/www/html/catalog/view/javascript/font-awesome/fonts/fontawesome-webfont.woff2 //從 \f000 到 \f2e0 挑 icon 2.) .. //只能用 class before/after 調用 icon ->.icon-q:before{ font-family: FontAwesome; content: "\f217"; --- 20210218 使用 FontAwesome icon ========================================================================================================================= 使用 js bootstrap collapes 1.)
    ...
    //用 panel-group 裝入將所有 panel 2.)
    ...
    //用 panel 裝入個別 panel-heading + panel-collapse 3.) ... //個別 panel-heading 中要帶一個 指向同一 panel panel-collapse 的 id 用以 toggle 本 panel-collapse 折疊或展開 //個別 panel-heading 中要帶一個 其中 data-parent 指向父容器的 id 用以折疊所有其他的 panel-collapse 達到 accordion 效果 4.)
    ...
    //個別 panel-collapse 內裝入要折疊或展開的內容 5.) $(".collapse.in").collapse("toggle"); //用 js 將所有已展開(class 中帶有 in)的 panel-collapse 觸發一次折疊 --- 20210218 使用 js bootstrap collapse ========================================================================================================================= checkout 頁合併付款方式 + 定單確認為一頁 1.) joe /var/www/html/catalog/view/theme/default/template/checkout/checkout.twig //刪除第3,4,6步驟(Delivery Details, Delivery Method, Confirm Order)的折疊區塊 ->
    ...
    //修改如果登入時已 logged 的 ajax 下載頁面為由原 payment_address -> 新增的 cartorder (panel 仍為 #collapse-payment-method) ->$.ajax({ url: 'index.php?route=checkout/cartorder', ... success: function(html) { $('#collapse-payment-method .panel-body').html(html); 2.) joe /var/www/html/catalog/view/theme/default/template/checkout/cartorder.twig //以原 payment_method.twig 為基礎刪除同意條款 + continue 送出選付款方式按鈕 ->{% if text_agree %}...{% endif %} //將原 confirm.twig 的 order 內容 + total 列表移入至最上方 + 增加 style ->{% if not redirect %}...{% endif %} //將原 confirm.twig 的 confirm 確定定單按鈕移入至最下方 -> //將原 cheque.twig 的 confirm 確定定單按鈕送出 ajax 的 js 移入至最下方 + 修改原 cheque/confirm -> cartorder/confirm -> $.ajax({ url: 'index.php?route=checkout/cartorder/confirm', 3.) joe /var/www/html/system/library/cart/cart.php //新增函數將原 getProducts() 取得的 array 與 session->data['cartselect'] 比較後去除多餘的 array 元素後返回新 array //public function getSelectProducts() { //新增函數將原 getSubTotal() 由合計所有 item 改為只合計選中 item //public function getSelectSubTotal() { //修改函數只統計已選產品國內運費 ->public function getTotalDomestic() { //修改函數只刪除已買產品 ->public function clear() { 4.) joe /var/www/html/catalog/controller/checkout/cartorder.php //以原 confirm.twig 為基礎修改 class 名(不改會直接錯誤) ->class ControllerCheckoutCartorder extends Controller { //刪除判斷 session payment_method ->//if (!isset($this->session->data['payment_method'])) { ... //修改3個調用 getProducts() 為 getSelectProducts() ->$products = $this->cart->getSelectProducts(); //修改調用 getSubTotal() 為 getSelectSubTotal() ->$subtotal = $this->cart->getSelectSubTotal(); //修改預設 session comment 值(不加易錯誤) ->$this->session->data['comment']=''; //將原 payment_method.php 中產生 payment method 不重複的部分移入對應部分 ->$method_data = array(); ... $this->session->data['payment_methods'] = $method_data; //將原 payment_method.php 中7個判斷和處理 session 有關的部分移入對應部分 ->if (empty($this->session->data['payment_methods'])) { ... if (isset($this->session->data['agree'])) { //將原 cheque.php 中的函數 confirm() 刪除判斷 session payment_method + comment 後移入最下方 ->public function confirm() { // from cheque.php --- 20210215 opencart-3.0.3.6 checkout 頁合併付款方式 + 定單確認為一頁 ========================================================================================================================= 研究原結帳流程 1.) /var/www/html/catalog/view/theme/default/template/checkout/checkout.twig //ajax 下載 checkout/payment_method 付款方式列表 + continue 按鈕 + (付款留言 + 同意條款) ->$.ajax({ url: 'index.php?route=checkout/payment_method', //點 continue 按鈕 ajax 上傳選擇付款方式保存在 session ->$(document).delegate('#button-payment-method', 'click', function() { $.ajax({ url: 'index.php?route=checkout/payment_method/save', //上傳成功後再 ajax 下載 confirm 頁內容 ->$.ajax({ url: 'index.php?route=checkout/confirm', 2.) /var/www/html/catalog/controller/checkout/confirm.php //產生 order 所有資料 + 結帳清單內容合計 + 暫時定單寫入SQL (order_status_id=0 為無效定單) ->$this->session->data['order_id'] = $this->model_checkout_order->addOrder($order_data); //調用已選付款方式 extension (例: cheque, cod, pp_braintree ...) ->$data['payment'] = $this->load->controller('extension/payment/' . $this->session->data['payment_method']['code']); 3.) /var/www/html/catalog/view/theme/default/template/extension/payment/cheque.twig //付款方式說明 + 確認定單按鈕 + 點確認定單按鈕後調用函數 confirm ->$.ajax({ url: 'index.php?route=extension/payment/cheque/confirm', 4.) var/www/html/catalog/controller/extension/payment/cheque.php //定單歷史記錄 + 確認定單狀態寫入SQL (order_status_id=1) ->$this->model_checkout_order->addOrderHistory($this->session->data['order_id'], $this->config->get('payment_cheque_order_status_id'), $comment, true); //通知跳轉向 success 頁 ->$json['redirect'] = $this->url->link('checkout/success'); 5.) /var/www/html/catalog/controller/checkout/success.php //調用 libaray 清除 cart ->$this->cart->clear(); 6.) /var/www/html/system/library/cart/cart.php //刪除 db->oc_cart 所有產品 ->$this->db->query("DELETE FROM " . DB_PREFIX . "cart WHERE api_id = '" . (isset($this->session->data['api_id']) ? (int)$this->session->data['api_id'] : 0) . "' AND customer_id = '" . (int)$this->customer->getId() . "' AND session_id = '" . $this->db->escape($this->session->getId()) . "'"); --- 20210215 opencart-3.0.3.6 研究原結帳流程 ================================================================================================= shopping-cart 頁可選部分產品 checkout 1.) joe /var/www/html/catalog/view/theme/default/template/checkout/tabcart.twig //用 submit 把 checkbox selected array -> 上傳 checkout/checkout ->
    2.) joe /var/www/html/catalog/controller/checkout/checkout.php //將收到 checkbox selected array 存入 session 如果沒收到存空array -> if(isset($this->request->post['selected'])){ $this->session->data['cartselect']=$this->request->post['selected']; } else{ $this->session->data['cartselect']=array(); } 3.) joe /var/www/html/system/library/cart/cart.php //新增函數根據 session 從 array 排除未選產品 ->public function getSelectProducts() { //新增函數只統計已選產品金額 ->public function getSelectSubTotal() { //修改函數只統計已選產品國內運費 ->public function getTotalDomestic() { //修改函數只刪除已買產品(最後由 checkout/success.php 調用) ->public function clear() { 4.) joe /var/www/html/catalog/model/extension/total/sub_total.php //修改調用函數只統計已選產品金額 ->//$sub_total = $this->cart->getSubTotal(); $sub_total = $this->cart->getSelectSubTotal(); --- 20210215 opencart-3.0.3.6 shopping-cart 頁可選部分產品 checkout ================================================================================================= 修改 shopping cart 頁彈窗為共用 joe /var/www/html/catalog/view/theme/default/template/checkout/tabcart.twig //修改彈窗 div 結構 {# ---------- modal alert ---------------- #} //使用時傳參 + 調用彈窗 $("#modal-header").html("Are you sure about this?"); $("#modal-body").html("This action will remove this item from your shopping cart."); $("#modal-button").html("Remove"); $("#modal-button").attr(tmpa2,"remove"); $("#modal-button").attr(tmpa,tmpid); $("#modal-alert").modal("show"); //按鍵時判斷按鍵功能 $("#modal-button").click(function() { var tmpa2="data-func"; if($(this).attr(tmpa2)=="remove"){ --- 20210215 opencart-3.0.3.6 修改 shopping cart 頁彈窗為共用 ================================================================================================= 修改 checkout 頁流程格式 1.) 未login -> ajax checkout/login -> 放入Step 1 (#collapse-checkout-option) joe /var/www/html/catalog/view/theme/default/template/checkout/checkout.twig ->$.ajax({ url: 'index.php?route=checkout/login' 1-1.) 如果按 continue(Register Account) -> ajax checkout/register -> 放入Step 2 (#collapse-payment-address) joe /var/www/html/catalog/view/theme/default/template/checkout/checkout.twig ->$.ajax({ url: 'index.php?route=checkout/' + $('input[name=\'account\']:checked').val(), 1-1-1.) 填註冊資料再按 continue -> ajax post checkout/register/save -> 註冊成功自動 login -> 2.) joe /var/www/html/catalog/view/theme/default/template/checkout/regidter.twig 修改: fieldset.legend->Your Address->Ship To 修改: 刪除所有address欄位只留下國家 + 刪除訂閱 修改: Disable所有國家只留下美國->UPDATE oc_country SET status=0 WHERE country_id<>223 joe /var/www/html/catalog/controller/checkout/regidter.php 修改: 刪除 telephone, address_1, city 錯誤判斷 修改: 預設值 $this->request->post['zone_id']=""; company, address_1, address_2, postcode, city, zone_id, shipping_address(=payment_address) ->$.ajax({ url: 'index.php?route=checkout/register/save', 1-2.) 如果填 e-mail + psw 再按 login -> ajax post checkout/login/save -> login 成功 -> 2.) ->$.ajax({ url: 'index.php?route=checkout/login/save', 錯誤: /var/www/html/catalog/controller/checkout/login.php 根據 config_tax_customer 設值 $this->session->data['payment_address'] /var/www/html/catalog/controller/checkout/payment_method.php 判斷 $this->session->data['payment_address'] 是否列表 payment method 修改: 後台System->Settings->Store->Option->Use Customer Tax Address/Use Store Tax Address 都改為->Payment Address 2.) 已login -> ajax checkout/payment_method -> 放入Step 3 (#collapse-payment-method) joe /var/www/html/catalog/controller/checkout/checkout.php 修改: payment_method, checkout_confirm step 5,6->3,4 ->$data['text_checkout_payment_method'] = sprintf($this->language->get('text_checkout_payment_method'), 3); $data['text_checkout_confirm'] = sprintf($this->language->get('text_checkout_confirm'), 4); joe /var/www/html/catalog/view/theme/default/template/checkout/regidter.twig 修改: 跳過 step payment_address, shipping_address 改成直接到 step payment_method ->$.ajax({ url: 'index.php?route=checkout/payment_method', 3.) 選付款方式再按 continue -> ajax post checkout/payment_method/save -> ajax checkout/confirm -> 放入Step 4 (#collapse-checkout-confirm) ->$.ajax({ url: 'index.php?route=checkout/payment_method/save', joe /var/www/html/catalog/controller/checkout/confirm.php 錯誤: 判斷有$this->cart->hasShipping() 但 session 沒有 shipping_address, shipping_method 直接跳回原層級 修改: 將 $this->cart->hasShipping() 改為 false && $this->cart->hasShipping() ->$.ajax({ url: 'index.php?route=checkout/confirm', Ext.) 在非 checkout 頁註冊增加 Ship To joe /var/www/html/catalog/view/theme/default/template/account/regidter.twig 修改: 刪除 fieldset 訂閱 修改: 新增 fieldset Ship To 只有國家 joe /var/www/html/catalog/controller/account/regidter.php ->public function index() { ... 修改: 新增地址寫入SQL + set default address + set session address 修改: 預設值 $this->request->post['zone_id']=""; company, address_1, address_2, postcode, city, zone_id, shipping_address(=payment_address) 修改: 新增讀取國家列表 + 預設 $data['country_id'] ->private function validate() { ... 修改: 新增 country_id 錯誤判斷 修改: 刪除 telephone 錯誤判斷 --- 20210214 opencart-3.0.3.6 修改 checkout 頁流程格式 ================================================================================================= 修改無地址註冊用戶-> login 後錯誤(所有註冊都加地址->已回復未改) joe /var/www/html/catalog/controller/startup/startup.php-> 錯誤: 如果無地址 session->data['shipping_address'] 是 false 而不是 array ->if (isset($this->session->data['shipping_address'])) { ... if (isset($this->session->data['payment_address'])) { 修改: 改為判斷是否是 array ->if (is_array($this->session->data['shipping_address'])) { ... if (is_array($this->session->data['payment_address'])) { --- 20210213 opencart-3.0.3.6 修改無地址註冊用戶-> login 後錯誤(所有註冊都加地址->已回復未改) ================================================================================================= 取消註冊 telephone required 1.) 刪除所有判斷 telephone 長度的 controller joe /var/www/html/catalog/controller/account/register.php joe /var/www/html/catalog/controller/account/edit.php joe /var/www/html/catalog/controller/checkout/register.php joe /var/www/html/admin/controller/customer/customer.php -> // if ((utf8_strlen($this->request->post['telephone']) < 3) || (utf8_strlen($this->request->post['telephone']) > 32)) { // $this->error['telephone'] = $this->language->get('error_telephone'); // } 2.) 修改所有加 required 星號的 template joe /var/www/html/catalog/view/theme/default/template/account/register.twig joe /var/www/html/catalog/view/theme/default/template/account/edit.twig joe /var/www/html/catalog/view/theme/default/template/checkout/register.twig joe /var/www/html/admin/view/template/customer/customer_form.twig ->
    //刪除 required ->
    --- 20210213 opencart-3.0.3.6 取消註冊 telephone required ================================================================================================= 新增 shopping cart 頁數量為0時彈窗確認刪除 joe /var/www/html/catalog/view/theme/default/template/checkout/tabcart.twig //建立彈窗 div 結構 //為0時傳參 + 調用彈窗 $('#button-remove').attr(tmpa,tmpid); $('#modal-remove').modal('show'); --- 20210212 opencart-3.0.3.6 新增 shopping cart 頁數量為0時彈窗確認刪除 ================================================================================================= 新增 shopping cart 頁 total extension->domestic shipping 國內運費 1.) cp /var/www/html/admin/controller/extension/total/sub_total.php -> domestic.php //複制後台 extension controller + 改 class name(必需要和php名相同) + 改所有變數 sub_total -> domestic 2.) cp /var/www/html/admin/language/en-gb/extension/total/sub_total.php -> domestic.php //複制後台語言包 + 改所有常數 sub_total -> domestic 3.) cp /var/www/html/admin/view/template/extension/total/sub_total.twig -> domestic.twig //複制後台 extension template + 改所有變數 sub_total -> domestic 4.) cp /var/www/html/catalog/model/extension/total/sub_total.php -> domestic.php //複制前台 extension model + 改 class name(必需要和php名相同) + 改所有變數 sub_total -> domestic 5.) cp /var/www/html/catalog/language/en-gb/extension/total/sub_total.php -> domestic.php //複制前台語言包 + 改所有常數 sub_total -> domestic 6.) Extensions->Extensions->Order Totals->install + enable + sort order 3 //後台先安裝 extension -> 安裝後 db->oc_extension 自動產生 shipping domestic -> 再 enable + sort order 3 7.) joe /var/www/html/catalog/model/extension/total/domestic.php //修改調用 model cart 函數 ->$domestic = $this->cart->getTotalDomestic(); 8.) joe /var/www/html/system/library/cart/cart.php //新增統計國內運費變數 + 函數 ->'domestic' => $product_query->row['domestic'], ... public function getTotalDomestic() { --- 20210212 opencart-3.0.3.6 新增 shopping cart 頁 total extension->domestic shipping 國內運費 ================================================================================================= shopping cart 頁尾部所有 totals 產生路徑 1.) /var/www/html/catalog/view/theme/default/template/checkout/tabcart.twig //列出所有的 total ->{% for total in totals %} {{ total.title }}: {{ total.text }} {% endfor %} 2.) /var/www/html/catalog/controller/checkout/cart.php //取所有 total extension -> $results = $this->model_setting_extension->getExtensions('total'); //數據庫取所有 total extension list /var/www/html/catalog/model/setting/extension.php (!! type 是 SQL 保留字所有必需前後加 `type` !!) -> $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "extension WHERE `type` = '" . $this->db->escape($type) . "'"); -> db->oc_extension->code->10個值(sub_total,reward,shipping,coupon,tax,credit,voucher,total,handling,low_order_fee) //排序所有 total extension (讀取db->oc_setting所有設定) foreach ($results as $key => $value) { $sort_order[$key] = $this->config->get('total_' . $value['code'] . '_sort_order'); } //判斷所有 total extension 是否執行 (讀取db->oc_setting所有設定) -> if ($this->config->get('total_' . $result['code'] . '_status')) { //加載 total extension model -> $this->load->model('extension/total/' . $result['code']); //執行 total extension model 的 getTotal // We have to put the totals in an array so that they pass by reference. $this->{'model_extension_total_' . $result['code']}->getTotal($total_data); 3.) /var/www/html/catalog/model/extension/total/sub_total.php //第一個 total extension 取總貨款 -> $sub_total = $this->cart->getSubTotal(); 4.) /var/www/html/system/library/cart/cart.php //累加所有貨款 ->public function getSubTotal() { $total = 0; foreach ($this->getProducts() as $product) { $total += $product['total']; } //從 db->oc_cart 取產品 list ->public function getProducts() { ... $cart_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "cart WHERE api_id = '" . (isset($this->session->data['api_id']) ? (int)$this->session->data['api_id'] : 0) . "' AND customer_id = '" . (int)$this->customer->getId() . "' AND session_id = '" . $this->db->escape($this->session->getId()) . "'"); //從 db->oc_product 取產品資料 ->foreach ($cart_query->rows as $cart) { ... $product_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_to_store p2s LEFT JOIN " . DB_PREFIX . "product p ON (p2s.product_id = p.product_id) LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) WHERE p2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND p2s.product_id = '" . (int)$cart['product_id'] . "' AND pd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND p.date_available <= NOW() AND p.status = '1'"); ... $price = $product_query->row['price']; --- 20210212 opencart-3.0.3.6 研究 shopping cart 頁尾部所有 totals 產生路徑 ================================================================================================= shopping cart 頁->小屏內容不超出屏幕 + 新增 checkbox 列 1.) joe /var/www/html/catalog/controller/checkout/cart.php //放大縮圖 47x47 -> 100x100 ->// $image = $this->model_tool_image->resize($product['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_cart_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_cart_height')); $image = $this->model_tool_image->resize($product['image'], 100, 100); 2.) joe /var/www/html/catalog/view/theme/default/template/checkout/tabcat.twig //刪除 model 欄 {{ column_model }} {{ product.model }} //TD name 改為 div 移到 td-img 之下 //設 td-img, img, name 的 position .cart-td-img{ position: relative; .cart-img{ position: absolute; .cart-name{ position: relative; //設屏小於767px css @media only screen and (max-width: 767px) { -> //表單頭不顯示 .tsts{ display: none; ... thead class="tsts"> //設 td-price, td-qty, td-total 的 float, box-sizing, width .cart-td-price{ box-sizing: border-box; float: left; width: 30%; .cart-td-qty{ box-sizing: border-box; float: left; width: 40%; .cart-td-total{ box-sizing: border-box; float: left; width: 30%; //設 qty input 格的 min-width 小一點給手機版用 .cart-qty-input{ min-width: 40px !important; //加 price, qty, total 上方 title .cart-td-price:before{ content: "Price"; .cart-td-qty:before{ content: "Qty"; .cart-td-total:before{ content: "Subtotal"; //新增 td-checkbox 在表第一列 ... //表第一列放大 checkbox 方格 .cart-checkbox{ width: 20px; height: 20px; --- 20210211 opencart-3.0.3.6 修改 shopping cart 頁->小屏內容不超出屏幕 + 新增 checkbox 列 ================================================================================================= 修改 shopping cart 頁->增加 tab 1.) joe /var/www/html/catalog/view/theme/default/template/checkout/cart.twig //刪除原shopping cart 改為include tabcart.twig ->

    {{ heading_title }} ... {{ column_right }}

    ->{% include('default/template/checkout/tabcart.twig') %} 2.) joe /var/www/html/catalog/view/theme/default/template/checkout/tabcart.twig //增加 tab 選擇器
    //增加 tab 內容
    {{ tab-cart }}
    {{ tab-depot }}
    --- 20210207 opencart-3.0.3.6 修改 shopping cart 頁->增加 tab ================================================================================================= (!!copy時錯誤: db->oc_product->date_available: default="0000-00-00" 格式不對系統自動改為 default 無) 1.) db->oc_product 增加新欄位 domestic (20210303 改為放在 db->oc_product_ext) 2.) joe /var/www/html/catalog/model/catalog/product.php -> public function getProduct($product_id) { ... 'domestic' => $query->row['domestic'], 3.) joe /var/www/html/catalog/controller/product/product.php (joe /var/www/storage/modification/catalog/controller/product/product.php 測試時用) -> ... $data['domestic'] = floatval($product_info['domestic']); 4.) joe /var/www/html/catalog/view/theme/default/template/product/popupop.twig //直接調用 {{ domestic }} --- 20210203 opencart-3.0.3.6 增加國內運費 ================================================================================================= product頁讀取欄位title + SQL資料路徑 /var/www/html/catalog/controller/product/product.php //讀取欄位title $this->load->language('product/product'); /var/www/html/catalog/language/en-gb/product/product.php $_['text_brand'] = 'Brand'; $_['text_manufacturer'] = 'Brand:'; $_['text_model'] = 'Product Code:'; $_['text_reward'] = 'Reward Points:'; $_['text_points'] = 'Price in reward points:'; $_['text_stock'] = 'Availability:'; $_['text_instock'] = 'In Stock'; $_['text_tax'] = 'Ex Tax:'; //讀取 db->oc_product 送出到product.twig + popupop.twig $data['weight'] = $product_info['weight']; $data['weight_format'] = $this->weight->format($product_info['weight'], $product_info['weight_class_id']); $data['length'] = $this->length->format($product_info['length'], $product_info['length_class_id']); $data['width'] = $this->length->format($product_info['width'], $product_info['length_class_id']); $data['height'] = $this->length->format($product_info['height'], $product_info['length_class_id']); //原db->oc_option...4個table的欄位 oc_option->option_id 5,14,15 標準option組id->帶type,sort oc_option_description 標準option組代表的語言,名稱,說明? oc_option_value->option_value_id 標準option組的值的id->帶圖url,sort oc_option_value_description 標準option組的值代表的語言,名稱 //原db->oc_product...2個table的欄位 oc_product->product_id 30 產品的id oc_product_option->product_option_id 226,236,237 產品的option組的id oc_product_option->option_id 5 14 15 標準option組的id oc_product_option_value->product_option_value_id 產品的option組的值的id->帶庫存,扣庫,增減單價,積分,重量 226->15,16,28 236->29~34 237->35~40 //合併原db->oc_option...4個table欄位 -> db->oc_product...2個table oc_product_option 加5欄位 type,sort_order / language_id,name,description oc_product_option_value 加3欄位 image,sort_order language_id,name //合併原db->oc_option...4個table資料 -> db->oc_product...2個table select * from oc_product_option inner join oc_option on oc_product_option.option_id=oc_option.option_id where 1 update oc_product_option inner join oc_option on oc_product_option.option_id=oc_option.option_id set oc_product_option.type=oc_option.type,oc_product_option.sort_order=oc_option.sort_order where 1; select * from oc_product_option inner join oc_option_description on oc_product_option.option_id=oc_option_description.option_id where 1 update oc_product_option inner join oc_option_description on oc_product_option.option_id=oc_option_description.option_id set oc_product_option.language_id=oc_option_description.language_id where 1; update oc_product_option inner join oc_option_description on oc_product_option.option_id=oc_option_description.option_id set oc_product_option.name=oc_option_description.name where 1; update oc_product_option inner join oc_option_description on oc_product_option.option_id=oc_option_description.option_id set oc_product_option.description=oc_option_description.description where 1; select * from oc_product_option_value inner join oc_option_value on oc_product_option_value.option_value_id=oc_option_value.option_value_id where 1 update oc_product_option_value inner join oc_option_value on oc_product_option_value.option_value_id=oc_option_value.option_value_id set oc_product_option_value.image=oc_option_value.image where 1; update oc_product_option_value inner join oc_option_value on oc_product_option_value.option_value_id=oc_option_value.option_value_id set oc_product_option_value.sort_order=oc_option_value.sort_order where 1; select * from oc_product_option_value inner join oc_option_value_description on oc_product_option_value.option_value_id=oc_option_value_description.option_value_id where 1 update oc_product_option_value inner join oc_option_value_description on oc_product_option_value.option_value_id=oc_option_value_description.option_value_id set oc_product_option_value.language_id=oc_option_value_description.language_id where 1; update oc_product_option_value inner join oc_option_value_description on oc_product_option_value.option_value_id=oc_option_value_description.option_value_id set oc_product_option_value.name=oc_option_value_description.name where 1; //修改 /var/www/html/catalog/model/catalog/product.php 讀取SQL product option 資料 ->foreach ($this->model_catalog_product->getProductOptions($this->request->get['product_id']) as $option) { ->joe /var/www/html/catalog/model/catalog/product.php -> public function getProductOptions($product_id) { ... // $product_option_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_option po LEFT JOIN `" . DB_PREFIX . "option` o ON (po.option_id = o.option_id) LEFT JOIN " . DB_PREFIX . "option_description od ON (o.option_id = od.option_id) WHERE po.product_id = '" . (int)$product_id . "' AND od.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY o.sort_order"); $product_option_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_option po WHERE po.product_id = '" . (int)$product_id . "' AND po.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY po.sort_order"); ... // $product_option_value_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_option_value pov LEFT JOIN " . DB_PREFIX . "option_value ov ON (pov.option_value_id = ov.option_value_id) LEFT JOIN " . DB_PREFIX . "option_value_description ovd ON (ov.option_value_id = ovd.option_value_id) WHERE pov.product_id = '" . (int)$product_id . "' AND pov.product_option_id = '" . (int)$product_option['product_option_id'] . "' AND ovd.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY ov.sort_order"); $product_option_value_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_option_value pov WHERE pov.product_id = '" . (int)$product_id . "' AND pov.product_option_id = '" . (int)$product_option['product_option_id'] . "' AND pov.language_id = '" . (int)$this->config->get('config_language_id') . "' ORDER BY pov.sort_order"); //修改 /var/www/html/system/library/cart/cart.php 讀取SQL product option 資料 ->joe /var/www/html/system/library/cart/cart.php -> public function getProducts() { ... // $option_query = $this->db->query("SELECT po.product_option_id, po.option_id, od.name, o.type FROM " . DB_PREFIX . "product_option po LEFT JOIN `" . DB_PREFIX . "option` o ON (po.option_id = o.option_id) LEFT JOIN " . DB_PREFIX . "option_description od ON (o.option_id = od.option_id) WHERE po.product_option_id = '" . (int)$product_option_id . "' AND po.product_id = '" . (int)$cart['product_id'] . "' AND od.language_id = '" . (int)$this->config->get('config_language_id') . "'"); $option_query = $this->db->query("SELECT po.product_option_id, po.option_id, po.name, po.type FROM " . DB_PREFIX . "product_option po WHERE po.product_option_id = '" . (int)$product_option_id . "' AND po.product_id = '" . (int)$cart['product_id'] . "' AND po.language_id = '" . (int)$this->config->get('config_language_id') . "'"); ... // $option_value_query = $this->db->query("SELECT pov.option_value_id, ovd.name, pov.quantity, pov.subtract, pov.price, pov.price_prefix, pov.points, pov.points_prefix, pov.weight, pov.weight_prefix FROM " . DB_PREFIX . "product_option_value pov LEFT JOIN " . DB_PREFIX . "option_value ov ON (pov.option_value_id = ov.option_value_id) LEFT JOIN " . DB_PREFIX . "option_value_description ovd ON (ov.option_value_id = ovd.option_value_id) WHERE pov.product_option_value_id = '" . (int)$value . "' AND pov.product_option_id = '" . (int)$product_option_id . "' AND ovd.language_id = '" . (int)$this->config->get('config_language_id') . "'"); $option_value_query = $this->db->query("SELECT pov.option_value_id, pov.name, pov.quantity, pov.subtract, pov.price, pov.price_prefix, pov.points, pov.points_prefix, pov.weight, pov.weight_prefix FROM " . DB_PREFIX . "product_option_value pov WHERE pov.product_option_value_id = '" . (int)$value . "' AND pov.product_option_id = '" . (int)$product_option_id . "' AND pov.language_id = '" . (int)$this->config->get('config_language_id') . "'"); //清空或刪原db->oc_option...4個table資料測是否成功->??表oc_option 空的OK,沒有會死??(已解決) --- 20210203 opencart-3.0.3.6 修改合併 product option 7個 SQL table ================================================================================================= modal 彈窗 + magnific popup joe /var/www/html/catalog/view/theme/default/template/product/popupop.twig 1.) $('#modal-shipping').modal('show'); //Jquery 調用 modal 彈窗 /var/www/html/catalog/view/javascript/bootstrap/js/bootstrap.js ->Modal.prototype.show = function (_relatedTarget) { ... 2.)
    //修改 container 的寬度(default 750px)不要超出 modal 彈窗的寬度(default 600px) /var/www/html/catalog/view/javascript/bootstrap/css/bootstrap.css -> @media (min-width: 768px) { .container { width: 750px; ... @media (min-width: 768px) { .modal-dialog { width: 600px; margin: 30px auto; } 3.)
  • Search Terms
  • Shipping & Returns
  • Privacy Notice
  • RO FAQ
  • Advanced Search
  • My Account
  • Membrane Rejection Chart
  • Contact Us
  • -> Search Terms search/term/popular http://qt.wg-1.com/index.php/search/term/popular/ Block Id: 37 PWC Shipping & Returns pwc-shipping-returns Block Id: 42 PWC Privacy Notice pwc-privacy-notice Block Id: 44 PWC FAQ pwc-faq Advanced Search catalogsearch/advanced http://qt.wg-1.com/index.php/catalogsearch/advanced/ My Account customer/account http://www.purewaterclub.com/index.php/customer/account Block Id: 45 Membrane Rejection Chart membrane-rejection-chart Block Id: 49 PWC Contact Us pwc-contact-us DELETE FROM cms_page WHERE page_id <> 2 AND page_id <> 30 AND page_id <> 36 AND page_id <> 37 AND page_id <> 42 AND page_id <> 44 AND page_id <> 45 AND page_id <> 49; cp /var/www/pwpic/import/membrane-rejection-chart.png /var/www/pwpic/webimg/items/PWC-Pic/membrane-rejection-chart.png chown www-data:www-data /var/www/pwpic/webimg/items/PWC-Pic/membrane-rejection-chart.png rm /var/www/magento2/pub/static/frontend/Zou/ -r php bin/magento setup:static-content:deploy en_US -f php bin/magento indexer:reindex php bin/magento cache:flush chown -R www-data:www-data . 清browser cache --- 20200417-18 AWS-QT 裝theme Zou ========================================================================================================================= 備份magento 2.3.4 + 資料庫 cd /var/www/ cp magento2 magento2_234_8pm_ada_ml_20200417_ok -r mysqldump -u root -prevres88 --databases magento2 > /var/www/bk-gz/magento2_234_8pm_ada_ml_20200417_ok.sql --- 20200417 12:00 AWS-QT ML完成paypal + 刷卡 + 寄信測試 ========================================================================================================================= mysqldump -u root -prevres88 --databases magento2 > /var/www/bk-gz/magento2_234_8pm_ada_20200416_ok.sql cp /var/www/pwpic/wysiwyg/ves_8pm/our-service/* /var/www/pwpic/pageimg/
    FREE SHIPPING
    magento2 joe pub/static/frontend/Magento/luma/en_US/requirejs-config.js ------------------- {{block type="core/template" template="page/template.phtml"}} mkdir -p app/design/frontend/base/default/template/page/ joe /var/www/magento2/app/design/frontend/base/default/template/page/template.phtml {{widget type="Magento\Catalog\Block\Product\Widget\NewWidget" display_type="all_products" show_pager="0" products_count="10" template="product/widget/new/content/new_grid.phtml"}} {{widget type="Magento\Catalog\Block\Product\Widget\NewWidget" display_type="all_products" show_pager="1" products_per_page="5" products_count="10" template="product/widget/new/column/new_default_list.phtml" page_var_name="pdjbbe"}} cd /var/www/pwpic/pageimg/ wget 118.163.15.73/owl.zip unzip -q owl.zip --- 20200416 AWS-QT 未裝 theme Zou 首頁block直接加跑馬燈 失敗 ========================================================================================================================= DELETE FROM core_config_data WHERE path LIKE 'payment/paypal_express%' ; 影响了 32 行。 (查询花费 0.0049 秒。) DELETE FROM core_config_data WHERE path LIKE 'payment/%' AND NOT(path LIKE 'payment/authorizenet%'); DELETE FROM core_config_data WHERE path LIKE 'checkout%' ; 影响了 12 行。 (查询花费 0.0041 秒。) DELETE FROM core_config_data WHERE path LIKE '%checkout%' ; 影响了 3 行。 (查询花费 0.0033 秒。) DELETE FROM core_config_data WHERE path LIKE 'carriers%' ; 影响了 56 行。 (查询花费 0.0050 秒。) DELETE FROM core_config_data WHERE path LIKE 'shipping%' ; 影响了 8 行。 (查询花费 0.0033 秒。) DELETE FROM core_config_data WHERE path LIKE 'tax%' ; 影响了 27 行。 (查询花费 0.0034 秒。) DELETE FROM core_config_data WHERE path LIKE 'paypal%' ; 影响了 27 行。 (查询花费 0.0052 秒。) DELETE FROM core_config_data WHERE path LIKE 'payment/%' ; 影响了 40 行。 (查询花费 0.0072 秒。) payment/authorizenet_acceptjs/cctypes payment/authorizenet_acceptjs/currency payment/authorizenet_acceptjs/order_status payment/authorizenet_acceptjs/payment_action SELECT * FROM core_config_data WHERE path LIKE 'payment/%' AND path<>'payment/authorizenet_acceptjs/cctypes' AND path<>'payment/authorizenet_acceptjs/currency' AND path<>'payment/authorizenet_acceptjs/order_status' AND path<>'payment/authorizenet_acceptjs/payment_action' ; -------------------------------------- 刪除233筆payment,只留下參考empty的8筆,否則checkout不會出現估算,點進去也是空白 DELETE FROM core_config_data WHERE path LIKE 'payment/%' AND path<>'payment/authorizenet_acceptjs/cctypes' AND path<>'payment/authorizenet_acceptjs/currency' AND path<>'payment/authorizenet_acceptjs/order_status' AND path<>'payment/authorizenet_acceptjs/payment_action' ; 影响了 233 行。 (查询花费 0.0077 秒。) -------------------------------------- (20200416 10:30:47) ADA完成paypal + 刷卡等ML測試 --- 20200416 AWS-QT Check out 空白 ========================================================================================================================= ---------------------------------------------------- /dev/xvda1 30G 26G 3.2G 90% / (20200415 23:57)點Flush Cache Storage按鈕->(等於同時按下面3按鈕) /dev/xvda1 30G 20G 9.1G 69% / root@awsko:/var/www/html/magento8pm# du -sh -> 768M ---------------------------------------------------- purewaterclub.com buck4u.com {{widget type="Magento\Cms\Block\Widget\Block" template="widget/static_block/default.phtml" block_id="1"}} qt_pwc_dir_47 qt_pwc_dir_50 qt_pwc_dir_68 qt_pwc_dir_65 qt_service
    ln -s /var/www/html/pwpic/pageimg/ /var/www/html/magento8pm/pub/media/ cd /var/www/html/pwpic/pageimg/ wget 118.163.15.73/qt-dir-1.zip unzip -q qt-dir-1.zip chown -R www-data:www-data . --- 20200416 AWS-QT + AWS-DV 建新block + 改目錄連結頁 ========================================================================================================================= T-1.)全新重裝magento2.3.4 + 導入magento8pm_20200413.sql + 修改 + 升級資料庫 導出產生資料庫 mysqldump -u root -prevres88 --databases magento2 > /var/www/bk-gz/magento2_8pm_234_20200413_ok.sql mysql -u root -prevres88 mysql>DROP DATABASE magento2; mysql>CREATE DATABASE magento2; mysql -u root -prevres88 < /var/www/bk-gz/magento8pm_20200413.sql 先修改資料庫 USE magento2; DROP TABLE ves_blockbuilder_block ; DROP TABLE ves_blockbuilder_cms ; DROP TABLE ves_blockbuilder_page ; DROP TABLE ves_blockbuilder_product ; DROP TABLE ves_blockbuilder_widget ; DROP TABLE ves_blog_category ; DROP TABLE ves_blog_category_store ; DROP TABLE ves_blog_comment ; DROP TABLE ves_blog_comment_store ; DROP TABLE ves_blog_post ; DROP TABLE ves_blog_post_category ; DROP TABLE ves_blog_post_related ; DROP TABLE ves_blog_post_store ; DROP TABLE ves_blog_post_tag ; DROP TABLE ves_brand ; DROP TABLE ves_brand_group ; DROP TABLE ves_brand_product ; DROP TABLE ves_brand_store ; DROP TABLE ves_megamenu_item ; DROP TABLE ves_megamenu_menu ; DROP TABLE ves_megamenu_menu_store ; DROP TABLE ves_testimonial_testimonial ; DROP TABLE ves_testimonial_testimonial_store ; DROP TABLE core_config_dataBK; DROP TABLE theme_0 ; DROP TABLE cataloginventory_stock_cl ; (change log 不要刪) DROP TABLE catalogrule_product_cl ; DROP TABLE catalogrule_rule_cl ; DROP TABLE catalogsearch_fulltext_cl ; DROP TABLE catalogsearch_fulltext_scope2 ; DROP TABLE catalogsearch_fulltext_scope3 ; DROP TABLE catalogsearch_fulltext_scope4 ; DROP TABLE catalogsearch_fulltext_scope5 ; DROP TABLE catalogsearch_fulltext_scope6 ; (剩342 = 250 + 92表) DROP TABLE catalog_category_entity_text_20191212 ; DROP TABLE catalog_category_product_cl ; UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.buck4u.com/'; UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.purewaterclub.com/'; UPDATE core_config_data SET value='2' WHERE path='design/theme/theme_id' ; DELETE FROM core_config_data WHERE path LIKE 'ves%' ; DELETE FROM theme WHERE theme_id > 3 ; DELETE FROM admin_user WHERE user_id < 5 ; 清空 cms_block,cms_block_store,cms_page,cms_page_store TRUNCATE TABLE cms_block; TRUNCATE TABLE cms_block_store; TRUNCATE TABLE cms_page; TRUNCATE TABLE cms_page_store; 設cms page INSERT INTO cms_page (title,page_layout,identifier,content) VALUES ('purewaterclub.com','1column-fullwidth','pwc-home','PWC'); INSERT INTO cms_page (title,page_layout,identifier,content) VALUES ('buck4u.com','1column-fullwidth','buck4u-home','Buck4U'); 設default-cms home page INSERT INTO core_config_data (scope,scope_id,path,value) VALUES ('default',0,'web/default/cms_home_page','pwc-home'); ??(前台報錯) DELETE FROM url_rewrite WHERE entity_type='category' ; 全新安裝magento 2.3.4 mv magento2 magento2-234-8pm-20200414-ok cd /var/www/magento2/ wget 118.163.15.73/magento2.zip (Magento-CE-2.3.4-2020-01-16-11-19-26.zip) unzip -q magento2.zip --------------- 先停止sudo systemctl stop php7.1-fpm->才不會出現報錯 sudo systemctl restart php7.2-fpm sudo systemctl restart nginx key=換? An existing user has the given username but different email. Username and e mail both need to match an existing user or both be new. 改admin-email->ada@ksoffice.com.tw(原dv4ml@dacomputing.com) ----------------- php bin/magento setup:install --backend-frontname="admin_lak7t5" \ --key="34c1007bf562f4d7ee82e5eef4b8865b" \ --base-url="http://qt.wg-1.com" \ --base-url-secure="https://qt.wg-1.com" \ --db-host=localhost \ --db-name=magento2 \ --db-user=root \ --db-password='revres88' \ --admin-firstname=Lee \ --admin-lastname=David \ --admin-email=ada@ksoffice.com.tw \ --admin-user=adminmag \ --admin-password=frevres0907 \ --language=en_US \ --currency=USD \ --timezone=America/Los_Angeles \ --use-rewrites=1 [SUCCESS]: Magento installation complete. [SUCCESS]: Magento Admin URI: /admin_lak7t5 Nothing to import. 建圖片連結 cd /var/www/magento2/pub/media/ rm catalog -r ln -s /var/www/pwpic/catalog/ /var/www/magento2/pub/media/ ln -s /var/www/pwpic/webimg/ /var/www/magento2/pub/media/ ln -s /var/www/pwpic/pageimg/ /var/www/magento2/pub/media/ ln -s /var/www/pwpic/logo/ /var/www/magento2/pub/media/ (20200419 新增) ln -s /var/www/pwpic/favicon/ /var/www/magento2/pub/media/ (20200419 新增) find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; && chmod 777 var/ -R && find pub/media -type d -exec chmod 777 {} \; && find pub/static -type d -exec chmod 777 {} \; && chmod 777 app/etc && chmod 644 app/etc/*.xml && chmod u+x bin/magento 升級database php bin/magento setup:upgrade php bin/magento setup:static-content:deploy en_US -f Execution time: 6.8340449333191 php bin/magento setup:di:compile root@ip-172-31-40-85:/var/www/magento2# php bin/magento setup:di:compile Compilation was started. Interception cache generation... 7/7 [=============] 100% 1 min 359.0 MiB Generated code and dependency injection configuration successfully. php bin/magento indexer:reindex php bin/magento cache:flush chown -R www-data:www-data . ->前台報錯 mag2 error 2062f7ab27094d8e234193d0ad08a82944228b6f404baadb72182b1393407534 cp var/report/2062f7ab27094d8e234193d0ad08a82944228b6f404baadb72182b1393407534 /var/www/html/err-105 http://3.22.57.114/err-105 ->Item (Magento\\Catalog\\Model\\Category\\Interceptor) with the same ID DELETE FROM url_rewrite WHERE entity_type='category' ; php bin/magento indexer:reindex ->前台OK -------------------------------------- T-2.)magento2.3.4(用T-1不重裝) + 導入magento8pm_20200413.sql + 修改資料庫 + 刪無用data + 升級資料庫 備份+導入資料庫 mysqldump -u root -prevres88 --databases magento2 > /var/www/bk-gz/magento2_8pm_234_20200414_ok.sql mysql -u root -prevres88 mysql>DROP DATABASE magento2; mysql>CREATE DATABASE magento2; mysql -u root -prevres88 < /var/www/bk-gz/magento8pm_20200413.sql USE magento2; 先修改資料庫 DROP TABLE ves_blockbuilder_block ; DROP TABLE ves_blockbuilder_cms ; DROP TABLE ves_blockbuilder_page ; DROP TABLE ves_blockbuilder_product ; DROP TABLE ves_blockbuilder_widget ; DROP TABLE ves_blog_category ; DROP TABLE ves_blog_category_store ; DROP TABLE ves_blog_comment ; DROP TABLE ves_blog_comment_store ; DROP TABLE ves_blog_post ; DROP TABLE ves_blog_post_category ; DROP TABLE ves_blog_post_related ; DROP TABLE ves_blog_post_store ; DROP TABLE ves_blog_post_tag ; DROP TABLE ves_brand ; DROP TABLE ves_brand_group ; DROP TABLE ves_brand_product ; DROP TABLE ves_brand_store ; DROP TABLE ves_megamenu_item ; DROP TABLE ves_megamenu_menu ; DROP TABLE ves_megamenu_menu_store ; DROP TABLE ves_testimonial_testimonial ; DROP TABLE ves_testimonial_testimonial_store ; DROP TABLE core_config_dataBK; DROP TABLE theme_0 ; DROP TABLE catalog_category_entity_text_20191212 ; (剩350 = 250 + 100表) UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.buck4u.com/'; UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.purewaterclub.com/'; UPDATE core_config_data SET value='https://qt.wg-1.com/' WHERE value='https://www.buck4u.com/'; UPDATE core_config_data SET value='https://qt.wg-1.com/' WHERE value='https://www.purewaterclub.com/'; UPDATE core_config_data SET value='2' WHERE path='design/theme/theme_id' ; 設default-cms home page INSERT INTO core_config_data (scope,scope_id,path,value) VALUES ('default',0,'web/default/cms_home_page','home'); UPDATE core_config_data SET value='home' WHERE path='web/default/cms_home_page' ; 刪ves data + 無用 DELETE FROM core_config_data WHERE path LIKE 'ves%' ; DELETE FROM theme WHERE theme_id > 3 ; DELETE FROM admin_user WHERE user_id < 5 ; TRUNCATE TABLE cms_block_store; TRUNCATE TABLE cms_block; DELETE FROM cms_page WHERE page_id <> 2 AND page_id <> 30 AND page_id <> 36 ; UPDATE cms_page SET content=identifier,content_heading='',custom_theme='' WHERE 1 ; DELETE FROM cms_page_store WHERE page_id <>2 ; DELETE FROM store WHERE store_id=1 OR store_id=2 ; DELETE FROM url_rewrite WHERE store_id=1 OR store_id=2 ; DELETE FROM url_rewrite WHERE request_path LIKE 'ves%' OR target_path LIKE 'ves%' ; DELETE FROM url_rewrite WHERE request_path LIKE 'zou%' OR target_path LIKE 'zou%' ; DELETE FROM url_rewrite WHERE url_rewrite_id<=24838 AND entity_type='category' ; 升級資料庫 php bin/magento setup:upgrade 先作deploy否則compile卡住 php bin/magento setup:static-content:deploy en_US -f Execution time: 21.4403860569 再作compile否則前台空白 php bin/magento setup:di:compile Compilation was started. Interception cache generation... 7/7 [======================] 100% 1 min 359.0 MiB Generated code and dependency injection configuration successfully. php bin/magento indexer:reindex php bin/magento cache:flush php bin/magento cache:clean chown -R www-data:www-data . ->前台空白 -------------------------------------- T-3.)magento2.3.4(用T-1不重裝) + 導入magento2_8pm_234_20200414_ok.sql(直接用T-1不升級) 備份+導入資料庫 mysqldump -u root -prevres88 --databases magento2 > /var/www/bk-gz/magento2_8pm_234_20200414_1_no_front.sql mysql -u root -prevres88 mysql>DROP DATABASE magento2; mysql>CREATE DATABASE magento2; mysql -u root -prevres88 < /var/www/bk-gz/magento2_8pm_234_20200414_ok.sql ->前台OK -------------------------------------- T-4.)magento2.3.4(御載再命令列安裝) + 導入magento2_8pm_234_20200414_1_no_front.sql(直接用T-2 改名稱 magento2_no_front 不升級) 導入資料庫改名稱為magento2_no_front(原為magento2) mysql -u root -prevres88 < /var/www/bk-gz/magento2_8pm_234_20200414_1_no_front.sql joe /var/www/bk-gz/magento2_8pm_234_20200414_1_no_front.sql CREATE DATABASE /*!32312 IF NOT EXISTS*/ `magento2_no_front` /*!40100 DEFAULT CHARACTER S USE `magento2_no_front`; -> php bin/magento setup:uninstall php bin/magento setup:install --backend-frontname="admin_lak7t5" \ --key="34c1007bf562f4d7ee82e5eef4b8865b" \ --base-url="http://qt.wg-1.com" \ --base-url-secure="https://qt.wg-1.com" \ --db-host=localhost \ --db-name=magento2_no_front \ --db-user=root \ --db-password='revres88' \ --admin-firstname=Lee \ --admin-lastname=David \ --admin-email=ada@ksoffice.com.tw \ --admin-user=adminmag \ --admin-password=frevres0907 \ --language=en_US \ --currency=USD \ --timezone=America/Los_Angeles \ --use-rewrites=1 [SUCCESS]: Magento installation complete. [SUCCESS]: Magento Admin URI: /admin_lak7t5 Nothing to import. cd /var/www/magento2/pub/media/ rm catalog -r ln -s /var/www/pwpic/catalog/ /var/www/magento2/pub/media/ ln -s /var/www/pwpic/webimg/ /var/www/magento2/pub/media/ ln -s /var/www/pwpic/pageimg/ /var/www/magento2/pub/media/ find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; && chmod 777 var/ -R && find pub/media -type d -exec chmod 777 {} \; && find pub/static -type d -exec chmod 777 {} \; && chmod 777 app/etc && chmod 644 app/etc/*.xml && chmod u+x bin/magento php bin/magento indexer:reindex php bin/magento cache:flush chown -R www-data:www-data . ->前台OK,search沒有 -------------------------------------- T-5.)magento2.3.4(御載再命令列安裝) + magento2_no_front資料庫(因命令列漏改誤用T-4) 御載+重新安裝mag2 php bin/magento setup:uninstall [SUCCESS]: Magento uninstallation complete. --------------- 先停止sudo systemctl stop php7.1-fpm->才不會出現報錯 sudo systemctl restart php7.2-fpm sudo systemctl restart nginx ----------------- php bin/magento setup:install --backend-frontname="admin_lak7t5" \ --key="34c1007bf562f4d7ee82e5eef4b8865b" \ --base-url="http://qt.wg-1.com" \ --base-url-secure="https://qt.wg-1.com" \ --db-host=localhost \ --db-name=magento2_no_front \ --db-user=root \ --db-password='revres88' \ --admin-firstname=Lee \ --admin-lastname=David \ --admin-email=ada@ksoffice.com.tw \ --admin-user=adminmag \ --admin-password=frevres0907 \ --language=en_US \ --currency=USD \ --timezone=America/Los_Angeles \ --use-rewrites=1 [SUCCESS]: Magento installation complete. [SUCCESS]: Magento Admin URI: /admin_lak7t5 Nothing to import. find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; && chmod 777 var/ -R && find pub/media -type d -exec chmod 777 {} \; && find pub/static -type d -exec chmod 777 {} \; && chmod 777 app/etc && chmod 644 app/etc/*.xml && chmod u+x bin/magento 升級資料庫 php bin/magento setup:upgrade 先作deploy否則compile卡住 php bin/magento setup:static-content:deploy en_US -f Execution time: 26.365685939789 再作compile否則前台空白 php bin/magento setup:di:compile Compilation was started. Interception cache generation... 7/7 [============================] 100% 48 secs 359.0 MiB Generated code and dependency injection configuration successfully. php bin/magento indexer:reindex php bin/magento cache:clean chown -R www-data:www-data . ->前台OK,search沒測 -------------------------------------- T-6.)magento2.3.4(御載再命令列安裝) + 導入magento8pm_20200413.sql + 修改資料庫 + 刪無用data + 升級資料庫 導入資料庫 mysql -u root -prevres88 < /var/www/bk-gz/magento8pm_20200413.sql mysql -u root -prevres88 USE magento2; 先修改資料庫 DROP TABLE ves_blockbuilder_block ; DROP TABLE ves_blockbuilder_cms ; DROP TABLE ves_blockbuilder_page ; DROP TABLE ves_blockbuilder_product ; DROP TABLE ves_blockbuilder_widget ; DROP TABLE ves_blog_category ; DROP TABLE ves_blog_category_store ; DROP TABLE ves_blog_comment ; DROP TABLE ves_blog_comment_store ; DROP TABLE ves_blog_post ; DROP TABLE ves_blog_post_category ; DROP TABLE ves_blog_post_related ; DROP TABLE ves_blog_post_store ; DROP TABLE ves_blog_post_tag ; DROP TABLE ves_brand ; DROP TABLE ves_brand_group ; DROP TABLE ves_brand_product ; DROP TABLE ves_brand_store ; DROP TABLE ves_megamenu_item ; DROP TABLE ves_megamenu_menu ; DROP TABLE ves_megamenu_menu_store ; DROP TABLE ves_testimonial_testimonial ; DROP TABLE ves_testimonial_testimonial_store ; DROP TABLE core_config_dataBK; DROP TABLE theme_0 ; DROP TABLE catalog_category_entity_text_20191212 ; (剩350 = 250 + 100表) UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.buck4u.com/'; UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.purewaterclub.com/'; UPDATE core_config_data SET value='https://qt.wg-1.com/' WHERE value='https://www.buck4u.com/'; UPDATE core_config_data SET value='https://qt.wg-1.com/' WHERE value='https://www.purewaterclub.com/'; UPDATE core_config_data SET value='2' WHERE path='design/theme/theme_id' ; 設default-cms home page INSERT INTO core_config_data (scope,scope_id,path,value) VALUES ('default',0,'web/default/cms_home_page','home'); UPDATE core_config_data SET value='home' WHERE path='web/default/cms_home_page' ; 刪ves data + 無用 DELETE FROM core_config_data WHERE path LIKE 'ves%' ; DELETE FROM theme WHERE theme_id > 3 ; DELETE FROM admin_user WHERE user_id < 5 ; TRUNCATE TABLE cms_block_store; TRUNCATE TABLE cms_block; DELETE FROM cms_page WHERE page_id <> 2 AND page_id <> 30 AND page_id <> 36 ; UPDATE cms_page SET content=identifier,content_heading='',custom_theme='' WHERE 1 ; DELETE FROM cms_page_store WHERE page_id <>2 ; DELETE FROM store WHERE store_id=1 OR store_id=2 ; DELETE FROM url_rewrite WHERE store_id=1 OR store_id=2 ; DELETE FROM url_rewrite WHERE request_path LIKE 'ves%' OR target_path LIKE 'ves%' ; DELETE FROM url_rewrite WHERE request_path LIKE 'zou%' OR target_path LIKE 'zou%' ; DELETE FROM url_rewrite WHERE url_rewrite_id<=24838 AND entity_type='category' ; 御載+重新安裝mag2 php bin/magento setup:uninstall [SUCCESS]: Magento uninstallation complete. --------------- 先停止sudo systemctl stop php7.1-fpm->才不會出現報錯 sudo systemctl restart php7.2-fpm sudo systemctl restart nginx ----------------- php bin/magento setup:install --backend-frontname="admin_lak7t5" \ --key="34c1007bf562f4d7ee82e5eef4b8865b" \ --base-url="http://qt.wg-1.com" \ --base-url-secure="https://qt.wg-1.com" \ --db-host=localhost \ --db-name=magento2 \ --db-user=root \ --db-password='revres88' \ --admin-firstname=Lee \ --admin-lastname=David \ --admin-email=ada@ksoffice.com.tw \ --admin-user=adminmag \ --admin-password=frevres0907 \ --language=en_US \ --currency=USD \ --timezone=America/Los_Angeles \ --use-rewrites=1 [SUCCESS]: Magento installation complete. [SUCCESS]: Magento Admin URI: /admin_lak7t5 Nothing to import. find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; && chmod 777 var/ -R && find pub/media -type d -exec chmod 777 {} \; && find pub/static -type d -exec chmod 777 {} \; && chmod 777 app/etc && chmod 644 app/etc/*.xml && chmod u+x bin/magento 升級資料庫 php bin/magento setup:upgrade 先作deploy否則compile卡住 php bin/magento setup:static-content:deploy en_US -f Execution time: 25.61025595665 再作compile否則前台空白 php bin/magento setup:di:compile Compilation was started. Interception cache generation... 7/7 [============================] 100% 48 secs 359.0 MiB Generated code and dependency injection configuration successfully. php bin/magento indexer:reindex php bin/magento cache:clean chown -R www-data:www-data . ->前台空白,直接連其他OK http://qt.wg-1.com/ro/replacement.html ----------------------------- magento 2.1.9 vs 2.3.4 變化->如果沒修改造成前台空白 layout->1column-fullwidth->1column php bin/magento cache:flush INSERT INTO cms_page (title,page_layout,identifier,content) VALUES ('buck4u.com','1column-fullwidth','buck4u-home','Buck4U'); ----------------------------- -------------------------------------- (20200415 09:38) T-7.)magento2.3.4(直接用T-6) + 導入magento8pm_20200413.sql + 修改資料庫 + 刪無用data + 升級資料庫 備份+導入資料庫 mysqldump -u root -prevres88 --databases magento2 > /var/www/bk-gz/magento2_8pm_234_20200414_2_layout_ok.sql mysql -u root -prevres88 mysql>DROP DATABASE magento2; mysql>CREATE DATABASE magento2; mysql -u root -prevres88 < /var/www/bk-gz/magento8pm_20200413.sql mysql -u root -prevres88 USE magento2; 先修改資料庫 DROP TABLE ves_blockbuilder_block ; DROP TABLE ves_blockbuilder_cms ; DROP TABLE ves_blockbuilder_page ; DROP TABLE ves_blockbuilder_product ; DROP TABLE ves_blockbuilder_widget ; DROP TABLE ves_blog_category ; DROP TABLE ves_blog_category_store ; DROP TABLE ves_blog_comment ; DROP TABLE ves_blog_comment_store ; DROP TABLE ves_blog_post ; DROP TABLE ves_blog_post_category ; DROP TABLE ves_blog_post_related ; DROP TABLE ves_blog_post_store ; DROP TABLE ves_blog_post_tag ; DROP TABLE ves_brand ; DROP TABLE ves_brand_group ; DROP TABLE ves_brand_product ; DROP TABLE ves_brand_store ; DROP TABLE ves_megamenu_item ; DROP TABLE ves_megamenu_menu ; DROP TABLE ves_megamenu_menu_store ; DROP TABLE ves_testimonial_testimonial ; DROP TABLE ves_testimonial_testimonial_store ; DROP TABLE core_config_dataBK; DROP TABLE theme_0 ; DROP TABLE catalog_category_entity_text_20191212 ; (剩350 = 250 + 100表) UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.buck4u.com/'; UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.purewaterclub.com/'; UPDATE core_config_data SET value='https://qt.wg-1.com/' WHERE value='https://www.buck4u.com/'; UPDATE core_config_data SET value='https://qt.wg-1.com/' WHERE value='https://www.purewaterclub.com/'; UPDATE core_config_data SET value='2' WHERE path='design/theme/theme_id' ; 設default-cms home page INSERT INTO core_config_data (scope,scope_id,path,value) VALUES ('default',0,'web/default/cms_home_page','home'); ??->UPDATE core_config_data SET value='home' WHERE path='web/default/cms_home_page' ; 改cms-page(必改layout否則版本差別造成首頁空白) UPDATE cms_page SET page_layout='1column',content=identifier,content_heading='',custom_theme='' WHERE 1 ; 刪ves data + 無用 DELETE FROM core_config_data WHERE path LIKE 'ves%' ; DELETE FROM theme WHERE theme_id > 3 ; DELETE FROM admin_user WHERE user_id < 5 ; TRUNCATE TABLE cms_block_store; TRUNCATE TABLE cms_block; DELETE FROM cms_page WHERE page_id <> 2 AND page_id <> 30 AND page_id <> 36 ; DELETE FROM cms_page_store WHERE page_id <>2 ; DELETE FROM store WHERE store_id=1 OR store_id=2 ; DELETE FROM url_rewrite WHERE store_id=1 OR store_id=2 ; DELETE FROM url_rewrite WHERE request_path LIKE 'ves%' OR target_path LIKE 'ves%' ; DELETE FROM url_rewrite WHERE request_path LIKE 'zou%' OR target_path LIKE 'zou%' ; DELETE FROM url_rewrite WHERE url_rewrite_id<=24838 AND entity_type='category' ; 升級資料庫 php bin/magento setup:upgrade php bin/magento cache:clean php bin/magento indexer:reindex chown -R www-data:www-data . ->OK,後台product->attribute set故障 -------------------------------------- (20200415 10:33) T-8.)magento2.3.4(御載再命令列安裝) + 導入magento8pm_20200413.sql + 修改資料庫 + 刪無用data + 升級資料庫 先御載mag2 php bin/magento setup:uninstall [SUCCESS]: Magento uninstallation complete. 導入資料庫 mysql -u root -prevres88 < /var/www/bk-gz/magento8pm_20200413.sql mysql -u root -prevres88 USE magento2; 先修改資料庫 DROP TABLE ves_blockbuilder_block ; DROP TABLE ves_blockbuilder_cms ; DROP TABLE ves_blockbuilder_page ; DROP TABLE ves_blockbuilder_product ; DROP TABLE ves_blockbuilder_widget ; DROP TABLE ves_blog_category ; DROP TABLE ves_blog_category_store ; DROP TABLE ves_blog_comment ; DROP TABLE ves_blog_comment_store ; DROP TABLE ves_blog_post ; DROP TABLE ves_blog_post_category ; DROP TABLE ves_blog_post_related ; DROP TABLE ves_blog_post_store ; DROP TABLE ves_blog_post_tag ; DROP TABLE ves_brand ; DROP TABLE ves_brand_group ; DROP TABLE ves_brand_product ; DROP TABLE ves_brand_store ; DROP TABLE ves_megamenu_item ; DROP TABLE ves_megamenu_menu ; DROP TABLE ves_megamenu_menu_store ; DROP TABLE ves_testimonial_testimonial ; DROP TABLE ves_testimonial_testimonial_store ; DROP TABLE core_config_dataBK; DROP TABLE theme_0 ; DROP TABLE catalog_category_entity_text_20191212 ; UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.buck4u.com/'; UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.purewaterclub.com/'; UPDATE core_config_data SET value='https://qt.wg-1.com/' WHERE value='https://www.buck4u.com/'; UPDATE core_config_data SET value='https://qt.wg-1.com/' WHERE value='https://www.purewaterclub.com/'; UPDATE core_config_data SET value='2' WHERE path='design/theme/theme_id' ; INSERT INTO core_config_data (scope,scope_id,path,value) VALUES ('default',0,'web/default/cms_home_page','home'); UPDATE cms_page SET page_layout='1column',content=identifier,content_heading='',custom_theme='' WHERE 1 ; DELETE FROM core_config_data WHERE path LIKE 'ves%' ; DELETE FROM theme WHERE theme_id > 3 ; DELETE FROM admin_user WHERE user_id < 5 ; TRUNCATE TABLE cms_block_store; TRUNCATE TABLE cms_block; DELETE FROM cms_page WHERE page_id <> 2 AND page_id <> 30 AND page_id <> 36 ; DELETE FROM cms_page_store WHERE page_id <>2 ; DELETE FROM store WHERE store_id=1 OR store_id=2 ; DELETE FROM url_rewrite WHERE store_id=1 OR store_id=2 ; DELETE FROM url_rewrite WHERE request_path LIKE 'ves%' OR target_path LIKE 'ves%' ; DELETE FROM url_rewrite WHERE request_path LIKE 'zou%' OR target_path LIKE 'zou%' ; DELETE FROM url_rewrite WHERE url_rewrite_id<=24838 AND entity_type='category' ; 重新安裝mag2 --------------- 先停止再重啟才不會出現報錯 sudo systemctl stop php7.1-fpm sudo systemctl restart php7.2-fpm sudo systemctl restart nginx ----------------- php bin/magento setup:install --backend-frontname="admin_lak7t5" \ --key="34c1007bf562f4d7ee82e5eef4b8865b" \ --base-url="http://qt.wg-1.com" \ --base-url-secure="https://qt.wg-1.com" \ --db-host=localhost \ --db-name=magento2 \ --db-user=root \ --db-password='revres88' \ --admin-firstname=Lee \ --admin-lastname=David \ --admin-email=ada@ksoffice.com.tw \ --admin-user=adminmag \ --admin-password=frevres0907 \ --language=en_US \ --currency=USD \ --timezone=America/Los_Angeles \ --use-rewrites=1 [SUCCESS]: Magento installation complete. [SUCCESS]: Magento Admin URI: /admin_lak7t5 Nothing to import. find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; && chmod 777 var/ -R && find pub/media -type d -exec chmod 777 {} \; && find pub/static -type d -exec chmod 777 {} \; && chmod 777 app/etc && chmod 644 app/etc/*.xml && chmod u+x bin/magento 升級資料庫 php bin/magento setup:upgrade php bin/magento cache:clean php bin/magento indexer:reindex chown -R www-data:www-data . ->和T7一樣 -------------------------------------- (20200415 10:53) T-9.)全新安裝magento2.3.4(御載再命令列安裝) + magento2資料庫(直接用T-7) mv magento2 magento2-234-8pm-20200415-ok cd /var/www/magento2/ wget 118.163.15.73/magento2.zip (Magento-CE-2.3.4-2020-01-16-11-19-26.zip) unzip -q magento2.zip 建圖片連結 cd /var/www/magento2/pub/media/ rm catalog -r ln -s /var/www/pwpic/catalog/ /var/www/magento2/pub/media/ ln -s /var/www/pwpic/webimg/ /var/www/magento2/pub/media/ ln -s /var/www/pwpic/pageimg/ /var/www/magento2/pub/media/ sudo systemctl stop php7.1-fpm sudo systemctl restart php7.2-fpm sudo systemctl restart nginx php bin/magento setup:install --backend-frontname="admin_lak7t5" \ --key="34c1007bf562f4d7ee82e5eef4b8865b" \ --base-url="http://qt.wg-1.com" \ --base-url-secure="https://qt.wg-1.com" \ --db-host=localhost \ --db-name=magento2 \ --db-user=root \ --db-password='revres88' \ --admin-firstname=Lee \ --admin-lastname=David \ --admin-email=ada@ksoffice.com.tw \ --admin-user=adminmag \ --admin-password=frevres0907 \ --language=en_US \ --currency=USD \ --timezone=America/Los_Angeles \ --use-rewrites=1 [SUCCESS]: Magento installation complete. [SUCCESS]: Magento Admin URI: /admin_lak7t5 Nothing to import. find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; && chmod 777 var/ -R && find pub/media -type d -exec chmod 777 {} \; && find pub/static -type d -exec chmod 777 {} \; && chmod 777 app/etc && chmod 644 app/etc/*.xml && chmod u+x bin/magento php bin/magento cache:clean php bin/magento indexer:reindex chown -R www-data:www-data . ->和T8一樣 T-10.)magento2_20200413_234_empty php bin/magento cache:clean php bin/magento indexer:reindex chown -R www-data:www-data . INSERT INTO core_config_data (scope,scope_id,path,value) VALUES ('default',0,'admin/usage/enabled','0'); 正在显示第 0 - 24 行 (共 644 行, 查询花费 0.0003 秒。)表: core_config_data_000 delete from core_config_data where path like 'admin/security%' 正在显示第 0 - 24 行 (共 638 行, 查询花费 0.0003 秒。) delete from core_config_data where path = 'admin/usage/enabled' 影响了 1 行。 (查询花费 0.0031 秒。) delete from core_config_data where path like 'carriers%' 影响了 56 行。 (查询花费 0.0058 秒。) update core_config_data set value='2' where path='catalog/category/root_id' 影响了 1 行。 (查询花费 0.0025 秒。) delete from core_config_data where path like 'catalog%' AND path<>'catalog/category/root_id' 影响了 65 行。 (查询花费 0.0041 秒。) delete from core_config_data where path like 'checkout%' 影响了 7 行。 (查询花费 0.0029 秒。) delete from core_config_data where path like 'cms%' 影响了 2 行。 (查询花费 0.0034 秒。) skip---------- delete from core_config_data where path like 'design%' 影响了 115 行。 (查询花费 0.0037 秒。) delete from core_config_data where path like 'customer%' 影响了 21 行。 (查询花费 0.0029 秒。) delete from core_config_data where path like 'dev%' 影响了 6 行。 (查询花费 0.0030 秒。) test-ok-1----- delete from core_config_data where path='dev/css/merge_css_files' delete from core_config_data where path='dev/css/minify_files' delete from core_config_data where path='dev/debug/template_hints_admin' delete from core_config_data where path='dev/debug/template_hints_blocks' delete from core_config_data where path='dev/debug/template_hints_storefront' delete from core_config_data where path='dev/front_end_development_workflow/type' delete from core_config_data where path='dev/grid/async_indexing' delete from core_config_data where path='dev/image/default_adapter' delete from core_config_data where path='dev/restrict/allow_ips' delete from core_config_data where path='dev/static/sign' delete from core_config_data where path='dev/template/allow_symlink' delete from core_config_data where path=' delete from core_config_data where path=' delete from core_config_data where path=' delete from core_config_data where path=' delete from core_config_data where path=' delete from core_config_data where path=' -------------------------------------- (20200415 15:27) T-11.)magento2.3.4(T-10) + 導入magento8pm_20200413.sql + 修改資料庫 + 刪無用data + 升級資料庫 導入資料庫 mysql -u root -prevres88 mysql>TRUNCATE DATABASE magento2; mysql -u root -prevres88 < /var/www/bk-gz/magento8pm_20200413.sql mysql -u root -prevres88 USE magento2; 先修改資料庫 DROP TABLE ves_blockbuilder_block ; DROP TABLE ves_blockbuilder_cms ; DROP TABLE ves_blockbuilder_page ; DROP TABLE ves_blockbuilder_product ; DROP TABLE ves_blockbuilder_widget ; DROP TABLE ves_blog_category ; DROP TABLE ves_blog_category_store ; DROP TABLE ves_blog_comment ; DROP TABLE ves_blog_comment_store ; DROP TABLE ves_blog_post ; DROP TABLE ves_blog_post_category ; DROP TABLE ves_blog_post_related ; DROP TABLE ves_blog_post_store ; DROP TABLE ves_blog_post_tag ; DROP TABLE ves_brand ; DROP TABLE ves_brand_group ; DROP TABLE ves_brand_product ; DROP TABLE ves_brand_store ; DROP TABLE ves_megamenu_item ; DROP TABLE ves_megamenu_menu ; DROP TABLE ves_megamenu_menu_store ; DROP TABLE ves_testimonial_testimonial ; DROP TABLE ves_testimonial_testimonial_store ; DROP TABLE core_config_dataBK; DROP TABLE theme_0 ; DROP TABLE catalog_category_entity_text_20191212 ; UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.buck4u.com/'; UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.purewaterclub.com/'; UPDATE core_config_data SET value='https://qt.wg-1.com/' WHERE value='https://www.buck4u.com/'; UPDATE core_config_data SET value='https://qt.wg-1.com/' WHERE value='https://www.purewaterclub.com/'; UPDATE core_config_data SET value='2' WHERE path='design/theme/theme_id' ; DELETE FROM core_config_data WHERE path='dev/static/sign'; INSERT INTO core_config_data (scope,scope_id,path,value) VALUES ('default',0,'web/default/cms_home_page','home'); UPDATE cms_page SET page_layout='1column',content=identifier,content_heading='',custom_theme='' WHERE 1 ; DELETE FROM core_config_data WHERE path LIKE 'ves%' ; DELETE FROM theme WHERE theme_id > 3 ; DELETE FROM admin_user WHERE user_id < 5 ; TRUNCATE TABLE cms_page_store; INSERT INTO cms_page_store (page_id,store_id) VALUES (2,0) ; INSERT INTO cms_page_store (page_id,store_id) VALUES (30,0) ; INSERT INTO cms_page_store (page_id,store_id) VALUES (36,0) ; DELETE FROM cms_page WHERE page_id <> 2 AND page_id <> 30 AND page_id <> 36 ; TRUNCATE TABLE cms_block_store; TRUNCATE TABLE cms_block; DELETE FROM store WHERE store_id=1 OR store_id=2 ; DELETE FROM url_rewrite WHERE store_id=1 OR store_id=2 ; DELETE FROM url_rewrite WHERE request_path LIKE 'ves%' OR target_path LIKE 'ves%' ; DELETE FROM url_rewrite WHERE request_path LIKE 'zou%' OR target_path LIKE 'zou%' ; DELETE FROM url_rewrite WHERE url_rewrite_id<=24838 AND entity_type='category' ; 升級資料庫 php bin/magento setup:upgrade php bin/magento cache:clean php bin/magento indexer:reindex chown -R www-data:www-data . ->OK ---------------------------------------- 刪除此行可解決product attribute set 破圖故障(2.3.4->1才正常) DELETE FROM core_config_data WHERE path='dev/static/sign' Stores->Configuration->Advanced->Developer->Static Files Settings->Sign Static Files->(?default 2.1.9:No-0 / 2.3.4:Yes-1) ---------------------------------------- ---------------------------------------- 解決cms page->store view設定問題,否則cms page不生效(0:All Store Views) TRUNCATE TABLE cms_page_store; INSERT INTO cms_page_store (page_id,store_id) VALUES (2,0) ; INSERT INTO cms_page_store (page_id,store_id) VALUES (30,0) ; INSERT INTO cms_page_store (page_id,store_id) VALUES (36,0) ; ---------------------------------------- (20200415 16:22) 備份-ada開始測paypal,刷卡,寄email cp magento2 magento2-234-8pm-20200415-ok -r mysqldump -u root -prevres88 --databases magento2 > /var/www/bk-gz/magento2_8pm_234_20200415_before_ada_ok.sql --- 20200414-15 AWS-QT 全新magento2.3.4 + copy sql AWS-DV magento8pm 成功 ========================================================================================================================= ------------------------------------------------------------------ (20200413 17:00) AWS-QT重開機->IP:3.22.57.114(原3.134.105.225) aws.wg-1.com(pwc 圖片href連結) qt.wg-1.com(2.3.4版本test) qtpwc.wg-1.com(??) zou.wg-1.com(??) ------------------------------------------------------------------ T-0.)轉移資料庫 導出/備份資料庫aws-dv sql->magento8pm->magento8pm_20200413.sql cd /var/www/html/ mysqldump -u root -prevres88 --databases magento8pm > magento8pm_20200413.sql ->48557821 Apr 13 01:15 magento8pm_20200413.sql 下載aws-qt cd /var/www/bk-gz/ wget 3.22.57.63/magento8pm_20200413.sql 修改導入資料庫名稱 joe /var/www/bk-gz/magento8pm_20200413.sql-> CREATE DATABASE /*!32312 IF NOT EXISTS*/ `magento2` /*!40100 DEFAULT CHARACTER S USE `magento2`; 導入資料庫 mysql -u root -prevres88 < /var/www/bk-gz/magento8pm_20200413.sql T-1.)magento2-234-ok + sql magento2_20200406-ok 複制Data cp sql->magento2_20200406-ok->magento2 mysqldump -u root -prevres88 --databases magento2_20200406-ok > /var/www/bk-gz/magento2_20200406.sql joe /var/www/bk-gz/magento2_20200406.sql-> CREATE DATABASE /*!32312 IF NOT EXISTS*/ `magento2` /*!40100 DEFAULT CHARACTER S USE `magento2`; -> mysql -u root -prevres88 < /var/www/bk-gz/magento2_20200406.sql cd /var/www/ cp magento2-234-ok magento2 -r cd magento2 joe app/etc/env.php-> 'username' => 'root', php bin/magento cache:flush php bin/magento setup:upgrade chown -R www-data:www-data . ->ok T-2.)magento2-234-ok + sql magento8pm_20200413 複制Data cp sql->magento8pm_20200413->magento2 mysql -u root -prevres88 mysql>DROP DATABASE magento2; joe /var/www/bk-gz/magento8pm_20200413.sql-> CREATE DATABASE /*!32312 IF NOT EXISTS*/ `magento2` /*!40100 DEFAULT CHARACTER S USE `magento2`; -> mysql -u root -prevres88 < /var/www/bk-gz/magento8pm_20200413.sql 修改SQL UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.buck4u.com/'; (影响了 5 行) UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.purewaterclub.com/'; (影响了 2 行) UPDATE core_config_data SET value='2' WHERE path='design/theme/theme_id'; (影响了 4 行) DELETE FROM theme WHERE theme_id > 3 ; (影响了 3 行) UPDATE cms_page SET content='buck4u' WHERE page_id=36 ; (buck4u.com) UPDATE cms_page SET content='pwc' WHERE page_id=30 ; (purewaterclub.com) cd /var/www/magento2/ php bin/magento cache:flush php bin/magento setup:upgrade php bin/magento indexer:reindex php bin/magento setup:di:compile php bin/magento setup:static-content:deploy en_US -f Execution time: 21.579952001572 chown -R www-data:www-data . ->前台空白 T-3.)重裝magento2.3.4 + sql empty cd /var/www/magento2/ wget 118.163.15.73/magento2.zip (Magento-CE-2.3.4-2020-01-16-11-19-26.zip) unzip -q magento2.zip --------------- 先停止sudo systemctl stop php7.1-fpm->才不會出現報錯 ----------------- mysql -u root -prevres88 mysql>DROP DATABASE magento2; mysql>CREATE DATABASE magento2; cd /var/www/magento2/ php bin/magento setup:install --backend-frontname="admin_lak7t5" \ --key="34c102e5eef4b8865b07bf562f4d7ee8" \ --base-url="http://qt.wg-1.com" \ --base-url-secure="https://qt.wg-1.com" \ --db-host=localhost \ --db-name=magento2 \ --db-user=root \ --db-password='revres88' \ --admin-firstname=Lee \ --admin-lastname=David \ --admin-email=dv4ml@dacomputing.com \ --admin-user=adminmag \ --admin-password=frevres0907 \ --language=en_US \ --currency=USD \ --timezone=America/Los_Angeles \ --use-rewrites=1 find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; && chmod 777 var/ -R && find pub/media -type d -exec chmod 777 {} \; && find pub/static -type d -exec chmod 777 {} \; && chmod 777 app/etc && chmod 644 app/etc/*.xml && chmod u+x bin/magento chown -R www-data:www-data . ->OK T-4.)重裝magento2.3.4 + sql magento8pm_20200413 複制Data cp sql->magento8pm_20200413->magento2 mysql -u root -prevres88 < /var/www/bk-gz/magento8pm_20200413.sql 修改SQL 改base url為qt.wg-1.com-> UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.buck4u.com/'; (影响了 5 行) UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.purewaterclub.com/'; (影响了 2 行) 改前台theme為luma-> UPDATE core_config_data SET value='2' WHERE path='design/theme/theme_id' ; (影响了 4 行) 刪theme-> DELETE FROM theme WHERE theme_id > 3 ; (影响了 3 行)(只留admin blank luma) 改首頁頁面-> UPDATE cms_page SET content='buck4u' WHERE page_id=36 ; (buck4u.com) UPDATE cms_page SET content='pwc' WHERE page_id=30 ; (purewaterclub.com) 先升級database cd /var/www/magento2/ php bin/magento cache:flush php bin/magento setup:upgrade php bin/magento indexer:reindex chown -R www-data:www-data . ->前台空白 (20200414 02:00) T-4-1.)再更換core_config_data copy magento2_20200413_234_empty.core_config_data -> magento2.core_config_data 清空magento2->core_config_data; cp magento2-219-check-ok:core_config_data data-> magento2:core_config_data ??->catalog/category/root_id->NULL?? ->報錯找不到theme 7 {"0":"Unable to load theme by specified key: '7'","1": T-4-2.)清空cms_page + cms_block ->報錯找不到theme 7 T-4-3.)登入後台新增cms page(ID:1 Title:xxx) ->後台檢查default page出現xxx選擇 T-4-4.)設定website web default CMS Home Page -> xxx ->前台OK 表: core_config_data->web/default/cms_home_page -> xxx 表: core_config_dataBK->web/default/cms_home_page -> 8pm-home-page-default --- 20200413 AWS-QT magento2 + copy sql AWS-DV magento8pm ========================================================================================================================= 0.)改DNS + apache 設8pm.wg-1.com->3.22.57.63 (原mag.wg-1.com) cd /etc/apache2/sites-available cp mag-wg-1.conf 8pm-wg-1.conf joe 8pm-wg-1.conf -> DocumentRoot /var/www/html/magento2-qt ServerName 8pm.wg-1.com ErrorLog /var/log/apache2/error_log CustomLog /var/log/apache2/access_log common Options FollowSymLinks AllowOverride all Require all granted # Order allow,deny # Allow from all -> ln -s /etc/apache2/sites-available/8pm-wg-1.conf /etc/apache2/sites-enabled/8pm-wg-1.conf service apache2 restart 1.)copy magento8pm + sql cp sql->magento8pm->magento2_qt 刪表ves_megamenu_item-0(20200411 8pm已刪) cd /var/www/html/ cp magento8pm magento2-qt -r cd magento2-qt joe app/etc/env.php 'dbname' => 'magento2_qt', /usr/bin/php bin/magento cache:flush /usr/bin/php bin/magento indexer:reindex chown -R www-data:www-data . php bin/magento setup:upgrade --keep-generated php bin/magento setup:di:compile php bin/magento setup:static-content:deploy en_US -f New version of deployed files: 1586406539 php bin/magento setup:db:status Declarative Schema is not up to date Run 'setup:upgrade' to update your DB schema and data. Uncaught ReferenceError: Unable to process binding "if: function(){return loading }" Message: loading is not defined at if (eval at createBindingsStringEvaluator (knockout.js:2982), :3:55) at ko.computed.disposeWhenNodeIsRemoved (knockout.js:4381) at Function.evaluateImmediate_CallReadThenEndDependencyDetection (knockout.js:2173) at Function.evaluateImmediate_CallReadWithDependencyDetection (knockout.js:2140) at Function.evaluateImmediate (knockout.js:2101) at Object.ko.computed.ko.dependentObservable 2.)修改SQL ------------------------------------ mag2 表結構-ref 表: store store_website(website)->store_group(store)->store(store view) 表: theme->theme_id 1->Magento/blank 2->Magento/luma 7->Venustheme/8pm 9->Venustheme/7pm 11->Venustheme/6pm 表: core_config_data->path='design/theme/theme_id' ->scope(default,websites,stores)->value(thene_id) ------------------------------------ UPDATE core_config_data SET value='http://8pm.wg-1.com/' WHERE value='http://www.buck4u.com/' ; (影响了 5 行) UPDATE core_config_data SET value='http://8pm.wg-1.com/' WHERE value='http://www.purewaterclub.com/' ; (影响了 2 行) UPDATE core_config_data SET value='http://8pm.wg-1.com/' WHERE value='http://zou.wg-1.com/' ; (影响了 2 行)(20200411 8pm已刪) 改website aws-219->default store->b4u(20200411 8pm已改) 刪store->x-zou + store view->pwc_buck4aqua(20200411 8pm已刪) 改首頁頁面-> UPDATE cms_page SET content='buck4u' WHERE page_id=36 ; (buck4u.com) UPDATE cms_page SET content='pwc' WHERE page_id=30 ; (purewaterclub.com) 改前台theme為luma-> UPDATE core_config_data SET value='2' WHERE path='design/theme/theme_id' ; (影响了 4 行) ------------ 備份sql->magento2_qt_bk_1 mysql -u root -prevres88 mysql>CREATE DATABASE magento2_qt_bk_1 ; mysqldump -u root -prevres88 --add-drop-table magento2-qt| mysql -u root -prevres88 magento2_qt_bk_1 刪theme-> 先刪目錄 cd app/design/frontend/ rm Venustheme -r DELETE FROM theme WHERE theme_id > 3 ; (留admin blank luma) 刪store-> SELECT * FROM store WHERE group_id=1 ; (zou) DELETE FROM store WHERE group_id=1 ; 刪cms_page-> SELECT * FROM cms_page WHERE page_id<>30 AND page_id<>36 ; (purewaterclub.com) (buck4u.com) DELETE FROM cms_page WHERE page_id<>30 AND page_id<>36 ; 清空cms_page_store,cms_block,cms_block_store TRUNCATE cms_page_store; TRUNCATE cms_block; TRUNCATE cms_block_store; ------------ 備份sql->magento2_qt_bk_2 mysql -u root -prevres88 mysql>CREATE DATABASE magento2_qt_bk_2 ; mysqldump -u root -prevres88 --add-drop-table magento2-qt| mysql -u root -prevres88 magento2_qt_bk_2 關插件 Ves /usr/bin/php bin/magento module:status /usr/bin/php bin/magento module:disable --clear-static-content Ves_All /usr/bin/php bin/magento module:disable --clear-static-content Ves_BaseWidget /usr/bin/php bin/magento module:disable --clear-static-content Ves_Blog /usr/bin/php bin/magento module:disable --clear-static-content Ves_Brand /usr/bin/php bin/magento module:disable --clear-static-content Ves_Megamenu /usr/bin/php bin/magento module:disable --clear-static-content Ves_PageBuilder /usr/bin/php bin/magento module:disable --clear-static-content Ves_Productlist /usr/bin/php bin/magento module:disable --clear-static-content Ves_Setup /usr/bin/php bin/magento module:disable --clear-static-content Ves_Testimonial /usr/bin/php bin/magento module:disable --clear-static-content Ves_Themesettings 後刪目錄(會出現mcrypt錯誤->已解決) ---- Crypt.php bug --------------------------- [Exception] Deprecated Functionality: Function mcrypt_module_open() is deprecated in /v ar/www/html/magento2-qt/vendor/magento/framework/Encryption/Crypt.php on li ne 54 -> joe vendor/magento/framework/Encryption/Crypt.php ->在function mcrypt_xxx前面加@ line 54: $this->_handle = @mcrypt_module_open($cipher, '', $mode, ''); line 80: @mcrypt_module_close($this->_handle); line 56: $maxKeySize = @mcrypt_enc_get_key_size($this->_handle); line 62: $initVectorSize = @mcrypt_enc_get_iv_size($this->_handle); line 83: @mcrypt_generic_init($this->_handle, $key, $initVector); line 93: @mcrypt_generic_deinit($this->_handle); line 94: @mcrypt_module_close($this->_handle); line 138: return @mcrypt_generic($this->_handle, $data); line 152: $data = @mdecrypt_generic($this->_handle, $data); ------------------------------------------------ cd app/code rm MageVision -r rm Ves -r 刪Ves表 ------------ 導出sql->magento2_qt->magento2_qt_20200412.sql mysqldump -u root -prevres88 --databases magento2_qt > magento2_qt_20200412.sql -> mysql -u root -prevres88 mysql>SOURCE /var/www/magento2_qt_20200412.sql; ------------ 備份sql->magento2_qt->magento2_qt_20200412 mysql -u root -prevres88 mysql>CREATE DATABASE magento2_qt_20200412 ; mysqldump -u root -prevres88 --add-drop-table magento2_qt| mysql -u root -prevres88 magento2_qt_20200412 改magento2_qt,magento2_qt_20200412-> UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://8pm.wg-1.com/' ; (影响了 7 行) 4.)magento2-20200407-org-ok (2.3.4 + Bss + Zou) + magento2_qt php bin/magento cache:flush php bin/magento setup:upgrade php bin/magento indexer:reindex chown -R www-data:www-data . ->page,block,product->OK 8pm.wg-1.com 8pm.wg-1.com/admin_lak7t5/ service apache2 restart DROP DATABASE magento2-qt; mysql>CREATE DATABASE magento2_qt ; mysqldump -u root -prevres88 --add-drop-table magento2_qt_bk_2| mysql -u root -prevres88 magento2_qt 改store->default page->CMS Home Page->Use Website category error : Item (Magento\Catalog\Model\Category\Interceptor) with the same ID “191” already exists DELETE FROM url_rewrite WHERE entity_type='category' php bin/magento setup:db:status php bin/magento setup:db-schema:upgrade php bin/magento setup:db-data:upgrade php bin/magento php bin/magento --- 20200411-12 AWS-DV magento + sql ========================================================================================================================= ---------------------------------------------------- /dev/xvda1 30G 26G 3.8G 88% / (20200410 18:00)點4按鈕-> /dev/xvda1 30G 19G 11G 65% / root@awsko:/var/www/html/magento8pm# du -sh -> 755M ---------------------------------------------------- 後台page,block,product無法正常使用 1.)magento2-20200407-org-ok (2.3.4 + Bss + Zou) + magento2_20200406-ok (import 14 items + test page) cp sql->magento2_20200406-ok->magento2 cp magento2-20200407-org-ok/ magento2 -r cd /var/www/magento2 cp app/etc/env.php app/etc/env.php-0 joe app/etc/env.php 'username' => 'root', php bin/magento indexer:reindex chown -R www-data:www-data . ->page,block,product->OK 2.)magento2-20200407-org-ok (2.3.4 + Bss + Zou) + magento8pm-20200406 (aws-dv sql org) cp sql->magento8pm-20200406->magento2 改base url->default->web/unsecure/base_url->http://qt.wg-1.com/ (原http://www.buck4u.com/) 表core_config_data-> UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.buck4u.com/'; UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.purewaterclub.com/'; UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://zou.wg-1.com/'; 改首頁+store theme(1:blank,2:luma) UPDATE core_config_data SET value='2' WHERE path='design/theme/theme_id'; 刪不要的theme -> sql->table->theme刪不要的theme 表theme-> DELETE FROM theme WHERE theme_id > 3 ; 刪Ves theme->無效 DELETE FROM cms_page_store WHERE page_id > 4; 影响了 35 行。 (查询花费 0.0064 秒。) DELETE FROM cms_page WHERE page_id > 10; 影响了 32 行。 (查询花费 0.0126 秒。) php bin/magento cache:flush php bin/magento setup:upgrade php bin/magento indexer:reindex php bin/magento setup:di:compile php bin/magento setup:static-content:deploy en_US -f New version of deployed files: 1586406539 chown -R www-data:www-data . ->page,block,product->失敗 3.)magento2-20200407-org-ok (2.3.4 + Bss + Zou) + magento2-219-org-ok (aws-qt mag2 2.1.9 自動產生空sql) cp sql->magento2-219-org-ok->magento2 php bin/magento cache:flush php bin/magento setup:upgrade php bin/magento indexer:reindex chown -R www-data:www-data . ->page,block,product->OK --- 20200410 AWS-QT magento 2.3.4 + sql ========================================================================================================================= mv magento2 magento2-219-qt-wk cp magento2-234-ok/ magento2 -r cd magento2 chown -R www-data:www-data . joe /etc/nginx/sites-available/qt-wg-1 upstream fastcgi_backend { server unix:/run/php/php7.2-fpm.sock; } joe /etc/php/7.2/fpm/pool.d/www.conf user = www-data group = www-data ;user = lee ;group = lee listen.owner = www-data listen.group = www-data ;listen.owner = lee ;listen.group = lee joe app/etc/env.php 'username' => 'root', sudo systemctl restart nginx sudo systemctl restart php7.2-fpm apt-cache pkgnames | grep php7.2 rm /usr/bin/php cp /usr/bin/php7.2 /usr/bin/php PHP 7.2.29-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Mar 20 2020 13:54:16) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.29-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies php bin/magento setup:upgrade php bin/magento indexer:reindex php bin/magento setup:static-content:deploy -f Execution time: 36.79079914093 ->New version of deployed files: 1586443960 php bin/magento cache:clean chown -R www-data:www-data . rename sql->magento2->magento2-234-wk cp sql->magento2-qt->magento2 error->INSERT INTO `db` VALUES("localhost", "magento2", "magento_user", "Y", "Y", "Y", "Y", "Y", "Y", "N", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y"); php bin/magento setup:upgrade php bin/magento indexer:reindex php bin/magento cache:clean chown -R www-data:www-data . php bin/magento cache:flush mv magento2 magento2-219-qt-wk 備份->rename sql->magento2 magento2-129-qt-wk mysql -u root -p ->root + revres88 mysql> CREATE DATABASE magento2 CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL ON magento2.* TO magento_user@localhost IDENTIFIED BY 'revres88'; quit cd /var/www/ composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento2 /root/.config/composer/auth.json su lee cd /var/www/magento2/ wget 118.163.15.73/magento2.1.9.tar.gz (Magento-CE-2.1.9-2017-09-13-03-35-18.tar.gz) tar -xzf magento2.1.9.tar.gz composer install -v error UPDATE `db`SET Db = "magento2" where Db = "magento2-219-qt-wk"; php bin/magento config:set system/backup/functionality_enabled 1 php bin/magento setup:backup --db composer require magento/product-community-edition 2.3.4 --no-update wget https://raw.githubusercontent.com/magento/magento2/2.3.0/dev/tools/UpgradeScripts/pre_composer_update_2.3.php php -f pre_composer_update_2.3.php -- --root='项目根目录路径' --repo=https://repo.magento.com/ wget https://raw.githubusercontent.com/magento/magento2/2.3.0/dev/tools/UpgradeScripts/pre_composer_update_2.3.php php -f pre_composer_update_2.3.php -- --root='/var/www/magento2' --repo=https://repo.magento.com/ composer update git checkout tags/2.3.4 -b 2.3.4 成功備份 cp magento2 magento2-234-pwc-20200409-ok -r cp sql->magento2->magento2-234-pwc-20200409-ok error->ALTER TABLE `catalog_eav_attribute` ADD CONSTRAINT `CATALOG_EAV_ATTRIBUTE_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE; --- 20200410 AWS-QT upgrade magento 2.1.9 -> 2.3.4 第2次失敗 ========================================================================================================================= chown lee:lee . -hR su lee php bin/magento maintenance:enable cp composer.json composer.json-0 composer remove magento/product-community-edition --no-update composer show magento/product-community-edition 2.3.* --all | grep -m 1 versions composer require magento/product-community-edition=2.3.4 --no-update ->./composer.json has been updated php bin/magento maintenance:enable composer require magento/product-community-edition 2.3.4 --no-update composer update (2020040921:30-22:36) (2020040922:57-) rm -rf var/di var/generation php bin/magento cache:flush php bin/magento setup:upgrade php bin/magento setup:static-content:deploy ->New version of deployed files: 1586443960 php bin/magento indexer:reindex php bin/magento maintenance:disable php bin/magento cache:clean bin/magento --version dh -sh --- 20200409 AWS-QT upgrade magento 2.1.9 -> 2.3.4 第1次失敗 ========================================================================================================================= 0.)備份magento2->magento2-232-ok cd /var/www/ mv magento2 magento2-234-ok mkdir magento2 chown lee:lee magento2 備份->rename sql magento2->magento2-234-less-1-table mysql -u root -p ->root + revres88 mysql> CREATE DATABASE magento2 CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL ON magento2.* TO magento_user@localhost IDENTIFIED BY 'revres88'; quit 1.)安裝PHP 7.1 sudo apt-get update -y sudo apt install software-properties-common sudo add-apt-repository -y ppa:ondrej/php sudo add-apt-repository -y ppa:ondrej/nginx sudo apt-get update -y apt-cache pkgnames | grep php7.1 sudo apt-get install -y php7.1 php7.1-fpm php7.1-mcrypt php7.1-curl php7.1-cli php7.1-mysql php7.1-gd php7.1-xsl php7.1-json php7.1-intl php-pear php7.1-dev php7.1-common php7.1-mbstring php7.1-zip php7.1-bcmath php7.1-fileinfo php7.1-soap php7.1-imagick libcurl4-openssl-dev curl -y (不必停留給phpmyadmin用)2.)停用php 7.2 不必停留給phpmyadmin用->x->sudo systemctl stop php7.2-fpm sudo systemctl start php7.1-fpm sudo rm /usr/bin/php sudo cp /usr/bin/php7.1 /usr/bin/php php -v -> PHP 7.1.33-14+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Mar 20 2020 13:57:17) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.1.33-14+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies 2.)修改php.ini設定 sudo su joe /etc/php/7.1/fpm/php.ini joe /etc/php/7.1/cli/php.ini -> memory_limit = 1024M max_execution_time = 1800 zlib.output_compression = On -> systemctl restart php7.1-fpm 3.)修改nginx設定(7.2->7.1) joe /etc/nginx/sites-available/qt-wg-1 upstream fastcgi_backend { server unix:/run/php/php7.1-fpm.sock; } 4.)安裝Magento ver. 2.1.9 su lee cd /var/www/magento2/ wget 118.163.15.73/magento2.1.9.tar.gz (Magento-CE-2.1.9-2017-09-13-03-35-18.tar.gz) tar -xzf magento2.1.9.tar.gz -> --------------- 先直接改Encryptor.php->return null;->才不會出現報錯 joe /var/www/magento2/vendor/magento/framework/Encryption/Encryptor.php protected function getCrypt($key = null, $cipherVersion = null, $initVector = true) { return null; /* return new Crypt($key, $cipher, $mode, $initVector); */ } ----------------- -> php bin/magento setup:install --backend-frontname="admin_lak7t5" \ --key="34c102e5ee62f4d7ee8f4b8865b07bf5" \ --base-url="http://qt.wg-1.com" \ --base-url-secure="https://qt.wg-1.com" \ --db-host=localhost \ --db-name=magento2 \ --db-user=magento_user \ --db-password='revres88' \ --admin-firstname=Lee \ --admin-lastname=David \ --admin-email=dv4ml@dacomputing.com \ --admin-user=adminmag \ --admin-password=frevres0907 \ --language=en_US \ --currency=USD \ --timezone=America/Los_Angeles \ --use-rewrites=1 -> Write installation date... [Progress: 425 / 425] [SUCCESS]: Magento installation complete. [SUCCESS]: Magento Admin URI: /admin_lak7t5 -> find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; && chmod 777 var/ -R && find pub/media -type d -exec chmod 777 {} \; && find pub/static -type d -exec chmod 777 {} \; && chmod 777 app/etc && chmod 644 app/etc/*.xml && chmod u+x bin/magento chown -R lee:lee . php bin/magento indexer:reindex php bin/magento cache:flush php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy en_US New version of deployed files: 1586397922 -> PHP Fatal error: Cannot use 'Void' as class name as it is reserved in /var/www/magento2/vendor/magento/module-sales/Controller/Adminhtml/Order/Invoice/Void.php on line 9 Here is how to fix it: joe vendor/magento/module-sales/etc/webapi.xml line 112: - + joe vendor/magento/module-sales/Block/Adminhtml/Order/Invoice/View.php line 242: - return $this->getUrl('sales/*/void', ['invoice_id' => $this->getInvoice()->getId()]); + return $this->getUrl('sales/*/voidInvoice', ['invoice_id' => $this->getInvoice()->getId()]); joe vendor/magento/module-sales/Block/Adminhtml/Order/Creditmemo/View.php line 183: - return $this->getUrl('sales/*/void', ['creditmemo_id' => $this->getCreditmemo()->getId()]); + return $this->getUrl('sales/*/voidCreditmemo', ['creditmemo_id' => $this->getCreditmemo()->getId()]); joe vendor/magento/module-sales/Controller/Adminhtml/Order/Invoice/Void.php line 9: - class Void extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoice\View + class VoidInvoice extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoice\View joe vendor/magento/module-sales/Controller/Adminhtml/Order/Creditmemo/Void.php line 10: - class Void extends \Magento\Backend\App\Action + class VoidCreditmemo extends \Magento\Backend\App\Action mv vendor/magento/module-sales/Controller/Adminhtml/Order/Creditmemo/Void.php vendor/magento/module-sales/Controller/Adminhtml/Order/Creditmemo/VoidCreditmemo.php mv vendor/magento/module-sales/Controller/Adminhtml/Order/Invoice/Void.php vendor/magento/module-sales/Controller/Adminhtml/Order/Invoice/VoidInvoice.php lee@ip-172-31-40-85:/var/www/magento2$ php bin/magento setup:di:compile Compilation was started. Repositories code generation... 1/7 [====>-----------------------] 14% 1 sec 44.0 MiB Application code generator... 3/7 [============>---------------] 42% 7 secs 136.0 MiB36.0 MiB Interceptors generation... 4/7 [================>-----------] 57% 20 secs 154.0 MiBMiB Area configuration aggregation... 5/7 [====================>-------] 71% 32 secs 170.0 MiB Interception cache generation... 6/7 [========================>---] 85% 45 secs 246.0 MiBB Interception cache generation... 7/7 [============================] 100% 56 secs 246.0 MiB Generated code and dependency injection configuration successfully. -> sudo systemctl restart nginx sudo systemctl restart php7.1-fpm 必须要设权限,不然会报各种权限错误! cd /var/www/magento2/ find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; && chmod 777 var/ -R && find pub/media -type d -exec chmod 777 {} \; && find pub/static -type d -exec chmod 777 {} \; && chmod 777 app/etc && chmod 644 app/etc/*.xml && chmod u+x bin/magento nginx error_log joe /var/log/nginx/error.log mag2 error 929652303517 cp var/report/929652303517 /var/www/html/err-101 http://3.134.105.225/err-101 sudo su find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; && chmod 777 var/ -R && find pub/media -type d -exec chmod 777 {} \; && find pub/static -type d -exec chmod 777 {} \; && chmod 777 app/etc && chmod 644 app/etc/*.xml && chmod u+x bin/magento chown -R lee:lee . 備份 cp magento2 magento2-219-org-ok -r sql->magento2->magento2-219-org-ok sql->magento8pm->magento8pm-qt 換舊sql-magento8pm-20200406 su lee cd /var/www/magento2/ cp app/etc/env.php app/etc/env.php-0 joe app/etc/env.php 'dbname' => 'magento8pm-qt',(原magento2) 'username' => 'root', (原magento_user) -> php bin/magento indexer:reindex php bin/magento cache:flush 改base url core_config_data table-> default->web/unsecure/base_url->http://qt.wg-1.com/ (原http://www.buck4u.com/) UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.buck4u.com/' UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://www.purewaterclub.com/' UPDATE core_config_data SET value='http://qt.wg-1.com/' WHERE value='http://zou.wg-1.com/' 手工刪theme rm -rf var/view_preprocessed/* pub/static/frontend/* sql->table->theme刪不要的theme UPDATE core_config_data SET value='1' WHERE path='design/theme/theme_id' php bin/magento cache:flush php bin/magento setup:static-content:deploy en_US New version of deployed files: 1586406539 建圖片連結 cd /var/www/magento2/pub/media/ rm catalog -r ln -s /var/www/pwpic/catalog/ /var/www/magento2/pub/media/ ln -s /var/www/pwpic/webimg/ /var/www/magento2/pub/media/ ln -s /var/www/pwpic/pageimg/ /var/www/magento2/pub/media/ php bin/magento indexer:reindex php bin/magento cache:flush ??? php bin/magento catalog:images:resize Product images resized successfully sudo su find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; && chmod 777 var/ -R && find pub/media -type d -exec chmod 777 {} \; && find pub/static -type d -exec chmod 777 {} \; && chmod 777 app/etc && chmod 644 app/etc/*.xml && chmod u+x bin/magento ??? chown -R www-data:www-data . ?->chown -R lee:lee . -hR joe /etc/php/7.1/fpm/pool.d/www.conf ;user = www-data ;group = www-data user = lee group = lee ;listen.owner = www-data ;listen.group = www-data listen.owner = lee listen.group = lee -> sudo systemctl restart nginx sudo systemctl restart php7.1-fpm cd /var/www/magento2 find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \; find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} \; find . -type f -exec chmod 644 {} \; find . -type d -exec chmod 755 {} \; find ./var -type d -exec chmod 777 {} \; chmod 777 var/ -R find ./pub/media -type d -exec chmod 777 {} \; find ./pub/static -type d -exec chmod 777 {} \; chmod 777 ./app/etc chmod 644 ./app/etc/*.xml chown lee:lee . -hR chmod u+x bin/magento chmod -R g+rwxs . ls -la 備份 cp magento2 magento2-219-qt-20200409-ok -r cp sql->magento8pm-qt->magento8pm-qt-20200409-ok #1062 - Duplicate entry 'localhost-magento8pm-qt-magento_user' for key 'PRIMARY' Warning: Illegal string offset 'is_in_stock' in /var/www/magento2/vendor/magento/module-catalog-inventory/Ui/DataProvider/Product/Form/Modifier/AdvancedInventory.php on line 87 Customer Grid index is locked by another reindex process. Skipping. php bin/magento indexer:status php bin/magento indexer:reset php bin/magento indexer:reindex php bin/magento indexer:info php bin/magento indexer:reset catalogsearch_fulltext php bin/magento indexer:reindex catalogsearch_fulltext ------------------------------------------------------------ 以下為 ref I run 7.1 in production no problem. If you want to get around the error so you can run the install. add this line error_reporting(E_ALL ^ E_DEPRECATED); to the top of sudo vim lib/internal/Magento/Framework/Encryption/Crypt.php 重新安裝mcrypt新版本 sudo apt-get install mcrypt php7.1-mcrypt root@awsko:/home/ubuntu# /usr/bin/php -v PHP 7.1.33-9+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Feb 5 2020 16:53:29) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.1.33-9+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies 2.)停用php 7.1 sudo systemctl stop php7.1-fpm sudo rm /usr/bin/php sudo cp /usr/bin/php7.2 /usr/bin/php php -v systemctl restart nginx sudo systemctl restart php7.2-fpm --- 20200407-08 AWS-QT 降級 PHP 7.2 -> 7.1 ========================================================================================================================= 0.)測試 50GPD Home drinking RO System w/tank extra free 3 PC filters RQ-5T-50+3 1.)改atrribute->sku->searchable 2.)改mysql設定可以查2英文字 參考->https://dev.mysql.com/doc/refman/5.6/en/fulltext-fine-tuning.html#fulltext-word-length joe /etc/my.cnf(不知是否有效) joe /etc/mysql/my.cnf -> [mysqld] innodb_ft_min_token_size=2 ft_min_word_len=2 -> mysql -u root -p 失敗->mysql> SET GLOBAL innodb_ft_min_token_size = 2;->ERROR 1238 (HY000): Variable 'innodb_ft_min_token_size' is a read only variable mysql> SHOW VARIABLES LIKE 'innodb_ft_min_token_size'; -> +--------------------------+-------+ | Variable_name | Value | +--------------------------+-------+ | innodb_ft_min_token_size | 2 |(原本為3) +--------------------------+-------+ 1 row in set (0.00 sec) mysql> SHOW VARIABLES LIKE 'ft_min_word_len'; -> +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | ft_min_word_len | 2 |(原本為4) +-----------------+-------+ 1 row in set (0.00 sec) -> systemctl restart mysql 3.)修改系統查詢 joe vendor/magento/module-catalog-search/etc/search_request.xml -> (原為should,改為must) -> cd /var/www/html/magento8pm /usr/bin/php bin/magento indexer:reindex /usr/bin/php bin/magento cache:flush --- 20200407 AWS-DV RO站前台查不到SKU ========================================================================================================================= 0.)建新目錄 cd /var/www/ mv magento2 magento2-234 mkdir magento2 1.)mysql建新表 備份->rename sql magento2->magento2-234 mysql -u root -p ->root + revres88 mysql> CREATE DATABASE magento2 CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL ON magento2.* TO magento_user@localhost IDENTIFIED BY 'revres88'; quit 2.)Magento ver. 2.1.9 cd /var/www/magento2/ wget 118.163.15.73/magento2.1.9.tar.gz (Magento-CE-2.1.9-2017-09-13-03-35-18.tar.gz) tar -xzf magento2.1.9.tar.gz -> php bin/magento setup:install --backend-frontname="admin_lak7t5" \ --key="34c102e5ee62f4d7ee8f4b8865b07bf5" \ --base-url="http://qt.wg-1.com" \ --base-url-secure="https://qt.wg-1.com" \ --db-host=localhost \ --db-name=magento2 \ --db-user=magento_user \ --db-password='revres88' \ --admin-firstname=Lee \ --admin-lastname=David \ --admin-email=dv4ml@dacomputing.com \ --admin-user=adminmag \ --admin-password=frevres0907 \ --language=en_US \ --currency=USD \ --timezone=America/Los_Angeles \ --use-rewrites=1 -> Write installation date... Installing admin user... [Progress: 981 / 985] Caches clearing: Cache cleared successfully [Progress: 982 / 985] Disabling Maintenance Mode: [Progress: 983 / 985] Post installation file permissions check... For security, remove write permissions from these directories: '/var/www/magento2/app/etc' [Progress: 984 / 985] Write installation date... [Progress: 985 / 985] [SUCCESS]: Magento installation complete. [SUCCESS]: Magento Admin URI: /adminmag Nothing to import. -> find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; && chmod 777 var/ -R && find pub/media -type d -exec chmod 777 {} \; && find pub/static -type d -exec chmod 777 {} \; && chmod 777 app/etc && chmod 644 app/etc/*.xml && chmod u+x bin/magento chown -R lee:lee . php bin/magento indexer:reindex php bin/magento cache:flush php bin/magento setup:upgrade php bin/magento setup:di:compile -> Compilation was started. Repositories code generation... 1/7 [====>-----------------------] 14% 1 sec 78.5 MiB Application code generator... 3/7 [============>---------------] 42% 17 secs 209.0 MiB Interceptors generation... 4/7 [================>-----------] 57% 29 secs 233.0 MiB Area configuration aggregation... 5/7 [====================>-------] 71% 47 secs 263.0 MiB Interception cache generation... 6/7 [========================>---] 85% 53 secs 359.0 MiB Interception cache generation... 7/7 [============================] 100% 1 min 359.0 MiB Generated code and dependency injection configuration successfully. -> sudo systemctl restart nginx sudo systemctl restart php7.2-fpm --- 20200407 AWS-QT 重裝 magento 2.1.9 ========================================================================================================================= 0.)建新目錄 su lee cd /var/www/ mv magento2 magento2-20200407-bk mkdir magento2 1.)mysql建新表 mysql -u root -p ->root + revres88 mysql> CREATE DATABASE magento2 CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL ON magento2.* TO magento_user@localhost IDENTIFIED BY 'revres88'; quit 2.)Magento ver. 2.3.4 (aws-dv 2.1.9) cd /var/www/magento2/ wget 118.163.15.73/magento2.zip (Magento-CE-2.3.4-2020-01-16-11-19-26.zip) unzip -q magento2.zip -> php bin/magento setup:install --backend-frontname="admin_lak7t5" \ --key="ee62f4d7ee8f4b8865b07bf534c102e5" \ --base-url="http://qt.wg-1.com" \ --base-url-secure="https://qt.wg-1.com" \ --db-host=localhost \ --db-name=magento2 \ --db-user=magento_user \ --db-password='revres88' \ --admin-firstname=Lee \ --admin-lastname=David \ --admin-email=dv4ml@dacomputing.com \ --admin-user=adminmag \ --admin-password=frevres0907 \ --language=en_US \ --currency=USD \ --timezone=America/Los_Angeles \ --use-rewrites=1 -> Write installation date... Installing admin user... [Progress: 981 / 985] Caches clearing: Cache cleared successfully [Progress: 982 / 985] Disabling Maintenance Mode: [Progress: 983 / 985] Post installation file permissions check... For security, remove write permissions from these directories: '/var/www/magento2/app/etc' [Progress: 984 / 985] Write installation date... [Progress: 985 / 985] [SUCCESS]: Magento installation complete. [SUCCESS]: Magento Admin URI: /adminmag Nothing to import. -> find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; && chmod 777 var/ -R && find pub/media -type d -exec chmod 777 {} \; && find pub/static -type d -exec chmod 777 {} \; && chmod 777 app/etc && chmod 644 app/etc/*.xml && chmod u+x bin/magento chown -R lee:lee . php bin/magento indexer:reindex php bin/magento cache:flush php bin/magento setup:upgrade php bin/magento setup:di:compile -> Compilation was started. Repositories code generation... 1/7 [====>-----------------------] 14% 1 sec 78.5 MiB Application code generator... 3/7 [============>---------------] 42% 17 secs 209.0 MiB Interceptors generation... 4/7 [================>-----------] 57% 29 secs 233.0 MiB Area configuration aggregation... 5/7 [====================>-------] 71% 47 secs 263.0 MiB Interception cache generation... 6/7 [========================>---] 85% 53 secs 359.0 MiB Interception cache generation... 7/7 [============================] 100% 1 min 359.0 MiB Generated code and dependency injection configuration successfully. -> sudo systemctl restart nginx sudo systemctl restart php7.2-fpm 3.)備份mag2 + sql cp magento2 magento2-20200407-org-0 -r cp sql->magento2->magento2-20200407-org-0 4.)安裝 Theme Zou demo cd /var/www/magento2/app/design/frontend/ wget 118.163.15.73/Zou.zip unzip Zou.zip php bin/magento cache:flush 5.)安裝插件 DisableCompare mkdir -p /var/www/magento2/app/code/Bss/DisableCompare cd /var/www/magento2/app/code/Bss/DisableCompare wget 118.163.15.73/mag-ext-1.zip unzip mag-ext-1.zip cd /var/www/magento2/ php bin/magento module:status php bin/magento module:enable --clear-static-content Bss_DisableCompare php bin/magento setup:upgrade php bin/magento setup:di:compile 6.)建立圖片連結 ln -s /var/www/pwpic/catalog/ /var/www/magento2/pub/media/ ln -s /var/www/pwpic/pageimg/ /var/www/magento2/pub/media/ 7.)備份mag2 + sql cp magento2 magento2-20200407-org-ok -r cp sql->magento2->magento2-20200407-org-ok --- 20200407 AWS-QT 重裝 magento 2.3.4 ========================================================================================================================= 1.)改mysql password(原為frevres88->revres88) mysql -u root -p mysql> set password for root@localhost = password('revres88'); set password for magento_user@localhost = password('revres88'); 2.)改mag2-mysql password(原為frevres88->revres88) cd /var/www/magento2/app/etc joe env.php-> 'password' => 'revres88', 3.)Try Error -> 全部失敗 解壓(無列表)-> tar -xzf magento8pm-20200325-new-ro-online-bk.tar.gz 改app/etc/env.php -> magento8pm copy AWS-DV-SQL magento8pm -> AWS-QT-SQL 新增magento8pm缺少的table disable upgrade 失敗的mag2 model 修改table->core_config_data->web/unsecure/base_url等4筆 改DNS zou.wg-1.com --- 20200406 AWS-QT 改 mysql password ========================================================================================================================= 1.)安裝 Theme Zou demo su lee cd /var/www/magento2/app/design/frontend/ wget 118.163.15.73/Zou.zip unzip Zou.zip cd /var/www/magento2/ x->2.)安裝插件 Bannerslider(slider manage沒有list無法管理->不使用了) cd /var/www/magento2/ git clone https://github.com/Magestore/Bannerslider-Magento2.git mkdir -p app/code/Magestore/Bannerslider cp Bannerslider-Magento2/* app/code/Magestore/Bannerslider/ -rf rm Bannerslider-Magento2 -rf php bin/magento module:enable --clear-static-content Magestore_Bannerslider php bin/magento setup:upgrade 3.)下載滾動js OwlCarousel2(可以不用作,sample中已含) 參數設定 -> http://owlcarousel2.github.io/OwlCarousel2/docs/api-options.html wget https://github.com/OwlCarousel2/OwlCarousel2/archive/2.3.4.zip mv 2.3.4.zip app/design/frontend/Zou/demo/web/js/ cd app/design/frontend/Zou/demo/web/js unzip 2.3.4.zip rm 2.3.4.zip 4.)補作deploy js OwlCarousel2(20200407) cd /var/www/magento2/ php bin/magento setup:static-content:deploy en_US -f ->Execution time: 28.715186834335 cd /var/www/magento2/app/design/frontend/Zou/demo/web/js/ joe demo.js http://owlcarousel2.github.io/OwlCarousel2/docs/api-options.html cd /var/www/magento2/app/design/frontend/Zou/demo/Magento_Cms/layout/ joe cms_index_index.xml cd /var/www/magento2/app/design/frontend/Zou/demo/web/css/ joe demo.css ?->2行都去掉 background: transparent; cd /var/www/magento2/app/design/frontend/Zou/demo/Magento_Cms/templates/html/homepage/ joe home_content.phtml --- 20200405-07 AWS-QT 裝 theme Zou demo ========================================================================================================================= 1.)還原magento2->20200404(未裝任何插件) tar -xzvf magento2-20200404.tar.gz bin/magento setup:di:compile -> Compilation was started. Repositories code generation... 1/7 [===>------------------] 14% 1 sec 78.5 MiB Interception cache generation... 7/7 [=============] 100% 59 secs 357.0 MiB Generated code and dependency injection configuration successfully. 2.)恢復magento2->裝了插件x3(DisableCompare,Ves,SliderBanner) joe /etc/php/7.2/fpm/php.ini joe /etc/php/7.2/cli/php.ini -> display_errors = On (原 Off) log_errors = On ;error_log = php_errors.log -> touch /var/log/php_error.log(後來改 chown lee:lee) find . -name "php_errors.log"(找不到) systemctl restart php7.2-fpm cd /var/www/magento2/ php -dmemory_limit=2G bin/magento setup:di:compile -> Compilation was started. Repositories code generation... 1/7 [==>-----------------] 14% < 1 sec 78.5 MiB Service data attributes generation... 2/7 [===>---------] 28% 19 secs 213.0 MiB Application code generator... 3/7 [=====>-------] 42% 20 secs 213.0 MiB 3.)刪去Ves,SliderBanner>只留DisableCompare Compilation was started. Repositories code generation... 1/7 [==>-----------------] 14% < 1 sec 78.5 MiB Application code generator... 3/7 [=====>-------] 42% 15 secs 209.0 MiB Interceptors generation... 4/7 [=======>-----] 57% 34 secs 233.0 MiB 08:58->09:26->ctrl-c->中斷 4.)magento2-20200406-ok + DisableCompare + Themem Zou cp magento2-20200406-ok magento2 -r php bin/magento setup:di:compile Compilation was started. Repositories code generation... 1/7 [==>-----------------] 14% < 1 sec 78.5 MiB Application code generator... 3/7 [=====>-------] 42% 17 secs 209.0 MiB Interceptors generation... 4/7 [=======>-----] 57% 30 secs 233.0 MiB Area configuration aggregation... 5/7 [=========>---] 71% 49 secs 263.0 MiB Killed php bin/magento cache:clean (20200407)->成功 lee@ip-172-31-40-85:/var/www/magento2$ php bin/magento setup:di:compile Compilation was started. Repositories code generation... 1/7 [==>-----------------] 14% < 1 sec 78.5 MiB Application code generator... 3/7 [=====>-------] 42% 15 secs 209.0 MiB Interceptors generation... 4/7 [=======>-----] 57% 27 secs 233.0 MiB Area configuration aggregation... 5/7 [=========>---] 71% 46 secs 263.0 MiB Interception cache generation... 6/7 [===========>-] 85% 53 secs 359.0 MiB Interception cache generation... 7/7 [=============] 100% 1 min 359.0 MiB Generated code and dependency injection configuration successfully. 5.)magento2-20200406-ok + DisableCompare + Themem Zou root@ip-172-31-40-85:/var/www/magento2-20200406-ok# php bin/magento setup:di:compile Compilation was started. Repositories code generation... 1/7 [====>-----------------------] 14% < 1 sec 78.5 MiB Application code generator... 3/7 [============>---------------] 42% 18 secs 209.0 MiB Interceptors generation... 4/7 [================>-----------] 57% 31 secs 233.0 MiB Area configuration aggregation... 5/7 [====================>-------] 71% 50 secs 265.0 MiB Interception cache generation... 6/7 [========================>---] 85% 59 secs 359.0 MiB Interception cache generation... 7/7 [============================] 100% 1 min 359.0 MiB Generated code and dependency injection configuration successfully. --- 20200404-07 研究 bin/magento setup:di:compile 失敗或需時太久原因 ========================================================================================================================= 1.)新增Attribute b4_free_shipping ------------ To Do----------------- import 產品自動建目錄(不可以有1/,先改其他 取消目錄PWC? google reCaptcha? 建新根目錄? 取消review? ---------------------- --- 20200404 AWS-QT 手工更新 Attribute set + import product.csv ========================================================================================================================= 1.)安裝 Theme 8pm su lee cd /var/www/magento2/app/design/frontend wget 118.163.15.73/theme8pm.zip unzip theme8pm.zip cd /var/www/magento2/ php bin/magento indexer:reindex php bin/magento cache:flush 2.)安裝插件 DisableCompare su lee cd /var/www/magento2/app/ mkdir code/Bss/DisableCompare cd code/Bss/DisableCompare wget 118.163.15.73/mag-ext-1.zip unzip mag-ext-1.zip cd /var/www/magento2/ php bin/magento module:status php bin/magento module:enable --clear-static-content Bss_DisableCompare php bin/magento setup:upgrade php bin/magento setup:di:compile->卡住?加上插件要花很長時間 Compilation was started. Application code generator... 3/7 [=====>-------] 42% 15 secs 209.0 MiB 3.)安裝插件 Ves 全部不能用 cd /var/www/magento2/app/code/ wget 118.163.15.73/mag-ext-2.zip unzip mag-ext-2.zip php bin/magento module:enable --clear-static-content Ves_All php bin/magento module:enable --clear-static-content Ves_Megamenu php bin/magento module:enable --clear-static-content Ves_Setup php bin/magento module:enable --clear-static-content Ves_BaseWidget php bin/magento module:enable --clear-static-content Ves_Themesettings php bin/magento module:enable --clear-static-content Ves_PageBuilder php bin/magento module:enable --clear-static-content Ves_Productlist php bin/magento setup:upgrade wget 118.163.15.73/mag-ext-3.zip(只有Ves 3x) unzip mag-ext-3.zip php bin/magento module:uninstall --clear-static-content Ves_Megamenu ->Ves_Megamenu is not an installed composer package php bin/magento module:disable --clear-static-content Ves_All php bin/magento module:disable --clear-static-content Ves_Megamenu php bin/magento module:disable --clear-static-content Ves_Setup php bin/magento module:disable --clear-static-content Ves_BaseWidget php bin/magento module:disable --clear-static-content Ves_Themesettings php bin/magento module:disable --clear-static-content Ves_PageBuilder php bin/magento module:disable --clear-static-content Ves_Productlist --- 20200404 AWS-QT 安裝 theme 8pm + Ext DisableCompare + Ves 失敗 ========================================================================================================================= 0.)copy pwpic from aws-dv cd /var/www/pwpic/ chown www-data:www-data . 舊aws-dv joe /etc/apache2/sites-available/aws-wg-1.conf DocumentRoot /var/www/html/pwpic/webimg ServerName aws.wg-1.com ErrorLog /var/log/apache2/error_log CustomLog /var/log/apache2/access_log common Options FollowSymLinks AllowOverride all Require all granted # Order allow,deny # Allow from all 1.)新aws-qt->qtpic-wg-1->qtpic.wg-1.com指向3.134.105.225(AWS-QT) joe /etc/nginx/sites-available/qtpic-wg-1 server { listen 80; server_name qtpic.wg-1.com; root /var/www/pwpic/webimg; } -> 測if OK->sudo nginx -t sudo ln -s /etc/nginx/sites-available/qtpic-wg-1 /etc/nginx/sites-enabled/ sudo systemctl restart nginx 2.)新aws-qt->aws-wg-1 joe /etc/nginx/sites-available/aws-wg-1 server { listen 80; server_name aws.wg-1.com; root /var/www/pwpic/webimg; } 3.)aws.wg-1.com指向3.134.105.225(AWS-QT) 4.)備份mag2 + sql cd /var/www/magento2 備份mag2->tar -czf magento2-20200403.tar.gz * 解壓->tar -xzvf magento2-20200403.tar.gz 備份sql->copy magento2 -> magento2_20200403 備份mag2->tar -czf magento2-20200404.tar.gz * (裝完theme 8pm) 備份sql->copy magento2 -> magento2_20200404 (裝完theme 8pm) 備份mag2->tar -czf magento2-20200404-bug.tar.gz * (裝完theme 8pm + ext 3x )(20200407) 備份mag2->tar -czf magento2-20200406-bug.tar.gz * (裝完theme 8pm + ext 3x )(20200407) 備份pwpic->tar -czf pwpic-20200407.tar.gz * 備份mag2->tar -czf magento2-20200406-ok.tar.gz * (裝完theme Zou + ext Bss )(20200407) 5.)建立圖片連結 cd /var/www/pwpic/catalog/ chown -R lee:lee . su lee ln -s /var/www/pwpic/catalog/ /var/www/magento2/pub/media/ php bin/magento indexer:reindex php bin/magento cache:flush --- 20200403-04 AWS-DV 圖片移轉至 AWS-QT ========================================================================================================================= (20200402 22:10) aws-hdd-100%-> Filesystem Size Used Avail Use% Mounted on /dev/xvda1 30G 28G 1.1G 97% / cd /var/www/html rm Magento-CE-2.3.2.tar.bz2 rm magento8pm.tar.gz rm php-7.0.4.tar.gz rm ves_8pmfriday_quickstart.zip rm magento8pm-20200324-new-ro-online-bk.tar.gz rm magento8pm-20191107-ok.tar.gz rm magento8pm-20191107-pm-ok.tar.gz login as: ubuntu Authenticating with public key "imported-openssh-key" Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-1060-aws x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage System information as of Thu Apr 2 14:04:31 UTC 2020 System load: 0.17 Processes: 122 Usage of /: 99.9% of 29.02GB Users logged in: 1 Memory usage: 78% IP address for eth0: 172.31.32.158 Swap usage: 53% => / is using 99.9% of 29.02GB * Kubernetes 1.18 GA is now available! See https://microk8s.io for docs or install it with: sudo snap install microk8s --channel=1.18 --classic * Multipass 1.1 adds proxy support for developers behind enterprise firewalls. Rapid prototyping for cloud operations just got easier. https://multipass.run/ * Canonical Livepatch is available for installation. - Reduce system reboots and improve kernel security. Activate at: https://ubuntu.com/livepatch 123 packages can be updated. 0 updates are security updates. *** System restart required *** Last login: Wed Apr 1 02:47:24 2020 from 114.34.53.65 ubuntu@awsko:~$ sudo su root@awsko:/home/ubuntu# df -h Filesystem Size Used Avail Use% Mounted on udev 480M 0 480M 0% /dev tmpfs 99M 11M 88M 11% /run /dev/xvda1 30G 30G 0 100% / tmpfs 492M 0 492M 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 492M 0 492M 0% /sys/fs/cgroup /dev/loop0 18M 18M 0 100% /snap/amazon-ssm-agent/1480 /dev/loop3 92M 92M 0 100% /snap/core/8689 /dev/loop4 18M 18M 0 100% /snap/amazon-ssm-agent/1566 /dev/loop1 94M 94M 0 100% /snap/core/8935 tmpfs 99M 0 99M 0% /run/user/1000 root@awsko:/home/ubuntu# cd /var/www/html rm magento8pm-20191220-dv-fail.tar.gz rm magento8pm-20200227-card-braintree-error.tar.gz apt-get autoclean apt-get clean zip -r pwpic-0.zip pwpic-0/ PC下載 -> http://18.218.158.219/pwpic-0.zip rm pwpic-0.zip rm pwpic-0 -r aws-qt: wget http://18.218.158.219/pwpic-0.zip wget http://18.218.158.219/pwpic.zip wget http://18.218.158.219/magento8pm-20191107-bk-for-dv.tar.gz wget http://18.218.158.219/magento8pm-20191123-bk.tar.gz wget http://18.218.158.219/magento8pm-20191230-before-md5-patch.tar.gz wget http://18.218.158.219/magento8pm-20200121-bk.tar.gz wget http://18.218.158.219/magento8pm-20200221-dv.tar.gz wget http://18.218.158.219/magento8pm-20200311-braintree-ok-20200121-recover-dv-fix-ok.tar.gz --aws未刪 wget http://18.218.158.219/magento8pm-20200319-braintree-ok-dv-fix-chen-test-ok.tar.gz wget http://18.218.158.219/magento8pm-20200325-new-ro-online-bk.tar.gz aws-dv: zip -r pwpic.zip pwpic/ rm pwpic.zip rm pwpic-0.zip rm pwpic-0 -r rm magento8pm-20191107-bk-for-dv.tar.gz rm magento8pm-20191123-bk.tar.gz rm magento8pm-20191230-before-md5-patch.tar.gz rm magento8pm-20200121-bk.tar.gz rm magento8pm-20200221-dv.tar.gz rm magento8pm-20200311-braintree-ok-20200121-recover-dv-fix-ok.tar.gz --- 20200403 AWS-DV 空間爆滿100% 第1次 ========================================================================================================================= aws-qt 3.134.105.225 qt.wg-1.com 0.)預裝系統 sudo apt-get update && sudo apt-get -y upgrade sudo apt-get -y install curl nano git sudo apt install unzip sudo apt-get install joe 1.)nginx sudo apt-get install nginx sudo systemctl start nginx(會報錯) 2.)PHP 7.2 sudo apt-get update -y sudo apt install software-properties-common sudo add-apt-repository -y ppa:ondrej/php sudo add-apt-repository -y ppa:ondrej/nginx sudo apt-get update -y 以下都要先安裝-> sudo apt-get install libcurl4-openssl-dev sudo apt-get install php-pear sudo apt-get -y install gcc make autoconf libc-dev pkg-config sudo apt-get -y install php7.2-dev sudo apt-get -y install libmcrypt-dev pecl channel-update pecl.php.net sudo pecl install mcrypt-1.0.1 檢查已安裝-> apt-cache pkgnames | grep php7.2 要修改->libcurl4->為libcurl4-openssl-dev x->sudo apt-get install -y php7.1 php7.1-fpm php7.1-mcrypt php7.1-curl php7.1-cli php7.1-mysql php7.1-gd php7.1-xsl php7.1-json php7.1-intl php-pear php7.1-dev php7.1-common php7.1-mbstring php7.1-zip php7.1-bcmath php7.1-fileinfo php7.1-soap php7.1-imagick libcurl4 curl -y x->sudo apt-get install -y php7.1 php7.1-fpm php7.1-mcrypt php7.1-curl php7.1-cli php7.1-mysql php7.1-gd php7.1-xsl php7.1-json php7.1-intl php-pear php7.1-dev php7.1-common php7.1-mbstring php7.1-zip php7.1-bcmath php7.1-fileinfo php7.1-soap php7.1-imagick libcurl4-openssl-dev curl -y x->sudo apt-get install -y php7.2 php7.2-fpm php7.2-mcrypt php7.2-curl php7.2-cli php7.2-mysql php7.2-gd php7.2-xsl php7.2-json php7.2-intl php-pear php7.2-dev php7.2-common php7.2-mbstring php7.2-zip php7.2-bcmath php7.2-fileinfo php7.2-soap php7.2-imagick libcurl4-openssl-dev curl -y sudo apt-get install -y php7.2 php7.2-fpm php7.2-curl php7.2-cli php7.2-mysql php7.2-gd php7.2-xsl php7.2-json php7.2-intl php-pear php7.2-dev php7.2-common php7.2-mbstring php7.2-zip php7.2-bcmath php7.2-fileinfo php7.2-soap php7.2-imagick libcurl4-openssl-dev curl -y 刪除如果有裝老版本-> sudo apt-get purge php7.0 php7.0-common sudo apt-get purge php7.1 php7.1-common 設環境參數-> sudo rm /usr/bin/php sudo cp /usr/bin/php7.2 /usr/bin/php php –v -> PHP 7.2.29-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Mar 20 2020 13:54:16) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.29-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies 改php.ini-> joe /etc/php/7.2/fpm/php.ini joe /etc/php/7.2/cli/php.ini -> memory_limit = 1024M max_execution_time = 1800 zlib.output_compression = On -> sudo systemctl restart php7.2-fpm 3.)mysql sudo apt-get install mysql-server-5.7 ->root + frevres88(20200406改revres88) mysql -u root -p mysql> CREATE DATABASE magento2 CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL ON magento2.* TO magento_user@localhost IDENTIFIED BY 'frevres88'; quit -> cd /etc/nginx/sites-available/ joe qt-wg-1 upstream fastcgi_backend { server unix:/run/php/php7.2-fpm.sock; } server { listen 80; server_name qt.wg-1.com; set $MAGE_ROOT /var/www/magento2; set $MAGE_MODE developer; include /var/www/magento2/nginx.conf.sample; error_log /var/log/nginx/error.log; } -> 測if OK->sudo nginx -t sudo ln -s /etc/nginx/sites-available/qt-wg-1 /etc/nginx/sites-enabled/ sudo systemctl restart nginx 4.)phpmyadmin 3.134.105.225/admin_7s9q2 sudo apt-get purge phpmyadmin sudo apt-get install phpmyadmin sudo ln -s /usr/share/phpmyadmin /var/www/html/admin_7s9q2 joe /etc/nginx/sites-available/default-> index index.html index.htm index.php index.nginx-debian.html; location /phpmyadmin { index index.php; } location ~ \.php$ { include snippets/fastcgi-php.conf; # # # With php7.0-cgi alone: # fastcgi_pass 127.0.0.1:9000; # # With php7.0-fpm: fastcgi_pass unix:/run/php/php7.2-fpm.sock; } --------------------------------------- 修正一直出現報錯bug: (20200409) Warning in ./libraries/sql.lib.php#601 count(): Parameter must be an array or an object that implements Countable -> sudo su joe /usr/share/phpmyadmin/libraries/sql.lib.php lines 601 -> || (count($analyzed_sql_results[‘select_expr’] == 1)->右括 ) 位置錯誤 -> || (count($analyzed_sql_results[‘select_expr’]) == 1 --------------------------------------- 5.)composer cd ~/ curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/bin/composer composer -v ->Composer version 1.10.1 2020-03-13 20:34:27 6.)Magento ver. 2.3.4 (aws-dv 2.1.9) cd /var/www/ 失敗->composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento2(但是keyin了username+password-key) cd /var/www/magento2/ wget 118.163.15.73/magento2.zip unzip magento2.zip composer install -v -> php bin/magento setup:install --backend-frontname="adminmag" \ --key="65b07bf534c102e5ee62f4d7ee8f4b88" \ --base-url="http://qt.wg-1.com" \ --base-url-secure="https://qt.wg-1.com" \ --db-host=localhost \ --db-name=magento2 \ --db-user=magento_user \ --db-password='frevres88' \(20200406改revres88) --admin-firstname=Lee \ --admin-lastname=David \ --admin-email=dv4ml@dacomputing.com \ --admin-user=adminmag \ --admin-password=frevres0907 \ --language=en_US \ --currency=USD \ --timezone=America/Chicago \ --use-rewrites=1 -> [SUCCESS]: Magento installation complete. [SUCCESS]: Magento Admin URI: /adminmag Nothing to import. find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; && chmod 777 var/ -R && find pub/media -type d -exec chmod 777 {} \; && find pub/static -type d -exec chmod 777 {} \; && chmod 777 app/etc && chmod 644 app/etc/*.xml && chmod u+x bin/magento chown -R www-data:www-data . systemctl restart nginx php bin/magento indexer:reindex php bin/magento cache:flush php bin/magento info:adminuri 改admin-url-> joe app/etc/env.php-> return [ 'backend' => [ 'frontName' => 'admin_lak7t5' 7.)建新權限USER adduser lee passwd aa223344 joe /etc/sudoers-> lee ALL=(ALL:ALL) ALL usermod -a -G www-data lee cd /var/www/magento2 find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \; find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} \; find . -type f -exec chmod 644 {} \; find . -type d -exec chmod 755 {} \; find ./var -type d -exec chmod 777 {} \; chmod 777 var/ -R \; find ./pub/media -type d -exec chmod 777 {} \; find ./pub/static -type d -exec chmod 777 {} \; chmod 777 ./app/etc chmod 644 ./app/etc/*.xml chown lee:lee . -hR chmod u+x bin/magento chmod -R g+rwxs . ls -la chown lee:lee /var/www joe /etc/php/7.2/fpm/pool.d/www.conf -> ;user = www-data ;group = www-data user = lee group = lee ;listen.owner = www-data ;listen.group = www-data listen.owner = lee listen.group = lee -> joe /etc/nginx/nginx.conf -> #user www-data; user lee; -> systemctl restart nginx systemctl restart php7.2-fpm 8.)更新magento2->su lee 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 失敗->9.)導入Demo Data-> wget https://codeload.github.com/magento/magento2-sample-data/zip/2.2.4 mv 2.2.4 2.2.4.zip unzip 2.2.4.zip mv magento2-sample-data-2.2.4 magento2-sample-data rm 2.2.4.zip php -f magento2-sample-data/dev/tools/build-sample-data.php -- --ce-source="/var/www/magento2" php bin/magento setup:upgrade -> SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'Magento_CatalogSampleData' for key 'PRIMARY', query was: INSERT INTO `setup_module` (`module`, `schema_version`) VALUES (?, ?) php bin/magento indexer:reindex php bin/magento cache:flush php bin/magento sampledata:deploy-> Authentication required (repo.magento.com): Username: 0c2e51e0297016e62e864f5effe625c7 (Public Key) Password: 38410b35ec042696d687ee7c90436d88 (Private Key) Do you want to store credentials for repo.magento.com in /var/www/magento2/var/composer_home/auth.json ? [Yn] ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Killed php bin/magento setup:upgrade chown -R www-data:www-data . php bin/magento indexer:reindex php bin/magento cache:flush x->chown -R www-data:www-data . x->chown -R lee:lee . php bin/magento indexer:reindex php bin/magento cache:flush chown -R www-data:www-data . systemctl restart nginx --- 20200402-03 AWS-QT 裝新 magento 2.3.4 ========================================================================================================================= 1.)Update field limitation rules from the database Directly in the customer_eav_attribute table, update rows with attribute_id=5 [firstname] and attribute_id=7 [last name] and replace 255 by 25. Change code validate_rules->a:2:{s:15:"max_text_length";i:255;s:15:"min_text_length";i:1;} //before update or by default To validate_rules->a:2:{s:15:"max_text_length";i:25;s:15:"min_text_length";i:1;} // after change ID:9223 Leupoldjrm xwusaymetmbexagGP ID:9224 Holographichwd zvusalmezniuxjsGP (20200324 PM 15:35)改 25->16 ID:9231(20200328刪1人) ID:9237(20200331刪1人) ID:9243(20200402刪1人) ID:9248(20200402刪1人)filma16@mail.ru ID:9254(20200411刪1人)larsen360@live.dk ID:9256(20200411刪1人)na.dy.a._o.k.o.leva@mail.ru ID:9259(20200415刪1人)na.dya_o.kole.v.a@mail.ru ID:9262(20200415刪1人)n.ad.y.a._o.kol.ev.a@mail.ru ID:9270(20200422刪1人)eleoChorb@parkll.xyz 2.)Add Google CAPTCHA https://www.mageplaza.com/blog/how-to-add-google-recaptcha-into-magento-2.html 在你的網站中加進 reCAPTCHA 「purewaterclubmag」已完成註冊。 在向使用者顯示的 HTML 程式碼中使用這串網站金鑰。 6LfIkeMUAAAAAI_FngvUCMAroZ7RizbD3Su6uoDs 用這串密鑰來建立網站和 reCAPTCHA 之間的通訊。 6LfIkeMUAAAAAE6LbLQ2aYQit3coOi3QO3pQSa0a 李生 14:36:28 要仔細研究看看要改哪些檔案 ADA 14:36:44 GMAIL purewaterclubmag@gmail.com ; AA2233zz!! --- 20200324 預防 bulk spam 註冊 ========================================================================================================================= 1.)www.purewaterclub.com + purewaterclub.com 拍向 aws-magento8pm 2.)改STORES->Configuration->Store View:pwc_ro->GENERAL-Web->Base URLs + Base URLs (Secure): http://www.purewaterclub.com/ 3.)cd /etc/apache2/sites-available cp purewaterclub.conf www-purewaterclub.conf(比照mag2.purewaterclub.com) joe www-purewaterclub.conf 4.)修改Mega Menu(不明原因又被改回default,所以再次修改) 共用目錄頁->blank:menu-top(不存在,不會出現) /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Megamenu/layout/default.xml menu-top b4u_home->7pm:menu-top-b4u /var/www/html/magento8pm/app/design/frontend/Venustheme/7pm/Ves_Megamenu/layout/default.xml menu-top-b4u pwc_ro->6pm:menu-top-pwc /var/www/html/magento8pm/app/design/frontend/Venustheme/6pm/Ves_Megamenu/layout/default.xml menu-top-pwc 4-1.)改menu-top-pwc->goto old site -> http://last.pureaterclub.com/ (拼錯字少"w") -> http://last.purewaterclub.com/ 5.)改TAX,GUEST 手工刪除黑客注冊垃圾帳號 舊RO->sale DELETE FROM address_book WHERE entry_street_address LIKE '%minsk%' AND entry_city LIKE '%minsk%' -> 10 record DELETE FROM address_book WHERE entry_country_id<>'223' AND entry_street_address LIKE '%?%' -> 1 record DELETE FROM address_book WHERE entry_country_id='110' -> 1 record (KE Kenya) DELETE FROM address_book WHERE entry_country_id='17' -> 2 record (BH Bahrain) UPDATE customers LEFT JOIN address_book ON customers.customers_default_address_id=address_book.address_book_id SET customers_email_memo='xxxxx' WHERE address_book_id IS NULL -> 14 record DELETE FROM customers WHERE customers_email_memo='xxxxx' -> 14 record ->http://last.purewaterclub.com/gen-customer-csv.php->q-20200319.csv import Customer -> ro-customer-20200319-last-ok -> Checked rows: 5, checked entities: 10, invalid rows: 0, total errors: 0 新pwc_ro後台 ID:9141,9142,9143,9144,9145,9151 ID:9152-9169(20200320刪18人) ID:9170-9177(20200321刪8人) ID:9178-9184(20200322刪7人) ID:9186-9189(20200323刪4人) ID:9191-9200(20200323刪10人) ID:9201-9207(20200324刪7人) ID:9209-9213(20200324刪5人) ID:9215-9222(20200324刪10人) cd /var/www/html/magento8pm /usr/bin/php bin/magento indexer:reindex /usr/bin/php bin/magento cache:flush ->9135 records found --- 20200319 AM 11:30 ML test OK + ADA backup OK + New RO Site ready + 轉最新客戶資料 ========================================================================================================================= 1.)建新Attribute spec_101:11種(尺寸x數量)珠光膜氣泡袋 spec_102:7種(尺寸x數量)牛皮紙氣泡袋 2.)建新Attribute Set b4_bag:加spec_101,spec_102 cd /var/www/html/magento8pm /usr/bin/php bin/magento indexer:reindex /usr/bin/php bin/magento cache:flush sudo php -f /var/www/html/magento8pm/bin/magento indexer:reindex --- 20200315 上新 item 2 x mailer ========================================================================================================================= 1.)改buck4u shipping ->STORES->Configuration->SALES->Shipping Methods->Flat Rate-> Enabled:Yes Type:Per Item Price:0.2 Handling Fee:3.3 Ship to Applicable Countries:Specific Countries Ship to Specific Countries:United States ->Free Shipping->Enabled:No ->Table Rates->Enabled:No 2.)設free_shipping 舊RO->1元及低價item->b4_free_shipping 舊RO->其他item->free_shipping 3.)設Cart Price Rules 3-1.)Marketing->Cart Price Rules->RO FREE SHIPPING Conditions->Apply the rule only if the following conditions are met (leave blank for all products). If ALL of these conditions are TRUE : If an item is FOUND in the cart with ALL of these conditions true: Free Shipping is Yes Actions-> Free Shipping:For matching items only Apply the rule only to cart items matching the following conditions (leave blank for all items). If ALL of these conditions are TRUE : 3-2.)Marketing->Cart Price Rules->B4 FREE SHIPPING $25 Conditions->Apply the rule only if the following conditions are met (leave blank for all products). If ALL of these conditions are TRUE : If total amount equals or greater than 25 for a subselection of items in cart matching ALL of these conditions: b4 Free Shipping is Yes Actions-> Free Shipping:For matching items only Apply the rule only to cart items matching the following conditions (leave blank for all items). If ALL of these conditions are TRUE : --- 20200314 改 buck4u shipping + cart price rules ========================================================================================================================= 0.)因為刷卡功能報錯,還原系統恢復功能 20200309 ADA 11:52:57 弄回去 0121版本, 前台可刷上但後台掛掉, 把後台重REINDEX, 後台好了, 前台只有 buck4u 可以, buck4all 和 mag2 都掛掉, 而且 buck4u 不能刷卡, 換來換去, 最後又弄回今天的版本 1.)還原mag2目錄改用magento8pm-20200121 rm -Rf magento8pm mv magento8pm-20200121 magento8pm ->Required parameter 'theme_dir' was not passed 添加新theme 6pm cd /var/www/html/magento8pm/app/design/frontend/Venustheme/ cp 8pm 6pm -r cd 6pm joe registration.php joe theme.xml cd /var/www/html/magento8pm/app/design/frontend/ chown -R www-data:www-data . chown www-data:www-data 7pm cd /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Themesettings/web/ cd /var/www/html/magento8pm/app/design/frontend/Venustheme/7pm/Ves_Themesettings/web/ cd /var/www/html/magento8pm/app/design/frontend/Venustheme/6pm/Ves_Themesettings/web/ chown www-data:www-data css ->前台可刷卡但後台掛掉, 把後台重REINDEX->我reindex 後台仍上不了 cd /var/www/html/magento8pm /usr/bin/php bin/magento indexer:reindex /usr/bin/php bin/magento cache:flush 2.)還原資料庫改用magento8pm-20200215-ok ->前後台都會直接跳到buck4all.com 先改conf為demo2,進後台後再改為b4u_home cd /etc/apache2/sites-available joe buck4u.conf -> joe buck4u-ssl.conf -> SetEnv MAGE_RUN_CODE "b4u_home" -> 原為 "demo2" service apache2 restart ->關閉wysiwyg editer STORES->Configuration->General->Content Management->WYSIWYG Options->Enable WYSIWYG Editor->Disabled Completely ->去掉產品頁Short Description,Share,加SKU STORES->Configuration->VES THEMESETTINGS->Product View Page->Other Elements ->去掉產品頁Paypal+Paypal credit icon STORES->Configuration->SALES->Payment Methods->PayPal Express Checkout->Configure->Basic Setting->Display on Product Details Page->No 3.)修改Store View的code,theme(Head,Header,Footer),Base URL,Default page b4u_home->b4u_home + 7pm(buck4u.com) + www.buck4u.com + buck4u.com pwc_ro->pwc_ro + 6pm(purewaterclub.com) + mag2.purewaterclub.com + purewaterclub.com 3-1.)修改Home Page b4u_home->Page:buck4u.com->Ves-Page:buck4u-home-page pwc_ro->Page:purewaterclub.com->Ves-Page:pwc-home-page 3-2.)修改Mega Menu 共用目錄頁->blank:menu-top(不存在,不會出現) /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Megamenu/layout/default.xml menu-top b4u_home->7pm:menu-top-b4u /var/www/html/magento8pm/app/design/frontend/Venustheme/7pm/Ves_Megamenu/layout/default.xml menu-top-b4u pwc_ro->6pm:menu-top-pwc /var/www/html/magento8pm/app/design/frontend/Venustheme/6pm/Ves_Megamenu/layout/default.xml menu-top-pwc 改goto old site -> http://last.pureaterclub.com/ 4.)重新建立圖片根位置連結 cd /var/www/html/magento8pm/pub/media/ mv catalog catalog-0 ln -s /var/www/html/pwpic/catalog/ /var/www/html/magento8pm/pub/media/ mv wysiwyg wysiwyg-0 ln -s /var/www/html/pwpic/wysiwyg/ /var/www/html/magento8pm/pub/media/ mv /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/web/images /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/web/images-0 mv /var/www/html/magento8pm/app/design/frontend/Venustheme/7pm/web/images /var/www/html/magento8pm/app/design/frontend/Venustheme/7pm/web/images-0 mv /var/www/html/magento8pm/app/design/frontend/Venustheme/6pm/web/images /var/www/html/magento8pm/app/design/frontend/Venustheme/6pm/web/images-0 ln -s /var/www/html/pwpic/themeimg/images/ /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/web/ ln -s /var/www/html/pwpic/themeimg/images/ /var/www/html/magento8pm/app/design/frontend/Venustheme/7pm/web/ ln -s /var/www/html/pwpic/themeimg/images/ /var/www/html/magento8pm/app/design/frontend/Venustheme/6pm/web/ 5.)修改自建目錄頁連結 改pwc-dir-47->Design http://www.buck4all.com/index.php/ro/replacement.html -> ro/replacement.html 改pwc-dir-50->Design 改pwc-dir-65->Design 改pwc-dir-68->Design http://www.buck4all.com/index.php/ro/combo-set.html -> combo-set.html 6.)重新導入Old RO 客戶資料 ->手工刪除Old RO 黑客注冊垃圾帳號 DELETE FROM address_book WHERE entry_country_id='50' -> 1 record (CK Cook Islands) DELETE FROM address_book WHERE entry_country_id='17' -> 2 record (BH Bahrain) DELETE FROM address_book WHERE entry_country_id='88' -> 1 record (GU Guam) DELETE FROM address_book WHERE entry_country_id='232' -> 1 record (VI Virgin Islands (U.S.) UPDATE customers LEFT JOIN address_book ON customers.customers_default_address_id=address_book.address_book_id SET customers_email_memo='xxxxx' WHERE address_book_id IS NULL -> 5 record DELETE FROM customers WHERE customers_email_memo='xxxxx' -> 5 record ->http://www.purewaterclub.com/gen-customer-csv.php Checked rows: 9126, checked entities: 18252, invalid rows: 0, total errors: 0 ->手工刪除mag2 客戶資料無用帳號 ID=2066->lake757@yahoo.com->VI ID=6462->mm@mm.com ID=6515->mmm@mm.com ID=7536->ugamnut56@hotmail.com->GU Customers 9129 records found 7.)清Catalog + Attribute Set + Product Attributes 刪Catalog A total of 71(disable)+19(qq%)+(Arcadio Gym Short-33-Red) have been deleted. 362 records found + (ADA-TEST-Metal aerator faucet adapter SP-aerator-M->ADA-TEST) ->更新產品出錯Required parameter 'theme_dir' was not passed 刪除theme Zou,6pm,7pm 重新添加新theme 6pm,7pm 刪除表theme中的x-Venustheme - 8pm,Zou/demo 刪Attribute Set Bag,Bottom,Downloadable,Gear,ro-qq-003,Sprite Stasis Ball,Sprite Yoga Strap,Top The attribute set has been removed.(8 record) 增加Product Attributes free_shipping,b4_free_shipping 修改Attribute Set:default 刪Product Attributes 舊的8pm + ro-qq activity,Category Gear,Climate,Collar,eco_collection,erin_recommends,features_bags,format,gender,pattern,performance_fabric,size, sleeve,strap_bags,style_bags,style_bottom,style_general ro_qq_003_size You deleted the product attribute. 53 records found ---------------------- ADA 20200311 AM 10:00 Backup All ----------------------- 8.)改目錄頁footer Manage Elements->pwc-footer cd /var/www/html/magento8pm/vendor/magento/module-theme/view/frontend/layout/ mv default.xml default.xml-0 wget http://www.purewaterclub.com/default.xml 9.)install extension disable compare cd /var/www/html/magento8pm/app/code/ mkdir Bss/DisableCompare cd Bss/DisableCompare wget http://www.purewaterclub.com/aws-ext-20200215.zip -> unzip aws-ext-20200215.zip cd /var/www/html/magento8pm /usr/bin/php bin/magento module:enable --clear-static-content Bss_DisableCompare -------- 以下禁作,疑似可能造成刷卡功能失敗 -------------------------------- To make sure that the enabled modules are properly registered, run 'setup:upgrade'. Cache cleared successfully. Generated classes cleared successfully. Please run the 'setup:di:compile' command to generate classes. Generated static view files cleared successfully /usr/bin/php bin/magento setup:upgrade /usr/bin/php bin/magento setup:di:compile --- 20200309-11 恢復刷卡功能->還原目錄 magento8pm-20200121 + 資料庫 magento8pm-20200215-ok + 重新補作所有修改 ========================================================================================================================= 改theme 8pm short description tilte為shipping cd /var/www/html/magento8pm/app/design/frontend/Venustheme/6pm/Magento_Catalog/templates/product/view joe product_info_main.phtml -> FREE SHIPPING ON ORDERS OVER $35 Shipping and handling Free shipping on orders over $35.00 when you buy ellielantern's other eligible items, and use the cart to make your purchase. $0.25 shipping for each additional eligible item you buy from ellielantern, when you use the cart to make your purchase. Shipping discount will be applied when you add qualifying items from ellielantern to your cart All promotional offers from ellielantern cd /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Themesettings/web/ cd /var/www/html/magento8pm/app/design/frontend/Venustheme/7pm/Ves_Themesettings/web/ cd /var/www/html/magento8pm/app/design/frontend/Venustheme/6pm/Ves_Themesettings/web/ chown www-data:www-data css The system has an issue when create css file Message: The path "design/frontend/Venustheme/7pm/Ves_Themesettings/web/css:///var/www/html/magento8pm/app/var/www/html/magento8pm/app/" is not writable The system has an issue when create css file Message: The path "design/frontend/Venustheme/7pm/Ves_Themesettings/web/css:///var/www/html/magento8pm/app/var/www/html/magento8pm/app/" is not writable The system has an issue when create css file Message: The path "design/frontend/Venustheme/6pm/Ves_Themesettings/web/css:///var/www/html/magento8pm/app/var/www/html/magento8pm/app/" is not writable tar -czf pwpic-20200223.tar.gz * -rw-r--r-- 1 root root 274210605 Feb 24 01:25 pwpic-20200223.tar.gz zip -r pwpic-20200223.zip ./ -rw-r--r-- 1 root root 285427566 Feb 24 01:29 pwpic-20200223.zip DELETE FROM address_book WHERE entry_street_address LIKE '%minsk%' AND entry_city LIKE '%minsk%' -> 2 record DELETE FROM address_book WHERE entry_lastname LIKE 'dhfh' -> 3 record DELETE FROM address_book WHERE entry_country_id='121' -> 1 record (LY Libyan) UPDATE customers LEFT JOIN address_book ON customers.customers_default_address_id=address_book.address_book_id SET customers_email_memo='xxxxx' WHERE address_book_id IS NULL -> 5 record DELETE FROM customers WHERE customers_email_memo='xxxxx' -> 5 record Checked rows: 9, checked entities: 18, invalid rows: 0, total errors: 0 Customers 9117 records found 去掉產品頁Paypal+Paypal credit icon STORES->Configuration->SALES->Payment Methods->PayPal Express Checkout->Configure->Basic Setting->Display on Product Details Page->No --- 20200224 打包下載所有圖片 + 建 mag2.purewaterclub.com 取代 www.buck4all.com + 補上傳新增9客戶資料 ========================================================================================================================= 添加新theme 6pm cd /var/www/html/magento8pm/app/design/frontend/Venustheme/ cp 8pm 6pm -r cd 6pm joe registration.php joe theme.xml 直接改不同的default.xml可改變Ves header使用MegaMenu的名稱 blank的menu一定要用,被設為default(menu-top),無法在目錄頁針對不同Theme對應不同menu 1.)blank(關閉menu給pwc+b4共用目錄頁Theme) /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Megamenu/layout/default.xml menu-top 2.)b4u /var/www/html/magento8pm/app/design/frontend/Venustheme/7pm/Ves_Megamenu/layout/default.xml menu-top-b4u 3.)pwc /var/www/html/magento8pm/app/design/frontend/Venustheme/6pm/Ves_Megamenu/layout/default.xml menu-top-pwc --- 20200223 增加新 theme 6pm ========================================================================================================================= 1.)合併所有圖片pwpic + /var/www/html/magento8pm/pub/media/ cd /var/www/html/pwpic/catalog/ mkdir category cd category cp -r /var/www/html/magento8pm/pub/media/catalog/category/* ./ mkdir product cd product cp -r /var/www/html/magento8pm/pub/media/catalog/product/* ./ 重新安排圖片位置 mv /var/www/html/pwpic/items /var/www/html/pwpic/webimg/items mv /var/www/html/pwpic/catalog/images/* /var/www/html/pwpic/import/* 圖片根位置: /var/www/html/pwpic/ -> /catalog/category/ (系統目錄圖片位置) -> ln -s /var/www/html/pwpic/catalog/ /var/www/html/magento8pm/pub/media/ /catalog/product/ (系統產品圖片位置) -> ln -s /var/www/html/pwpic/catalog/ /var/www/html/magento8pm/pub/media/ /wysiwyg/ (自建目錄頁圖片位置url media)-> ln -s /var/www/html/pwpic/wysiwyg/ /var/www/html/magento8pm/pub/media/ /themeimg/ (Theme使用logo-背景圖片位置)-> ln -s /var/www/html/pwpic/themeimg/images/ /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/web/ /import/ (後台import上傳產品csv圖片位置) /webimg/ (pwc產品說明頁img src圖片位置) 修改aws.wg-1.com 指向+對應 AWS /var/www/html/pwpic/webimg cd /etc/apache2/sites-available joe aws-wg-1.conf -> DocumentRoot /var/www/html/pwpic -> DocumentRoot /var/www/html/pwpic/webimg service apache2 restart 測試上傳產品csv圖片成功 sku,store_view_code,attribute_set_code,product_type,categories,product_websites,name,description,short_description,weight,product_online,tax_class_name,visibility,price,special_price,special_price_from_date,special_price_to_date,url_key,meta_title,meta_keywords,meta_description,base_image,base_image_label,small_image,small_image_label,thumbnail_image,thumbnail_image_label,swatch_image,swatch_image_label,created_at,updated_at,new_from_date,new_to_date,display_product_options_in,map_price,msrp_price,map_enabled,gift_message_available,custom_design,custom_design_from,custom_design_to,custom_layout_update,page_layout,product_options_container,msrp_display_actual_price_type,country_of_manufacture,additional_attributes,qty,out_of_stock_qty,use_config_min_qty,is_qty_decimal,allow_backorders,use_config_backorders,min_cart_qty,use_config_min_sale_qty,max_cart_qty,use_config_max_sale_qty,is_in_stock,notify_on_stock_below,use_config_notify_stock_qty,manage_stock,use_config_manage_stock,use_config_qty_increments,qty_increments,use_config_enable_qty_inc,enable_qty_increments,is_decimal_divided,website_id,related_skus,related_position,crosssell_skus,crosssell_position,upsell_skus,upsell_position,additional_images,additional_image_labels,hide_from_product_page,bundle_price_type,bundle_sku_type,bundle_price_view,bundle_weight_type,bundle_values,bundle_shipment_type,associated_skus ADA-TEST,,b4_bag,simple,"Default Category/PWC,Default Category/PWC/Parts & Tools,Default Category/PWC/Parts & Tools/Feeders,Default Category/PWC/Parts & Tools/Fittings",base,ADA-TEST,,,1,1,0,"Catalog, Search",0.1,,,,ada-test,,,,"/import/22-103.jpg",,"/import/22-08.jpg",,"/import/22-08.jpg",,"/import/22-08.jpg",,"2/3/20, 5:23 PM","2/18/20, 8:08 PM",,,Block after Info Column,,,,No,,,,,,,Use config,,"b4_free_shipping=Yes,featured=Yes,free_shipping=Yes,new=No",999,0,1,0,0,1,1,1,10000,1,1,1,1,1,1,1,1,1,0,0,0,,,,,,,,,,,,,,,, 2.)改原系統位置名稱 + 搬離至pwpic-0 mv /var/www/html/magento8pm/pub/media/catalog /var/www/html/magento8pm/pub/media/catalog-0 mv /var/www/html/magento8pm/pub/media/wysiwyg /var/www/html/magento8pm/pub/media/wysiwyg-0 cd /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/web/ mv images/ images-0 cd /var/www/html/magento8pm/app/design/frontend/Venustheme/7pm/web/ mv images/ images-0 mv /var/www/html/magento8pm/pub/media/catalog-0 /var/www/html/pwpic-0/ mv /var/www/html/magento8pm/pub/media/wysiwyg-0 /var/www/html/pwpic-0/ 3.)建catalog,wysiwyg連結 ln -s /var/www/html/pwpic/catalog/ /var/www/html/magento8pm/pub/media/(產品圖片) ln -s /var/www/html/pwpic/wysiwyg/ /var/www/html/magento8pm/pub/media/(系統使用圖片路徑 url media) ln -s /var/www/html/pwpic/themeimg/images/ /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/web/(Theme使用logo-背景圖片位置) ln -s /var/www/html/pwpic/themeimg/images/ /var/www/html/magento8pm/app/design/frontend/Venustheme/7pm/web/(Theme使用logo-背景圖片位置) --- 20200222-23 整理aws所有圖片 + 新位置連結 -> /var/www/html/pwpic/ ========================================================================================================================= 1.) shipping: 現在新RO站(包括將來的1元店)的shipping有3種 a.) 原本舊RO站的free-shipping->只要是同一order有買正常單價的item,就可以整單都free b.) 新增1元站(b4_free_shippint)->只要買了1元店站b4_free_shipping的item加起來滿$25(金額可隨時修改),就整單都free c.) 如果以上2個條件都沒有,就收$5(金額可隨時修改,也可以改成按zone,重量計算) 2.) ebay: 因為QT2進了很多包裝材料,所以請先從包裝材料開始上架ebay和1元站的銷售 a.) 請把ebay的cutiepetinc帳號改成 buck4u*com b.) 請先參考以下1元站我已經上架的poly bubble mailers(珠光膜氣泡信封), http://www.buck4all.com/index.php/poly-bubble-mailer.html 其中表上的Qty/Set是我用成本價小於等於US$0.3(人民幣2元)倒算出來的1元的數量,是按之前計劃好的(產品成本30%,locat運費30%,利潤30%,其他10%計算), 實際應該出的數量,要請你仔細估算成本運費後,再通知我要如何修正,另外你也可以不用賣1元的方式,直接上架ebay,請你自己決定,以下是ebay的熱門seller和ULINE的參考 https://www.uline.com/BL_1255/Uline-Bubble-Lined-Poly-Mailers https://www.ebay.com/itm/100-50-Poly-Mailer-Bubble-Mailers-Padded-Envelopes-6x9-8-5x11-9x12-5x7-3x5-4x6/272820340492 (這一家在wulnat,可以好好參考一下) https://www.ebay.com/itm/50-000-4x8-Poly-Bubble-Padded-Envelopes-Mailer/321898703486 https://www.ebay.com/itm/Wholesale-10Pcs-Poly-Bubble-Mailers-Padded-Envelopes-Shipping-Bags-Self-Seal/232374230866 https://www.ebay.com/itm/25-0-Glamour-Metallic-Pink-Poly-Bubble-Mailers-Envelopes-Bags-6x10-DVD-Wide-CD/292602069600?epid=5020360655 c.) 請先在試一下在ebay用cutiepetinc和purewaterclub*com帳號分別上架poly bubble mailers(珠光膜氣泡信封), 附件有name(101.c.txt) + 說明(101.c.html) + 產品主圖組 (101.c.jpg.zip) + 原始圖片(101-0.jpg.zip) + 標示文字圖片(101.jpg.zip) + photoshop工作檔案(101.c.psd)請SC教你如何操作 d.) 101.c->代表(101.01-101.11)的configute product (讓客人用來挑選不同尺寸規格的虛擬產品,將來1元站會大量使用), 客人挑選後下單的是(101.01x16~101.11x3)共11種產品組合中的一種 --- 20200221 交接 poly bubble mailer to ebay ========================================================================================================================= 修改Store View buck4u.com home page->b4u_home cd /etc/apache2/sites-available joe buck4u.conf -> joe buck4u-ssl.conf -> SetEnv MAGE_RUN_CODE "b4u_home" -> 原為 "demo2" service apache2 restart find . -name "101.c*" 目錄圖片的位置 /var/www/html/magento8pm/pub/media/catalog/category/100-GDP.png (20200222)改連結到/var/www/html/pwpic/catalog/category/100-GDP.png 產品圖片的位置 /var/www/html/magento8pm/pub/media/catalog/product/1/0/101.c-5.jpg (20200222)改連結到/var/www/html/pwpic/catalog/product/1/0/101.c-5.jpg /1/0/->取圖片名的前2字母 /cache/->分5子目錄->image,small_image,swatch_image,swatch_thumb,thumbnail->其下再分不同尺寸圖片目錄,為cache的圖片最後位置 導入產品圖片的位置 /var/www/html/pwpic/ /catalog/images/->產品主圖 /items/->產品說明插圖片 /wysiwyg/pwc/->子目錄連結用圖片->ln -s /var/www/html/pwpic/wysiwyg/pwc/ /var/www/html/magento8pm/pub/media/wysiwyg/(系統使用圖片路徑) (20200222)刪除pwc連結,改直接連結上一層到/var/www/html/pwpic/wysiwyg /pwpic/->link to /var/www/html/pwpic/(為了導入產品時填Images File Directory用?) (20200222)刪除pwpic連結 成功->(20200222)改連結到/var/www/html/pwpic/ 放棄->改產品圖片的位置->b4pic: cd /var/www/html/b4pic/ mkdir catalog/product cd catalog/product cp -r /var/www/html/magento8pm/pub/media/catalog/product/* ./ apt-get install zip apt-get install unzip zip -r b4pic.zip ./ http://aws.wg-1.com/ -> 指向 /var/www/html/pwpic/ cd /var/www/html/pwpic/ mv /var/www/html/b4pic/catalog/product/b4pic.zip ./ zip -r pwpic.zip ./(x->無限遁環立即占滿所有空間) --- 20200220 修改 buck4u.com home page + 整理圖片位置 + 下載備份圖片 ========================================================================================================================= 1.)RO free_shipping->如果單內有一件free_shipping item->整單free shipping 2.)B4 free_shipping $25+ ->如果單內所有b4_free_shipping合計金額大於等於$25->整單free shipping 3.)Configued product在Cart Price Rules判斷中會以Configure product的attribute為主,而不是以各別的simple product 改PWC->dollar sale->b4_free_shipping $1->SP-CRT,SP-6044Q,SP-Y,SP-7044Q,SP-7042Q,SP-6044Q,SP-0404Q,SP-4041Q,SP-1044,SP-C clip,SP-aerator-M,SP-aerator-p $1+->SP-132Q,SP-Q34A,SP-FV --- 20200218-20 buck4u free shipping ========================================================================================================================= 刪Catalog A total of 72(disable)+19(qq%) have been deleted. 362 records found + ADA-TEST-Metal aerator faucet adapter SP-aerator-M 刪Attribute Set Bag,Bottom,Downloadable,Gear,ro-qq-003,Sprite Stasis Ball,Sprite Yoga Strap,Top The attribute set has been removed.(8 record) 修改Attribute Set:default 增加Product Attributes free_shipping,b4_free_shipping 刪Product Attributes 舊的8pm() + ro-qq activity,Category Gear,Climate,Collar,eco_collection,erin_recommends,features_bags,format,gender,pattern,performance_fabric,size, sleeve,strap_bags,style_bags,style_bottom,style_general ro_qq_003_size You deleted the product attribute. 53 records found 140e8587c46ea4afc679cb70bae56341:70:0->aa223344-osc-v.1 $P$DNVAIbn8kZQQop6d3QAg2lFVkSG2o2/:P$DNVAIbn8kZQQop6d3QAg2lFVkSG2o2/:0->aa223344-osc-v.2 關閉wysiwyg editer STORES->Configuration->General->Content Management->WYSIWYG Options->Enable WYSIWYG Editor->Disabled Completely --- 20200216 清Catalog + Attribute Set + Product Attributes + 關閉wysiwyg editer ========================================================================================================================= extension disable compare Access Keys Public Key: 0c2e51e0297016e62e864f5effe625c7 Private Key: 38410b35ec042696d687ee7c90436d88 Click install extension Once you redirected to Keys page copy private and public access key Login to your store admin panel Go to System > Configurations Add your public and private key Save & refresh your page Web Setup Wizard->404 registration.php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, 'Bss_DisableCompare', __DIR__ aws: cd /var/www/html/magento8pm/app/code/ mkdir Bss/DisableCompare cd Bss/DisableCompare wget http://www.purewaterclub.com/aws-ext-20200215.zip -> unzip aws-ext-20200215.zip cd /var/www/html/magento8pm /usr/bin/php bin/magento module:status --> List of enabled modules: Magento_Store Magento_AdvancedPricingImportExport Magento_Directory Magento_Theme Magento_Backend Magento_Backup Magento_Eav Magento_Customer Magento_BundleImportExport Magento_CacheInvalidate Magento_AdminNotification Magento_Indexer Magento_CatalogImportExport Magento_Cms Magento_Rule Magento_Catalog Magento_Search Magento_CatalogUrlRewrite Magento_Widget Magento_Quote Magento_CheckoutAgreements Magento_SalesSequence Magento_CmsUrlRewrite Magento_Config Magento_ConfigurableImportExport Magento_Msrp Magento_Contact Magento_Cookie Magento_Cron Magento_CurrencySymbol Magento_Bundle Magento_CustomerImportExport Magento_Deploy Magento_Developer Magento_Dhl Magento_Authorization Magento_Downloadable Magento_ImportExport Magento_Payment Magento_Email Magento_User Magento_Fedex Magento_Sales Magento_CatalogInventory Magento_GoogleAnalytics Magento_Ui Magento_GroupedImportExport Magento_GroupedProduct Magento_DownloadableImportExport Magento_Checkout Magento_Security Magento_LayeredNavigation Magento_Marketplace Magento_MediaStorage Magento_CatalogRule Magento_Multishipping Magento_ConfigurableProduct Magento_Newsletter Magento_OfflinePayments Magento_SalesRule Magento_PageCache Magento_Captcha Magento_Vault Magento_Persistent Magento_ProductAlert Magento_ProductVideo Magento_Authorizenet Magento_Reports Magento_RequireJs Magento_Review Magento_Rss Magento_CatalogRuleConfigurable Magento_Paypal Magento_SalesInventory Magento_OfflineShipping Magento_GoogleAdwords Magento_SampleData Magento_CatalogSearch Magento_Integration Magento_SendFriend Magento_Shipping Magento_Sitemap Magento_NewRelicReporting Magento_Swagger Magento_Swatches Magento_SwatchesLayeredNavigation Magento_Tax Magento_TaxImportExport Magento_GiftMessage Magento_Translation Magento_GoogleOptimizer Magento_Ups Magento_UrlRewrite Magento_EncryptionKey Magento_Usps Magento_Variable Magento_Braintree Magento_Version Magento_Webapi Magento_WebapiSecurity Magento_Weee Magento_CatalogWidget Magento_Wishlist Ves_All Ves_BaseWidget Ves_Blog Ves_Brand Ves_Megamenu Ves_PageBuilder Ves_Productlist Ves_Setup Ves_Testimonial Ves_Themesettings List of disabled modules: Bss_DisableCompare /usr/bin/php bin/magento module:enable --clear-static-content Bss_DisableCompare /usr/bin/php bin/magento setup:upgrade /usr/bin/php bin/magento setup:di:compile /usr/bin/php bin/magento setup:upgrade->出現error [Exception] Notice: Use of undefined constant MCRYPT_RIJNDAEL_256 - assumed 'MCRYPT_RIJ NDAEL_256' in /var/www/html/magento8pm/vendor/magento/framework/Encryption/ Encryptor.php on line 454 x->裝mcrypt->沒用(而且mcrypt版本錯誤導致舊RO-account login失敗) sudo apt-get install mcrypt php7.0-mcrypt sudo service apache2 restart --------------- 重新安裝mcrypt新版本+改用舊SQL-magento8pm-20200210才解決舊RO-account login成功 sudo apt-get install mcrypt php7.1-mcrypt sudo service apache2 restart --------------- 加直接改Encryptor.php->return null;->不會出現報錯 joe /var/www/html/magento8pm/vendor/magento/framework/Encryption/Encryptor.php protected function getCrypt($key = null, $cipherVersion = null, $initVector = true) { return null; /* return new Crypt($key, $cipher, $mode, $initVector); */ } ----------------- 後台設disable compare STORES->Configuration->BSS COMMERCE->Disable Compare Configuration->YES cd /var/www/html/magento8pm /usr/bin/php bin/magento indexer:reindex ----------------- 禁用Ves_Brand /usr/bin/php bin/magento module:disable --clear-static-content Ves_Brand The following modules have been disabled: - Ves_Brand Cache cleared successfully. Generated classes cleared successfully. Please run the 'setup:di:compile' command to generate classes. Generated static view files cleared successfully. ----------------- 496ccbf39792a0aa94cbec4840bee1c526c1c53cbb18445df8692135624fc9cf:ABN45WVliJG7OXcRboPpHhH01usqfRdd:1 df7cde40bc6922f8a885a21ebe8fd4b0:70:0->??+alberto.jany@woodgroup.com 140e8587c46ea4afc679cb70bae56341:70:0->aa223344-osc-v.1 $P$DNVAIbn8kZQQop6d3QAg2lFVkSG2o2/:P$DNVAIbn8kZQQop6d3QAg2lFVkSG2o2/:0->aa223344-osc-v.2 08ed410c41d46dff63fc73c41aa8df1c3025e0397ece2ae59ebcaaed191c0ae3:kJ17CNzHgKZsKbbmWakPvzEFzFCaWCzw:1->?? --- 20200215 安裝插件 Extension DisableCompare + 禁用Ves_Brand ========================================================================================================================= 改8pm media url->pwpic: cd /var/www/html/pwpic/ mkdir wysiwyg/pwc cd wysiwyg/pwc cp /var/www/html/magento8pm/pub/media/wysiwyg/pwc/*.jpg ./ ln -s /var/www/html/pwpic/wysiwyg/pwc/ /var/www/html/magento8pm/pub/media/wysiwyg/ pwpic圖片目錄: aws: cd /var/www/html/pwpic/ ls -l drwxr-xr-x 3 root root 4096 Dec 4 13:00 catalog -> /images/ -> 放RO站主圖 drwxr-xr-x 5 root root 4096 Dec 4 13:00 items -> /Driver /PW-Pic /Pic -> 放RO站產品說明連結圖 lrwxrwxrwx 1 root root 19 Jan 30 10:12 pwpic -> /var/www/html/pwpic -> import product csv,填 Images File Directory -> pwpic link指向/var/www/html/pwpic drwxr-xr-x 4 root root 4096 Dec 13 04:23 simplehtmldom -> 分析html結構的PHP Lib drwxr-xr-x 3 root root 4096 Feb 14 04:37 wysiwyg -> /wysiwyg/pwc/ -> 8pm media url -> 子目錄圖片 aws: cd /var/www/html/pwpic/catalog/images/ wget http://www.purewaterclub.com/aws-20200127.zip -> unzip aws-20200127.zip attribute_set_code configurable_variations sku=RO-QQ-003-2cmx100M-Black,ro_qq_003_size=2cmx100M,color=Black| sku=RO-QQ-003-2cmx100M-Blue,ro_qq_003_size=2cmx100M,color=Blue| sku=RO-QQ-003-2cmx100M-Brown,ro_qq_003_size=2cmx100M,color=Brown| sku=RO-QQ-003-2.5cmx100M-Black,ro_qq_003_size=2.5cmx100M,color=Black| sku=RO-QQ-003-2.5cmx100M-Blue,ro_qq_003_size=2.5cmx100M,color=Blue| sku=RO-QQ-003-2.5cmx100M-Brown,ro_qq_003_size=2.5cmx100M,color=Brown| sku=RO-QQ-003-3cmx200M-Black,ro_qq_003_size=3cmx200M,color=Black| sku=RO-QQ-003-3cmx200M-Blue,ro_qq_003_size=3cmx200M,color=Blue| sku=RO-QQ-003-3cmx200M-Brown,ro_qq_003_size=3cmx200M,color=Brown |sku=RO-QQ-003-Brown,ro_qq_003_size=3cmx2000M,color=Brown 新增attribute要加manage tile才會出現在configure product的Select Attributes BUG->新增attribute-option-text swatch(dropdown只能改一次,就改不回去)-要重新copy-paste-否則default空白不會出現 VENUSTHEME->General,Header點進去空白已不可考,除非選pws-xxx page-OK --- 20200214-15 configure product ========================================================================================================================= ADMIN dv4mlmag ; $ML5477ml dv4ml@dacomputing.com 改目錄背景圖:bg_brc.jpg cd /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/web/images/ mv bg_brc.jpg bg_brc-8pm.jpg wget http://www.purewaterclub.com/bg_brc.jpg Everything's $1. What will you find? Sign In or Create an Account Track Orders 0 Home Shop By Business Shop By Business Florists & Gift Shops Weddings, Catering & Events Restaurants, Bars & Hospitality Care Facilities Religious & Nonprofit Organizations Cleaning Services --- 20200212 mag2 開帳號給ML + 改目錄背景圖 ========================================================================================================================= 手工刪除黑客注冊垃圾帳號 DELETE FROM address_book WHERE entry_street_address LIKE '%minsk%' AND entry_city LIKE '%minsk%' -> 29 record DELETE FROM address_book WHERE entry_country_id<>'223' AND entry_street_address LIKE '%?%' -> 1 record DELETE FROM address_book WHERE entry_country_id='147' -> 2 record (NA Navibia) DELETE FROM address_book WHERE entry_country_id='17' -> 4 record (BH Bahrain) DELETE FROM address_book WHERE entry_country_id='1' -> 141 record (AF Afghanistan) DELETE FROM address_book WHERE entry_country_id='14' -> 1 record (AT Austria) DELETE FROM address_book WHERE entry_country_id='193' -> 3 record (ZA South Africa) DELETE FROM address_book WHERE entry_country_id='229' -> 2 record (VE Venezuela) DELETE FROM address_book WHERE entry_country_id='220' -> 3 record (UA Ukiain) DELETE FROM address_book WHERE entry_country_id='184' -> 3 record (SA Saudi Arabia) DELETE FROM address_book WHERE entry_country_id='166' -> 1 record (PY Paraguay) DELETE FROM address_book WHERE entry_country_id='168' -> 4 record (PH Philippines) DELETE FROM address_book WHERE entry_country_id='167' -> 7 record (PE Peru) DELETE FROM address_book WHERE entry_country_id='44' -> 1 record (CN China) DELETE FROM address_book WHERE entry_country_id='21' -> 1 record (BE Belgium) DELETE FROM address_book WHERE entry_country_id='24' -> 1 record (BM Bermuda) DELETE FROM address_book WHERE entry_country_id='32' -> 1 record (BN Brunei Darussalam) DELETE FROM address_book WHERE entry_country_id='83' -> 1 record (GI Gibraltar) DELETE FROM address_book WHERE entry_country_id='84' -> 7 record (GR Greece) DELETE FROM address_book WHERE entry_country_id='96' -> 3 record (HK Hong Kong) DELETE FROM address_book WHERE entry_country_id='53' -> 3 record (HR Croatia) DELETE FROM address_book WHERE entry_country_id='97' -> 5 record (HU Hungary) DELETE FROM address_book WHERE entry_country_id='100' -> 2 record (ID Indonesia) DELETE FROM address_book WHERE entry_country_id='103' -> 3 record (IE Ireland) DELETE FROM address_book WHERE entry_country_id='104' -> 9 record (IL Israel) DELETE FROM address_book WHERE entry_country_id='99' -> 10 record (IN India) DELETE FROM address_book WHERE entry_country_id='101' -> 2 record (IR Iran) DELETE FROM address_book WHERE entry_country_id='105' -> 5 record (IT Italy) DELETE FROM address_book WHERE entry_country_id='113' -> 1 record (KR Korea) DELETE FROM address_book WHERE entry_country_id='114' -> 1 record (KW kuwait) DELETE FROM address_book WHERE entry_country_id='118' -> 1 record (LB Lebanon) DELETE FROM address_book WHERE entry_country_id='126' -> 1 record (MK Macedonia) DELETE FROM address_book WHERE entry_country_id='132' -> 1 record (MT Malta) DELETE FROM address_book WHERE entry_country_id='136' -> 1 record (MU Mauritius) DELETE FROM address_book WHERE entry_country_id='130' -> 1 record (MV Maldives) DELETE FROM address_book WHERE entry_country_id='129' -> 6 record (MY Malaysia) DELETE FROM address_book WHERE entry_country_id='150' -> 1 record (NL Netherlands) DELETE FROM address_book WHERE entry_country_id='55' -> 2 record (CY Cyprus) DELETE FROM address_book WHERE entry_country_id='60' -> 1 record (DO Dominica) DELETE FROM address_book WHERE entry_country_id='195' -> 2 record (ES Spain) DELETE FROM address_book WHERE entry_country_id='203' -> 4 record (SE Sweden) DELETE FROM address_book WHERE entry_country_id='188' -> 9 record (SG Singapore) DELETE FROM address_book WHERE entry_country_id='209' -> 2 record (TH Thailand) DELETE FROM address_book WHERE entry_country_id='215' -> 2 record (TR Turkey) DELETE FROM address_book WHERE customers_id=9100 -> 1 record ->亂填 Last->手工刪除表:customers->無地址address_book UPDATE customers LEFT JOIN address_book ON customers.customers_default_address_id=address_book.address_book_id SET customers_email_memo='xxxxx' WHERE address_book_id IS NULL -> 129 record DELETE FROM customers WHERE customers_email_memo='xxxxx' -> 129 record _address_fax -> 1-2 -> {fax} -> 放舊RO站"付款" - "未付款"次數 Checked rows: 9108, checked entities: 18216, invalid rows: 0, total errors: 0 COPY SQL magento8pm -> magento8pm20200210: ERROR ALTER TABLE `catalog_eav_attribute` ADD CONSTRAINT `CATALOG_EAV_ATTRIBUTE_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE; cd /var/www/html/magento8pm /usr/bin/php bin/magento indexer:reindex Design Config Grid index has been rebuilt successfully in 00:00:01 Customer Grid index has been rebuilt successfully in 00:00:09 Category Products index has been rebuilt successfully in 00:00:02 Product Categories index has been rebuilt successfully in 00:00:00 Product Price index has been rebuilt successfully in 00:00:01 Product EAV index has been rebuilt successfully in 00:00:00 Stock index has been rebuilt successfully in 00:00:01 Catalog Rule Product index has been rebuilt successfully in 00:00:00 Catalog Product Rule index has been rebuilt successfully in 00:00:00 Catalog Search index has been rebuilt successfully in 00:00:11 ->9110 records found last->customers_id9958(Joshua-Peterson)+address_book_id=12859 --- 20200211 old-RO customer 資料 -> mag2 ========================================================================================================================= 1.)請你先檢查一下新的RO站的所有細節, 目前只剩老客人的資料還沒有轉過去, 其他都轉好了, 看看還有有什麼問題或建議, 尤其是手機請多試一下 http://www.buck4all.com/ 2.) 附件的excel表有QT2的裝箱明細和產品編號表, QT2到貨後,因為這一批貨有1千多款,而且都是新貨又非常複雜,所以請一定要按表上的明細拆箱,一一對照後把貨先歸好,不然萬一混在一起後,將來很難分辨 3.) QT2的貨目前發現有以下4個失誤,請你幫忙修改 3-a.)第116箱的地毯膠帶(209.01-209.10)漏了秤單品重量,請幫忙秤 3-b.)第134箱的10,000個(100小包)10絲白邊PE自封袋3cm*4cm編號錯記為107.02,請修改為正確107.20 3-c.)第134箱的500個(5小包) 10絲白邊PE自封袋13cm*18cm編號錯記為107.10,請修改為正確107.19 3-d.)第129箱的5個(1小袋) RJ45接頭-母轉2母編號錯記為322.06,請合併到同一箱的另一小袋相同款式的322.05 4.) QT2和將來一元站的貨號規則如下: 1.) BSKU - Basic SKU: 單品最小實際庫存, 依不同尺寸, 顏色, 款式編不同貨號 編碼規則為 aaa.bb -> aaa為分類編號, bb為分類下的產品號 Ex1: 101為珠光膜氣泡信封, 101.01為11cm*11cm+4cm, 101.09為20cm*25cm+4cm Ex2: 212為美紋紙手撕膠帶, 202.01為6mm*12m-黑色, 212.30為12mm*12m-淺藍色 1-a.) 數量直接可數的->例如: 1個, 1條, 1捲, 1片 1-b.) 需要裁剪長度的->例如: 大捲的魔術貼1米, 大捲熱縮管1米, 大捲反光織帶1米 1-c.) 低單價需要配對使用的合併編號->例如: , 迷你鰐魚夾測試線5色套, 汽車電源端子公母1對, 小鱷魚夾正負1對, 雙絞線傳輸器左右1對, POE分離器左右1對, 香蕉頭插座黑紅1對 1-d.) 高單價需要配對使用的分開編號->例如: 大鱷魚夾正極黑色, 大鱷魚夾負極紅色, 香蕉頭純銅鍍金直針型黑色, 香蕉頭純銅鍍金直針型紅色 1-e.) 超低單價不容易數的預包裝好的整包編號->例如: 金屬紮絲400pcs, 紙紮絲100pcs, 蝴蝶結紮絲20pcs, 尼龍紮帶*100pcs, 背膠圓點魔術貼15mm*30對 1-f.) 客戶不可挑選顏色的編相同貨號->例如: 彩色帶透明蓋彈簧U型剪刀, 彩色長柄洗杯刷, 彩色轉換插座, 彩色RJ45直通接頭, 彩色殼鍍金頭音頻線 2.) SKU - Stock Keeping Unit: 實際銷售單位, 由同一種BSKU數量一個以上或數個BSKU組成 編碼規則為 BSKU + qqq -> aaa.bb + qqq-> aaa.bb 為BSKU+ qqq為數量或附加碼 2-a.) 數量為100個的倍數直接加h,200個加h2->例如: 100個自粘OPP袋為105.01h, 200個水晶頭為321.02h2 2-b.) 數量為不是100個整數先加(x) 再加數量->例如: 10個珠光膜氣泡信封為101.07x10, 25個白快遞袋為104.01x25 2-c.) 不同bsku組成挑主要產品的bsku先加附加碼(s) 再加不重覆流水號(1~99)->例如: 100個水晶頭配100個護套321.01s1 2-d.) 數量為1000個的倍數直接加k,2000個加k2->例如: 目前沒有 --- 20200210 QT2 packing detail + BSKU + SKU 規則 ========================================================================================================================= 增加新Store View 1.)STORES->All Stores->Create Store View->pwc:pwc_buck4aqua 2.)STORES->Configuration->選Store View(pwc:pwc_buck4aqua)->GENERAL:Web->Base URLs + Secure Base URL + CMS Home Page 3.)DNS A buck4aqua.buck4all.com -> 18.218.158.219 4.)cd /etc/apache2/sites-available cp buck4u.conf pwc_buck4aqua.conf -> joe pwc_buck4aqua.conf -> ServerName buck4aqua.buck4all.com SetEnv MAGE_RUN_CODE "pwc_buck4aqua" SetEnv MAGE_RUN_TYPE "store" cd /etc/apache2/sites-available ln -s /etc/apache2/sites-available/pwc_buck4aqua.conf /etc/apache2/sites-enabled/pwc_buck4aqua.conf service apache2 restart (20200209)修改 joe buck4all.conf SetEnv MAGE_RUN_CODE "demo3" -> SetEnv MAGE_RUN_CODE "pwc_ro" --- 20200209 增加 Store View + New Arrival + Feature Product + Our Service ========================================================================================================================= Manage Elements->pwc-footer /var/www/html/magento8pm/vendor/magento/module-theme/view/frontend/layout/default.xml wget http://www.purewaterclub.com/default.xml Shipping and Returns pwc-shipping-returns Privacy Notice pwc-privacy-notice RO FAQ pwc-faq My Account customer/account Membrane Rejection Chart membrane-rejection-chart Contact Us pwc-contact-us /var/www/html/magento8pm/vendor/magento/module-newsletter/view/frontend/layout/default.xml /var/www/html/magento8pm/vendor/magento/module-cms/view/frontend/layout/default.xml /var/www/html/magento8pm/vendor/magento/module-search/view/frontend/layout/default.xml /var/www/html/magento8pm/vendor/magento/module-contact/view/frontend/layout/default.xml /var/www/html/magento8pm/vendor/magento/module-sales/view/frontend/layout/default.xml /var/www/html/magento8pm/vendor/magento/module-catalog-search/view/frontend/layout/default.xml Contact表: /var/www/html/magento8pm/vendor/magento/module-contact/view/frontend/layout/contact_index_index.xml /var/www/html/magento8pm/vendor/magento/module-contact/view/frontend/templates/form.phtml --- 20200206-08 Footer + Link + Contact ========================================================================================================================= 設定全站Theme: CONTENT->Design Configuration->選Store Views(pwc English)->Edit->Default Theme->Applied Theme->Magento Blank(x-全站用Blank) (20200208 改用Venustheme - 8pm,因為contact,my account,cart的form 字白色看不到 label:color #000) CONTENT->Design Configuration->選Store Views(pwc English)->Edit->Default Theme->Applied Theme->Venustheme - 8pm(全站用8pm) ->設定首頁Logo: Other Settings->Header->Logo Image Logo Image Width->495 ->設定首頁Footer: Other Settings->Footer->Copyright Copyright (C) 2020 all rights reserved. 加另外改manage element->PWC Footer->Design Elemment 設定首頁Page: 1.)STORES->Configuration->Store Views:選(pwc English)->Web->Default Pages->CMS Home Page->purewaterclub.com 2.)CONTENS->Pages->purewaterclub.com->Content->Widget Type->Ves Page Builder : Generate a page builder profile->Page Id->purewaterclub.com ->改首頁Theme: Custom Design Update->New Theme->Venustheme - 8pm(x-只有首頁用8pm) (20200208 不用改了) 首頁Page加子目錄圖片: VENUSTHEME->Manage Page Profile->挑選page(purewaterclub.com)->Desgin Block->加(pwc-dir-47) 目錄頁設定: PRODUCTS->Categories->Default Category->Design->Theme->Magento Blank(blank手機版可維持2排產品) PRODUCTS->Catagories->挑選目錄(Filtration System)->Content->Add CMS Block->Block(dir_50) CONTENS->Blocks->挑選Block(dir_50)->Widget Type->Ves Page Builder: Generate Element Profile->Element Id->(pwc-dir-50) VENUSTHEME->Manage Element->挑選element(pwc-dir-50)->Design->widget->6 x (single image + heading tag) 子目錄圖片+連結: VENUSTHEME->Manage Element->挑選element(pwc-dir-47)->Design widget->加4 x (single image + heading tag) 1.)Filtration System Image File->wysiwyg/pwc/dir_50.jpg Link->http://www.buck4all.com/index.php/ro/filtration-system.html 2.)Replacement wysiwyg/pwc/dir_65.jpg http://www.buck4all.com/index.php/ro/replacement.html 3.)Parts & Tools wysiwyg/pwc/dir_68.jpg http://www.buck4all.com/index.php/ro/parts-tool.html 4.)Buck4RO wysiwyg/pwc/b4ro.jpg http://www.buck4u.com 1.)Revese Osmosis wysiwyg/pwc/dir_51.jpg http://www.buck4all.com/index.php/ro/filtration-system/revese-osmosis.html 2.)Portable RO wysiwyg/pwc/dir_55.jpg http://www.buck4all.com/index.php/ro/filtration-system/portable-ro.html 3.)Whole House wysiwyg/pwc/dir_59.jpg http://www.buck4all.com/index.php/ro/filtration-system/whole-house.html 4.)Drinking Water wysiwyg/pwc/dir_62.jpg http://www.buck4all.com/index.php/ro/filtration-system/drinking-water.html 5.)Aquarium wysiwyg/pwc/dir_63.jpg http://www.buck4all.com/index.php/ro/filtration-system/aquarium.html 6.)Ultra Violet wysiwyg/pwc/dir_64.jpg http://www.buck4all.com/index.php/ro/filtration-system/ultra-violet.html 1.)Housing wysiwyg/pwc/dir_66.jpg http://www.buck4all.com/index.php/ro/parts-tools/housing.html 2.)Feeders wysiwyg/pwc/dir_67.jpg http://www.buck4all.com/index.php/ro/parts-tools/feeders.html 3.)Fittings wysiwyg/pwc/dir_79.jpg http://www.buck4all.com/index.php/ro/parts-tools/fittings.html 4.)Valves wysiwyg/pwc/dir_80.jpg http://www.buck4all.com/index.php/ro/parts-tools/valves.html 5.)Faucet-Tank-Tubes wysiwyg/pwc/dir_81.jpg http://www.buck4all.com/index.php/ro/parts-tools/faucet-tank-tubes.html 6.)Utilityes wysiwyg/pwc/dir_82jpg http://www.buck4all.com/index.php/ro/parts-tools/utilityes.html cd /var/www/html/magento8pm/pub/media/wysiwyg/pwc/ wget http://www.purewaterclub.com/aws-20200209.zip -> unzip aws-20200209.zip 1.)Combo Set wysiwyg/pwc/dir_70.jpg http://www.buck4all.com/index.php/ro/replacement/combo-set.html 2.)Filters wysiwyg/pwc/dir_71.jpg http://www.buck4all.com/index.php/ro/replacement/filters.html 3.)Menbranes wysiwyg/pwc/dir_72.jpg http://www.buck4all.com/index.php/ro/replacement/menbranes.html 4.)Resin wysiwyg/pwc/dir_73.jpg http://www.buck4all.com/index.php/ro/replacement/resin.html 5.)Ultra Violet wysiwyg/pwc/dir_74.jpg http://www.buck4all.com/index.php/ro/replacement/ultra-violet.html 目錄頁子目錄圖片:dir 47,50,65,68 Catagory->block(dir_50)->element(pwc-dir-50)->widget(6 x pic + 6 x text) 調整圖片為(2x3,3x2,6x1行) Widget:image collect->phone尺寸圖片位置為4+2
    Bug->第3-Text如果打Fittings會一直亂碼->改Connecters Fittings Ves Generate->Page Builder Profile->Ves Element->Widget CONTENS->Pages->Ves Generate Page Builder Profile->Ves Element->Widget Ves Generate Page Builder Profile->Ves Element->Widget --- 20200203-05 首頁+目錄頁 ========================================================================================================================= 設定首頁+目錄頁Theme-> CONTENT->Design Configuration->Edit->Default Theme->Applied Theme-> Magento Blank: 首頁第一行自動出現Ves Brand(可全部disable後消失) + Ves Menu在header下方整行 + 手機Ves Menu不會縮小左上角 + 產品列表自動適應成2~4行 Magento Luma: 首頁第一行自動出現Ves Brand(可全部disable後消失) + Ves Menu在header下方整行 + 手機Ves Menu不會縮小左上角 + 中間所有內容消失 Venustheme - 8pm/7pm: 首頁Ves Menu在header 正上方logo右側 + 產品列表PC 3行-手機 1行 關閉首頁(Blank/Luma)的Ves Brand: 1.)將brand中全部都disable or 2.)STORES->Configuration->VENUS - VENUSTHEME.COM->Brand->General Settings->Disabled 設定首頁的Page->STORES->Configuration->Store View:pwc English->GENERAL->Default Pages->CMS Home Page->Home Page(in CONTENTS->Pages) Page Title->Home Page Content->Content Heading->Home Page-dv Design->Layout Update XML block-slideshow-bannertop block-banner-center new-products-carousel banner-mass-bottom product-tabs banner-mass-bottom2 --- 20200202 product-list ========================================================================================================================= Base URL for User Media Files:/var/www/html/magento8pm/pub/media/ 8pm Slider dv
    Look Book

    Autums
    Collection
    For

    Shop Now
    Product2->New Arrival2 Product1->Product Product->Product Product3->Feature Items3 8pm image collection->Collection 2017 --- 20200201 8pm slider ========================================================================================================================= www.buck4all.com->pwc Stores->All Stores->pwc English Stores->Configuration->Store View:>pwc English->Web->Default Pages->CMS Home Page->purewaterclub.com VenusTheme->Page Builder->Block:purewaterclub.com->PAGE INFORMATION->Desgin Block->Elemment:8pm categories->Design Elemment->Widget:Show Categories information and subcategories 目錄頁加子目錄跑馬燈icon: Products->Catagories->目錄->Content->Add CMS Block->dv-block 目錄頁左半列出子目錄 Display Settings->Anchor->No 目錄頁不要出現目錄圖 Configuration->VES THEMESETTINGS->General Settings->Category Image->No 目錄頁下方出現翻頁功能 Configuration->VES THEMESETTINGS->General Settings->Bottom Toolbar->Yes 產品對應目錄list表:catagory-list-20200129-1.csv 產生產品目錄csv->http://www.purewaterclub.com/gen-product-catagory-csv.php ->product-catagory-20200131-4.csv ->Import->Behavior:Add/Update 轉檔URL不可以有+ -> -pl- strtolower(str_replace("+","%20",$tmpurl)) General system exception happened Additional data: URL key for specified store already exists. Checked rows: 362, checked entities: 362, invalid rows: 0, total errors: 0 -> Import successfully done 同步產品說明+名稱->http://aws.wg-1.com/gen-product-desc-name.php-> cd /var/www/html/magento8pm /usr/bin/php bin/magento indexer:reindex /usr/bin/php bin/magento cache:flush //--- bug picture (圖片怪,不能用,需要重新抓圖上傳?)--------------- 1. Imported resource (image) could not be downloaded from external resource due to timeout or access permissions in row(s): 37, 39 FS-5BM150 /catalog/images/FS-5BM150.JPG FS-4M100 /catalog/images/4PM100.jpg 1. Imported resource (image) could not be downloaded from external resource due to timeout or access permissions in row(s): 25 PT-TANK02UG /catalog/images/tank.jpg 1. Imported resource (image) could not be downloaded from external resource due to timeout or access permissions in row(s): 69, 72, 75, 98 POQ-5BB-50 /catalog/images/POQ-5BB.JPG POQ-5BB-150 /catalog/images/POQ-5BB.JPG SP-Y /catalog/images/SP-Y.JPG UG-50G No Pic1. Imported resource (image) could not be downloaded from external resource due to timeout or access permissions in row(s): 19, 35, 89, 91, 93 General system exception happened Additional data: URL key for specified store already exists. RQ-5-100+4 UG-100-200 SO-002 FT-M200 RQ5-5T-50 1. Imported resource (image) could not be downloaded from external resource due to timeout or access permissions in row(s): 260, 281, 297, 351, 353, 355 -----------------// 手工添加主圖表:products->products_image 576>>>UG-50G->no pic -> UG-50G.jpg 629>>>UG-100-200->no pic -> UG-100-200.jpg 606>>>RQ-5-100+4->no pic -> RQ-5-100-pl-4.jpg 699>>>SO-002->no pic -> SO-002.jpg 手工上傳 jpg -> aws (DV已上傳-20200131) cd /var/www/html/pwpic/catalog/images/ 576>>>UG-50G->no pic -> wget http://www.purewaterclub.com/UG-50G.jpg 629>>>UG-100-200->no pic -> wget http://www.purewaterclub.com/UG-100-200.jpg 606>>>RQ-5-100+4->no pic -> wget http://www.purewaterclub.com/RQ-5-100-pl-4.jpg 699>>>SO-002->no pic -> wget http://www.purewaterclub.com/SO-002.jpg 701>>>FT-M200->no pic -> wget http://www.purewaterclub.com/FT-M200.jpg 704>>>RQ5-5T-50->no pic -> wget http://www.purewaterclub.com/RQ5-5T-50.jpg wget http://www.purewaterclub.com/4PM100.jpg wget http://www.purewaterclub.com/tank.jpg wget http://www.purewaterclub.com/POQ-5BB.JPG wget http://www.purewaterclub.com/SP-Y.JPG osc 舊RO站後台:(一定要用IE) https://www.purewaterclub.com/catalog/admin/index.php -> admin + admin1234! 更新產品基本資料必要欄位 sku,store_view_code,attribute_set_code,product_type,categories,product_websites,name,description,short_description,weight,product_online,tax_class_name,visibility,price,special_price,special_price_from_date,special_price_to_date,url_key,meta_title,meta_keywords,meta_description,base_image,base_image_label,small_image,small_image_label,thumbnail_image,thumbnail_image_label,swatch_image,swatch_image_label,created_at,updated_at,new_from_date,new_to_date,display_product_options_in,map_price,msrp_price,map_enabled,gift_message_available,custom_design,custom_design_from,custom_design_to,custom_layout_update,page_layout,product_options_container,msrp_display_actual_price_type,country_of_manufacture,additional_attributes,qty,out_of_stock_qty,use_config_min_qty,is_qty_decimal,allow_backorders,use_config_backorders,min_cart_qty,use_config_min_sale_qty,max_cart_qty,use_config_max_sale_qty,is_in_stock,notify_on_stock_below,use_config_notify_stock_qty,manage_stock,use_config_manage_stock,use_config_qty_increments,qty_increments,use_config_enable_qty_inc,enable_qty_increments,is_decimal_divided,website_id,related_skus,crosssell_skus,upsell_skus,additional_images,additional_image_labels,hide_from_product_page,bundle_price_type,bundle_sku_type,bundle_price_view,bundle_weight_type,bundle_values,configurable_variations,configurable_variation_labels,associated_skus PT-12-1,,,,,,PT-12-1,,,,,,,1.1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,304,0,1,0,0,1,1,0,0,1,1,,1,0,1,1,0,1,0,0,1,,,,,,,,,,,,,, --- 20200130-0201 目錄頁 + import product-catagory ========================================================================================================================= 目錄名稱表:catalog_category_entity_varchar-> attribute_id=42 entity_id=50 value=Filtration System 目錄結構表:catalog_category_entity-> entity_id=50 path=1/2/47/50 level=3 children_count=14 產品查目錄表:catalog_category_product_index-> 目錄查產品表:catalog_category_product->category_id + product_id + position(default 1) 手工修改表:products-> products_id=616 (PT-Qfaucet)->products_status=0 (與617重覆) products_id=592 (PT-3W2)->products_status=0 (與594重覆) 目錄List $catidx=array(0,0,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,70,71,72,73,74,75,76,77,79,80,81,82,84); 目錄名稱不可以有, / $d[50]="Filtration System"; $d[51]="Filtration System/Revese Osmosis"; $d[52]="Filtration System/Revese Osmosis/Standard Flow 100 GPD"; $d[53]="Filtration System/Revese Osmosis/High Flow 150+ GPD"; $d[54]="Filtration System/Revese Osmosis/Low Flow 50 GPD"; $d[55]="Filtration System/Portable RO"; $d[56]="Filtration System/Portable RO/Standard Flow 100 GPD"; $d[57]="Filtration System/Portable RO/High Flow 150+ GPD"; $d[58]="Filtration System/Portable RO/Low Flow 50 GPD"; $d[59]="Filtration System/Whole House"; $d[60]="Filtration System/Whole House/Standard"; $d[61]="Filtration System/Whole House/Ecnomical"; $d[62]="Filtration System/Drinking Water"; $d[63]="Filtration System/Aquarium"; $d[64]="Filtration System/Ultra Violet"; $d[68]="Replacement"; $d[70]="Replacement/Combo Set"; $d[71]="Replacement/Filters"; $d[72]="Replacement/Menbranes"; $d[73]="Replacement/Resin"; $d[74]="Replacement/Ultra Violet"; $d[65]="Parts & Tools"; $d[66]="Parts & Tools/Housing"; $d[75]="Parts & Tools/Housing/0.25~0.375 inch"; $d[76]="Parts & Tools/Housing/0.75 inch"; $d[77]="Parts & Tools/Housing/0.5 inch"; $d[67]="Parts & Tools/Feeders"; $d[79]="Parts & Tools/Fittings"; $d[80]="Parts & Tools/Valves"; $d[81]="Parts & Tools/Faucet-Tank-Tubes"; $d[82]="Parts & Tools/Utilityes"; $d[84]="Parts & Tools/Shipping"; --- 20200127-29 整理 old-RO product目錄 ========================================================================================================================= gen-product-csv.php $tmppic=$row["products_image"]; $tmppic=str_replace(" ","-sp-",$tmppic,$i); $tmppic=str_replace("+","-pl-",$tmppic,$i2); $tmppic=str_replace("[1]","-1-",$tmppic,$i3); 收集+改產品主圖片名稱(含空格,+,[1]) -> copy to ./tmp/ -> ftp下載整理 -> 手工zip為aws-20200127.zip -> ftp上傳ro站 aws: cd /var/www/html/pwpic/catalog/images/ wget http://www.purewaterclub.com/aws-20200127.zip -> unzip aws-20200127.zip 缺主圖 576>>>UG-50G->no pic 606>>>RQ-5-100+4->no pic 629>>>UG-100-200->no pic 699>>>SO-002->no pic 701>>>FT-M200->no pic 704>>>RQ5-5T-50->no pic mag2->import->product+pwpic->w Checked rows: 364, checked entities: 364, invalid rows: 0, total errors: 0 --- 20200127 整理 old-RO product special file name pic -> mag2 ========================================================================================================================= 53dfeff4e5225395344f4e917893e8ff3762a0e12080f11da0d57b21fdbc97f8:aFtZhhXDAihazGkpXyPFbBWEf32oxHsL:1 dv4ml@dacomputing.com + aa223344 osc 表customers -> customers_id=9660 + 1@aa.com + $P$DNVAIbn8kZQQop6d3QAg2lFVkSG2o2/ alberto.jany@woodgroup.com + (aa223344) $P$DNVAIbn8kZQQop6d3QAg2lFVkSG2o2/:P$DNVAIbn8kZQQop6d3QAg2lFVkSG2o2/:0 SELECT * FROM customers INNER JOIN address_book ON customers.customers_default_address_id=address_book.address_book_id LIMIT 100 SELECT countries_id,countries_name,countries_iso_code_3 FROM (customers INNER JOIN address_book ON customers.customers_default_address_id=address_book.address_book_id) LEFT JOIN countries ON address_book.entry_country_id=countries.countries_id LIMIT 100 SELECT * FROM (customers INNER JOIN address_book ON customers.customers_default_address_id=address_book.address_book_id) LEFT JOIN countries ON address_book.entry_country_id=countries.countries_id LIMIT 100 手工刪除黑客注冊垃圾帳號 DELETE FROM address_book WHERE entry_street_address LIKE '%minsk%' AND entry_city LIKE '%minsk%' -> 627 record DELETE FROM address_book WHERE entry_country_id<>'223' AND entry_street_address LIKE '%?%' -> 20 record DELETE FROM address_book WHERE entry_country_id<>'223' AND entry_street_address=entry_city -> 23 record DELETE FROM address_book WHERE entry_state like '%?%' -> 1 record DELETE FROM address_book WHERE customers_id=3953 -> 2 record (YU)->南斯拉夫已不存在 DELETE FROM address_book WHERE customers_id=5505 -> 1 record (YU)->南斯拉夫已不存在 DELETE FROM address_book WHERE customers_id=776 -> 1 record (dd@dd.com)->亂碼 ?? if osc的state空白->mag2自動根據地址判斷 手工刪除表:address_book->不常國家 + state/region 錯誤(無法上傳mag2) + 未成交帳號 DELETE FROM address_book WHERE entry_country_id='123' (LT Lithuania) -> 7 record DELETE FROM address_book WHERE entry_country_id='175' (RO Romania) -> 2 record DELETE FROM address_book WHERE entry_country_id='117' (LV Latvia) -> 2 record (含customers_id=2073 -> mike.pelletier@wanadoo.fr) DELETE FROM address_book WHERE entry_country_id='73' (FR France) -> 3 record (含customers_id=3123 -> asd@jp.co.jp) DELETE FROM address_book WHERE entry_country_id='107' AND customers_id<>6476(JP Japan) -> 7 record 手工刪除表:address_book->(BR Brazil)+ 未成交帳號 UPDATE address_book LEFT JOIN orders ON address_book.customers_id=orders.customers_id SET entry_suburb='xxxxx' WHERE orders_id IS NULL AND entry_country_id='30' (BR Brazil) -> 44 record DELETE FROM address_book WHERE entry_suburb='xxxxx' -> 44 record Last->手工刪除表:customers->無地址address_book UPDATE customers LEFT JOIN address_book ON customers.customers_default_address_id=address_book.address_book_id SET customers_email_memo='xxxxx' WHERE address_book_id IS NULL -> 730 record DELETE FROM customers WHERE customers_email_memo='xxxxx' -> 730 record 手工修改表:address_book->state UPDATE address_book SET entry_state='Puerto Rico' WHERE entry_state='san juan' (US PR)-> 7 record UPDATE address_book SET entry_state='Puerto Rico' WHERE entry_state='Comerio' (US PR)-> 2 record UPDATE address_book SET entry_state='Puerto Rico' WHERE entry_state='aguadilla' (US PR)-> 1 record UPDATE address_book SET entry_state='Puerto Rico' WHERE entry_state='P.R.' (US PR)-> 3 record UPDATE address_book SET entry_state='Paraíba' WHERE entry_state='paraiba' (BR)-> 3 record UPDATE address_book SET entry_state='S?o Paulo' WHERE entry_state='SAO PAULO' (BR)-> 5 record UPDATE address_book SET entry_state='Goiás' WHERE entry_state='Goias' (BR)-> 3 record 手工修改表:customers->customers_id=8277 (978)?412-6426->去掉中間亂碼 手工修改表:address_book->customers_id=603 2314\->23140 手工修改表:address_book->customers_id=1470 cahoon77@yahoo.com-> 手工修改表:customers->root@localhost->root@localhost.com 手工修改表:customers->richter@ccs.fau.du->richter@ccs.fau.du.com http://www.purewaterclub.com/gen-customer-csv.php 各種拉丁文亂碼Bogotá(例表:customerscustomers_id=1420(alberto.jany@woodgroup.com) $tmps=str_replace("{fname}",iconv("ISO-8859-1","UTF-8",$row["customers_firstname"]),$tmps); $tmps=str_replace("{lname}",iconv("ISO-8859-1","UTF-8",$row["customers_lastname"]),$tmps); $tmps=str_replace("{city}",iconv("ISO-8859-1","UTF-8",$row["entry_city"]),$tmps); $tmps=str_replace("{fname2}",iconv("ISO-8859-1","UTF-8",$row["entry_firstname"]),$tmps); $tmps=str_replace("{lname2}",iconv("ISO-8859-1","UTF-8",$row["entry_lastname"]),$tmps); $tmps=str_replace("{state}",iconv("ISO-8859-1","UTF-8",$row["entry_state"]),$tmps); $tmps=str_replace("{street}",iconv("ISO-8859-1","UTF-8",$row["entry_street_address"]),$tmps); migrate osc to mag2 v.1 -> osc + : + 0 df7cde40bc6922f8a885a21ebe8fd4b0:70 -> df7cde40bc6922f8a885a21ebe8fd4b0:70:0 v.2 -> osc + : + osc去掉首位$ + : + 0 利用mag2的salt位置傳遞存檔hash,新增程式判斷若為osc v.2,則字首加上$後依v.2規則產生hash,比對若正確後回送hash (aa223344) $P$DNVAIbn8kZQQop6d3QAg2lFVkSG2o2/ -> $P$DNVAIbn8kZQQop6d3QAg2lFVkSG2o2/:P$DNVAIbn8kZQQop6d3QAg2lFVkSG2o2/:0 $P$DYd3TBSaZT6C85hm5amzC8RwGcu3Pf. -> $P$DYd3TBSaZT6C85hm5amzC8RwGcu3Pf.:P$DYd3TBSaZT6C85hm5amzC8RwGcu3Pf.:0 --- 20200124-25-26 整理 old-RO customer 資料 -> mag2 ========================================================================================================================= 添加新theme 7pm cd /var/www/html/magento8pm/app/design/frontend/Venustheme/ cp 8pm 7pm -r joe registration.php joe theme.xml 直接改不同的default.xml可改變Ves header使用MegaMenu的名稱 1.)pwc /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Megamenu/layout/default.xml menu-top 2.)b4u /var/www/html/magento8pm/app/design/frontend/Venustheme/7pm/Ves_Megamenu/layout/default.xml menu-top-b4u 失敗->添加新theme zou-被Ves Extend搶走header cd /var/www/html/magento8pm/app/design/frontend/Zou/demo/ wget http://www.purewaterclub.com/zou-20200121.zip -> unzip zou-20200121.zip DNS A zou.wg-1.com -> 18.218.158.219 cd /etc/apache2/sites-available cp buck4u.conf zou-wg-1.conf joe zou-wg-1.conf -> ServerName zou.wg-1.com SetEnv MAGE_RUN_CODE "zou" cd /etc/apache2/sites-enabled ln -s /etc/apache2/sites-available/zou-wg-1.conf /etc/apache2/sites-enabled/zou-wg-1.conf service apache2 restart 失敗->增加Ves header的layout: copy default.phtml default-b4u.phtml /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Themesettings/templates/header/default.phtml getChildHtml('catalog.topnav_b4u') ?> /var/www/html/magento8pm/app/code/Ves/Megamenu/view/frontend/layout/default.xml 原始默認Ves header使用MegaMenu的名稱 /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Megamenu/layout/default.xml /var/www/html/magento8pm/app/design/frontend/Venustheme/7pm/Ves_Megamenu/layout/default.xml 可改變Ves header使用MegaMenu的名稱 alias menu-top-b4u layout horizontal /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Themesettings/layout/default.xml --- 20200121 mag2 設定不同 store 配不同 Mega Menu ========================================================================================================================= Bug->Ves ->同一頁只會出現第一種MegaMenu MegaMenu從正上方下移至Top Bar下方: /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Themesettings/layout/default.xml Bug->Ves MegaMenu management->必須改第一個 or 只移動位置,只要按了select就save無效 x-SELECT * FROM address_book LEFT JOIN customers ON address_book.customers_id=customers.customers_id WHERE 1 SELECT * FROM customers INNER JOIN address_book ON customers.customers_default_address_id=address_book.address_book_id WHERE customers.customers_id<>address_book.customers_id 改ves megamenu alias cd /var/www/html/magento8pm app/code/Ves/Megamenu/view/frontend/layout/default.xml menu-top catagary背景圖: /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/web/images/bg_brc.jpg /var/www/html/magento8pm/app/design/frontend/Venustheme/7pm/web/images/bg_brc.jpg menu背景圖: Add class “menu-bg” to insert background in dropdown, change background in the path: /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/web/images/menu-bg.jpg cp /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/web/images/bg_brc.jpg /var/www/html/magento8pm/app/design/frontend/Venustheme/7pm/web/images/bg_brc.jpg --- 20200119-20 增刪修 Mega Menu ========================================================================================================================= 缺主圖片 x318>>>6BT-150->no pic x332>>>USPS-20->no pic x444>>>SO-003->no pic x477>>>SP-004->no pic 576>>>UG-50G->no pic 606>>>RQ-5-100+4->no pic 629>>>UG-100-200->no pic x681>>>UG-50-150->no pic 699>>>SO-002->no pic x717>>>SO-003->no pic 圖片不存在 701>>>FT-M200.jpg 704>>>RQ5-5T-50.jpg !BkJeFJQB2k~$(KGrHqUH-CkEs+T,q!(EBLWTm-zWz!~~_12.JPG->FT-PP-25.jpg q-2.csv Images File Directory -> pwpic copy sale:desc+name -> magento8pm 上傳 gen-product-desc-name.php -> pwc gen-product-desc-name.phpx cd /var/www/html/pwpic wget http://www.purewaterclub.com/gen-product-desc-name.phpx -O /var/www/html/pwpic/gen-product-desc-name.php http://aws.wg-1.com/gen-product-desc-name.php 產品基本資料->表:catalog_product_entity entity_id=1824 sku='RO-QQ-101' 產品說明->表:catalog_product_entity_text attribute_id=72(Desc) attribute_id=73(short Desc) entity_id=1824 value=Desc-331(原sale product_id) 產品名稱->表:catalog_product_entity_varchar attribute_id=70 entity_id=1824 value=Name-331(原sale product_id) 產品圖片->表:catalog_product_entity_varchar attribute_id=84(base_image) attribute_id=85(small_image) attribute_id=86(thumbnail_image) attribute_id=150(swatch_image) entity_id=1824 value=/2/2/22-28.jpg 產品庫存->表:cataloginventory_stock_item(各種數量max,min..) product_id=1824 qty=919818.0000 ->表:cataloginventory_stock_status product_id=1824 qty=919818.0000 stock_status=1 產品價格->表:catalog_product_entity_decimal entity_id=1824 attribute_id=74 value=123.4500 ->?表:catalog_product_index_price entity_id=1824 gen-product-csv.php 收集產品主圖片->../aws/catalog/images/->ftp下載整理->手工zip aws-20200118.zip->ftp上傳ro站 aws: cd /var/www/html/pwpic/catalog/images/ wget http://www.purewaterclub.com/aws-20200118.zip -> unzip aws-20200118.zip --- 20200118 mag2 product 產品主圖 + 補缺圖 ========================================================================================================================= Marketing->Cart Price Rules->滿$50包郵->Conditions ->Subtotal equals or greater than 50 x->借用屬性 Eco_Collect 成為 Free Shipping(false:可以排除不包郵的item) (20200216 改不借用Eco_Collect,新增Free Shipping屬性 + Attribute Code->free_shipping + Attribute Properties->Scope->Global + Storefront Properties->Use for Promo Rule Conditions->YES) Actions->Apply the rule only to cart items matching the following conditions (leave blank for all items). ->Free Shipping is Yes cart rule->if Free Shipping is TRUE --- 20191225 mag2 shipping rule ========================================================================================================================= Configuration->VES THEMESETTINGS->Product View Page->Tab By Product Attribute Code->Add Attribute Code Configuration->VES THEMESETTINGS->Product View Page->Tab By CMS Block->Add Attribute Code 不可以Add 空白否則產品頁500錯誤 koofficecn 2019/12/20 14:40:25 http://18.218.158.219/magento8pm/ada.php koofficecn 2019/12/20 14:40:33 openssl OpenSSL support enabled OpenSSL Library Version OpenSSL 1.1.1c 28 May 2019 OpenSSL Header Version OpenSSL 1.1.1c 28 May 2019 Openssl default config /usr/lib/ssl/openssl.cnf ADA 22:26:13 root@ip-172-31-32-158:/var/www/html/magento8pm# /usr/bin/php bin/magento cache:clean Cleaned cache types: config layout block_html collections reflection db_ddl eav customer_notification full_page config_integration config_integration_api translate config_webservice 要用 /usr/bin/php 不能只用 php root@ip-172-31-32-158:/var/www/html/magento8pm# /usr/bin/php bin/magento indexer:reindex Design Config Grid index has been rebuilt successfully in 00:00:01 Customer Grid index has been rebuilt successfully in 00:00:01 Category Products index has been rebuilt successfully in 00:00:00 Product Categories index has been rebuilt successfully in 00:00:00 Product Price index has been rebuilt successfully in 00:00:00 Product EAV index has been rebuilt successfully in 00:00:00 Stock index has been rebuilt successfully in 00:00:00 Catalog Rule Product index has been rebuilt successfully in 00:00:00 Catalog Product Rule index has been rebuilt successfully in 00:00:00 Catalog Search index has been rebuilt successfully in 00:00:03 不過 root@ip-172-31-32-158:/var/www/html/magento8pm# /usr/bin/php bin/magento cache:clean 可以, 但 root@ip-172-31-32-158:/var/www/html/magento8pm# /usr/bin/php bin/magento cache:flush 會出錯, 所以我是回後台, 用後台 admin 作 cache management , 然後才去用命令列, 執行 root@ip-172-31-32-158:/var/www/html/magento8pm# /usr/bin/php bin/magento indexer:reindex cd /var/www/html/magento8pm /usr/bin/php bin/magento indexer:reindex --- 20191222 mag2 import product + reindex ========================================================================================================================= root@ip-172-31-32-158:/var/www/html/magento8pm# /usr/bin/php bin/magento cache:clean Cleaned cache types: config layout block_html collections reflection db_ddl eav customer_notification full_page config_integration config_integration_api translate config_webservi cd /var/www/html/magento8pm find . -type f -exec chmod 644 {} /; && find . -type d -exec chmod 755 {} /; && chmod 777 var/ -R && find pub/media -type d -exec chmod 777 {} /; && find pub/static -type d -exec chmod 777 {} /; && chmod 777 app/etc && chmod 644 app/etc/*.xml && chmod u+x bin/magento adduser zou passwd zou joe /etc/sudoers -> zou ALL=(ALL:ALL) ALL usermod -a -G www-data zou groups www-data cd /var/www/html/magento8pm chown -R www-data:www-data . cd /var/www/html/magento8pm find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} /; find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} /; find . -type f -exec chmod 644 {} /; find . -type d -exec chmod 755 {} /; find ./var -type d -exec chmod 777 {} /; chmod 777 var/ -R find ./pub/media -type d -exec chmod 777 {} /; find ./pub/static -type d -exec chmod 777 {} /; chmod 777 ./app/etc chmod 644 ./app/etc/*.xml xxxx-> chown zou:zou . -hR <--- xxx chmod u+x bin/magento chmod -R g+rwxs . ls -la joe /etc/php/7.0/fpm/pool.d/www.conf chmod u+x qq cd /var/www/html/magento8pm sudo php bin/magento indexer:reindex php /var/www/html/magento8pm/bin/magento indexer:reindex The openssl extension is required for SSL/TLS protection but is not available. If you can not enable the openssl extension, you can disable this error, at your own risk, by setting the 'disable-tls' option to true. #0 /var/www/html/magento8pm/vendor/composer/composer/src/Composer/Factory.php(306): Composer/Factory::createRemoteFilesystem(Object(Composer/IO/BufferIO), Object(Composer/Config)) #1 /var/www/html/magento8pm/vendor/composer/composer/src/Composer/Factory.php(532): Composer/Factory->createComposer(Object(Composer/IO/BufferIO), Array, false) #2 /var/www/html/magento8pm/vendor/magento/framework/Composer/ComposerFactory.php(47): Composer/Factory::create(Object(Composer/IO/BufferIO), '/var/www/html/m...') #3 /var/www/html/magento8pm/vendor/magento/framework/Composer/ComposerInformation.php(362): Magento/Framework/Composer/ComposerFactory->create() #4 /var/www/html/magento8pm/vendor/magento/framework/Composer/ComposerInformation.php(375): Magento/Framework/Composer/ComposerInformation->getComposer() #5 /var/www/html/magento8pm/vendor/magento/framework/Composer/ComposerInformation.php(242): Magento/Framework/Composer/ComposerInformation->getLocker() #6 /var/www/html/magento8pm/vendor/magento/framework/App/ProductMetadata.php(104): Magento/Framework/Composer/ComposerInformation->getSystemPackages() #7 /var/www/html/magento8pm/vendor/magento/framework/App/ProductMetadata.php(65): Magento/Framework/App/ProductMetadata->getSystemPackageVersion() #8 /var/www/html/magento8pm/vendor/magento/framework/Console/Cli.php(81): Magento/Framework/App/ProductMetadata->getVersion() #9 /var/www/html/magento8pm/bin/magento(22): Magento/Framework/Console/Cli->__construct('Magento CLI') #10 {main} Fatal error: Uncaught Error: Class 'Cli' not found in /var/www/html/magento8pm/bin/magento:31 Stack trace: #0 {main} thrown in /var/www/html/magento8pm/bin/magento on line 31 不可用sudo composer config -g -- disable-tls true service apache2 restart ln -s /var/www/html/pwpic /var/www/html/magento8pm/pwpic Images File Directory -> pwpic catalog_product_20191216_044905 /catalog/images/22-28.jpg url -> atomic-endurance-running-tee-v-neck-s-blue 35138564 cd /var/www/html/magento8pm php bin/magento indexer:reindex php bin/magento cache:clean && php bin/magento cache:flush Table eav_entity_type.entity_type_id=4(catalog_product) ->Table eav_attribute.attribute_id=72(catalog_product-description-text) ->Table catalog_product_entity.entity_id=1792(sku=RQ-6B2W-100) ->Table catalog_product_entity_text.attribute_id=72 + .entity_id=1792(value=description html) sale.products.products_model->sku --- 20191213 AWS mySQL Table ========================================================================================================================= cd /var/www/html/pwpic wget http://www.purewaterclub.com/pid.phpx -O /var/www/html/pwpic/pid.php http://www.purewaterclub.com/pid.php?p=264 -> http://aws.wg-1.com/pid.php?p=264 2434 72 0 1792 ->去掉height UPDATE catalog_product_entity_text SET value='$tmphtm' WHERE value_id='2434' AND attribute_id='72' AND entity_id='1792' STORES->Configuration->VES THEMESETTINGS->Profuct View Page->Tab --- 20191213 AWS PHP + mySQL ========================================================================================================================= cd /var/www/html/pwpic wget http://www.purewaterclub.com/aws-20191205.zip -> 解壓zip ro.wg-1.com 指向+對應 59.124.16.10 /home/httpd/www/aws aws.wg-1.com 指向+對應 AWS /var/www/html/pwpic 更新所有連結 59.124.16.10 -> aws.wg-1.com www.purewaterclub.com -> aws.wg-1.com products_description_wk copy to products_description %20 -> / http://aws.wg-1.com/items/Pic/PO/2way%20switch.jpg -> 2way/ switch.jpg http://aws.wg-1.com/items/Pic/SP/Collet%20release%20tool.JPG -> Collet/ release/ tool.JPG http://aws.wg-1.com/items/Pic/SP/Collet%20release%20tool-1.JPG -> Collet/ release/ tool-1.JPG http://aws.wg-1.com/items/Pic/SP/SP-Collet%20release%20tool.JPG -> SP-Collet/ release/ tool.JPG http://aws.wg-1.com/items/Pic/SP/SP-Collet%20release%20tool-1.JPG -> SP-Collet/ release/ tool-1.JPG http://aws.wg-1.com/items/Pic/000/install/tube%20remove.jpg -> tube/ remove.jpg http://aws.wg-1.com/items/Pic/000/First-Class%20Mail.jpg -> First-Class/ Mail.jpg http://aws.wg-1.com/items/Pic/PT/bracket%20-size.JPG -> bracket -size.JPG http://aws.wg-1.com/items/Pic/000/FS/FS20-PPx25-2.JPG ->換圖 wget http://www.purewaterclub.com/items/Pic/000/parts/B38.jpg -O /var/www/html/pwpic/items/Pic/000/parts/B38.jpg wget http://www.purewaterclub.com/items/Pic/000/parts/B38-1.JPG -O /var/www/html/pwpic/items/Pic/000/parts/B38-1.JPG wget http://www.purewaterclub.com/items/Pic/000/parts/B38-2.JPG -O /var/www/html/pwpic/items/Pic/000/parts/B38-2.JPG wget http://www.purewaterclub.com/items/Pic/000/parts/B38-3.jpg -O /var/www/html/pwpic/items/Pic/000/parts/B38-3.jpg --- 20191205 舊RO站所有pic -> AWS ========================================================================================================================= www.purewaterclub.com -> /home/httpd/www/sale copy -> /home/httpd/www/aws 59.124.16.10 -> /home/httpd/www/ksoffice copy -> /home/httpd/www/aws 通知 ML http://www.purewaterclub.com/catalog/product_info.php?products_id=709 -> 5破圖 取消所有超連結 未來新產品儘量使用全圖片 --- 20191204 集中舊RO站所有產品說明的pic ========================================================================================================================= 1.) copy products_description-20191128 -> products_description_20191203_0 2.) products_description_20191203_0 新增 products_description_0 3.) UPDATE products_description_20191203_0 SET products_description_0=products_description 4.) copy products_description_20191203_0 -> products_description_wk 5.) php 去除所有 href + 修正所有 img 後同時寫回 mySQL language_id=1,2 6.) 手工改/加圖檔 --- 20191203 修改舊RO站產品說明 去除所有href + 修正 img ========================================================================================================================= www.purewaterclub.com -> /home/httpd/www/sale , 59.124.16.10 -> /home/httpd/www/ksoffice 1.) 去除 (112 + 128 + 104 + 130 + 46 + 44 records) UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; 2.) 去除 .. (92 + 90 + 86 + 76 + 22 + 42 records) UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; 3.) 去除 .. (18 + 60 + 60 + 56 + 20 + 20 records) UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; 4.) 去除 .. (4 + 98 + 58 + 46 + 10 + 8 records) UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; 5.) 去除 (4 + 2 + 8 + 4 + 20 + 20 records) UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; 6.) 去除 Instructions menu (6 records) SELECT * FROM products_description WHERE products_description LIKE '%Instructions menu%' UPDATE products_description SET products_description=REPLACE(products_description,'Instructions menu','') WHERE products_description LIKE '%Instructions menu%'; 7.) 去除 Instructions menu (2 records) UPDATE products_description SET products_description=REPLACE(products_description,'Instructions menu','') WHERE products_description LIKE '%Instructions menu%'; 8.) 去除 Instructions menu (2 records) UPDATE products_description SET products_description=REPLACE(products_description,'Instructions menu','') WHERE products_description LIKE '%Instructions menu%'; 9.) 去除 nstructions menu (2 records) UPDATE products_description SET products_description=REPLACE(products_description,'nstructions menu','') WHERE products_description LIKE '%nstructions menu%'; 11.) 手工去除 增加 (products_id=305,307,308,312,355) 12.) 手工去除 .. 13.) remove whole --- 20191202 修改舊RO站產品說明 去除href ========================================================================================================================= 1.) 去除 ? ? (76 records) SELECT * FROM products_description WHERE products_description LIKE '%?%' UPDATE products_description SET products_description=REPLACE(products_description,'?','') WHERE products_description LIKE '%?%' 2.) 去除 (Please Click Picture to enlarge the picture) (324 + 94 + 52 records) SELECT * FROM products_description WHERE products_description LIKE '%(Please Click Picture to enlarge the picture)%' UPDATE products_description SET products_description=REPLACE(products_description,'(Please Click Picture to enlarge the picture)','') WHERE products_description LIKE '%(Please Click Picture to enlarge the picture)%' UPDATE products_description SET products_description=REPLACE(products_description,'(Please Click ','') WHERE products_description LIKE '%(Please Click %' UPDATE products_description SET products_description=REPLACE(products_description,'Picture to enlarge the','') WHERE products_description LIKE '%Picture to enlarge the%' UPDATE products_description SET products_description=REPLACE(products_description,'picture)','') WHERE products_description LIKE '%picture)%' UPDATE products_description SET products_description=REPLACE(products_description,'Picture to','') WHERE products_description LIKE '%Picture to%' UPDATE products_description SET products_description=REPLACE(products_description,'enlarge the picture)','') WHERE products_description LIKE '%enlarge the picture)%' UPDATE products_description SET products_description=REPLACE(products_description,'the picture)','') WHERE products_description LIKE '%the picture)%' UPDATE products_description SET products_description=REPLACE(products_description,'enlarge','') WHERE products_description LIKE '%enlarge%' UPDATE products_description SET products_description=REPLACE(products_description,'PW- PW-Picture)','') WHERE products_description LIKE '%PW- PW-Picture)%' UPDATE products_description SET products_description=REPLACE(products_description,'Picture)','') WHERE products_description LIKE '%Picture)%' 10.) 去除

     

    (82 + 128 records) SELECT * FROM products_description WHERE products_description LIKE '%

     

    %' UPDATE products_description SET products_description=REPLACE(products_description,'

     

    ','') WHERE products_description LIKE '%

     

    %'; UPDATE products_description SET products_description=REPLACE(products_description,'

     

    ','') WHERE products_description LIKE '%

     

    %'; 11.) 去除


     

    (38 + 48 records) SELECT * FROM products_description WHERE products_description LIKE '%


     

    %' UPDATE products_description SET products_description=REPLACE(products_description,'


     

    ','') WHERE products_description LIKE '%


     

    %'; UPDATE products_description SET products_description=REPLACE(products_description,'


     

    ','') WHERE products_description LIKE '%


     

    %'; 12.) 去除 (102 + 98 records) SELECT * FROM products_description WHERE products_description LIKE '%%' UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%'; 13.) 去除

    (180 + 102 records) SELECT * FROM products_description WHERE products_description LIKE '%

    %' UPDATE products_description SET products_description=REPLACE(products_description,'

    ','') WHERE products_description LIKE '%

    %'; UPDATE products_description SET products_description=REPLACE(products_description,'

    ','') WHERE products_description LIKE '%

    %'; 14.) 去除 (150 records) SELECT * FROM products_description WHERE products_description LIKE '% %' UPDATE products_description SET products_description=REPLACE(products_description,' ','') WHERE products_description LIKE '% %'; SELECT * FROM products_description WHERE products_description LIKE '%



    %'
    --- 20191201 修改舊RO站產品說明內容 + href ========================================================================================================================= 1.) http://61.220.188.82/items/Pic/Public/US-I.bmp -> http://59.124.16.10/items/Pic/Public/US-I.jpg SELECT * FROM products_description WHERE products_description LIKE '%http://61.220.188.82/items/Pic/Public/US-I.bmp%' UPDATE products_description SET products_description=REPLACE(products_description,'http://61.220.188.82/items/Pic/Public/US-I.bmp','http://59.124.16.10/items/Pic/Public/US-I.jpg') WHERE products_description LIKE '%http://61.220.188.82/items/Pic/Public/US-I.bmp%' 2.) http://59.124.16.10/items/Pic/FT/DIQ-1.JPG -> http://59.124.16.10/items/Pic/FT/DIQ-2.JPG SELECT * FROM products_description WHERE products_description LIKE '%http://59.124.16.10/items/Pic/FT/DIQ-1.JPG%' UPDATE products_description SET products_description=REPLACE(products_description,'http://59.124.16.10/items/Pic/FT/DIQ-1.JPG','http://59.124.16.10/items/Pic/FT/DIQ-2.JPG') WHERE products_description LIKE '%http://59.124.16.10/items/Pic/FT/DIQ-1.JPG%' 3.) http://59.124.16.10/items/Pic/22-4114/22-4 /r 114.jpg -> http://59.124.16.10/items/Pic/22-4114/22-4114.jpg (products_id=191) 4.) hhttp://59.124.16.10/items/Pic/000/FT/FT-PH.jpg -> hhttp://59.124.16.10/items/Pic/000/FT/FT-PH.jpg (products_id=308) 5.) http://59.124.16.10/items/Pic/000/1042Q-1.jpg -> IMG rmoved (products_id=340) 6.) http://sm7.sitemeter.com/meter.asp?site=sm7purewaterclub -> IMG rmoved (products_id=414) 7.) (products_id=490) http://59.124.16.10/items/Pic/22-10/22-10- /r F5-I-1.jpg -> http://59.124.16.10/items/Pic/22-10/22-10-F5-I-1.jpg http://59.124.16.10/items/PW-Pic/PW-22- /r 82/PW-22-82-F5-I.jpg -> http://59.124.16.10/items/PW-Pic/PW-22-82/PW-22-82-F5-I.jpg http://59.124.16.10/items/PW- /r Pic/PW-22-82/PW-22-82-F1.jpg -> http://59.124.16.10/items/PW-Pic/PW-22-82/PW-22-82- F6.jpg http://59.124.16.10/items/PW-Pic/PW-22- 82/PW-22-82- /r F6.jpg -> http://59.124.16.10/items/PW-Pic/PW-22-82/PW-22-82- F6.jpg 8.) -> IMG rmoved (products_id=542) SELECT * FROM `products_description` WHERE `products_description` like '%%' UPDATE products_description SET products_description=REPLACE(products_description,'','') WHERE products_description LIKE '%%' 9.) http://59.124.16.10/items/Pic/000/FT/FT-PP05_2.JPG -> http://59.124.16.10/items/Pic/000/FT/FT-PP05_2.JPG (products_id=595,597,637) SELECT * FROM `products_description` WHERE products_description LIKE '% %' AND (products_id='595' OR products_id='597' OR products_id='637') UPDATE products_description SET products_description=REPLACE(products_description,' ','') WHERE products_description LIKE '% %' AND (products_id='595' OR products_id='597' OR products_id='637') 10.) (products_id=632,633,658,661) http://59.124.16.10/items/Pic/22-309/22-115-F1.jpg -> http://59.124.16.10/items/Pic/22-309/22-115-F1.jpg http://59.124.16.10/items/Pic/22-309/22-115-F3.jpg -> http://59.124.16.10/items/Pic/22-309/22-115-F3.jpg http://59.124.16.10/items/Pic/FT/T33.JPG -> http://59.124.16.10/items/Pic/FT/T33.JPG http://59.124.16.10/items/Pic/22-36/22-36-F3.jpg -> http://59.124.16.10/items/Pic/22-36/22-36-F3.jpg http://59.124.16.10/items/Pic/22-36/22-36-P4.jpg -> http://59.124.16.10/items/Pic/22-36/22-36-P4.jpg http://59.124.16.10/items/Pic/22-36/22-36-P6.jpg -> http://59.124.16.10/items/Pic/22-36/22-36-P6.jpg SELECT * FROM `products_description` WHERE products_description LIKE '% %' AND (products_id='632' OR products_id='633' OR products_id='658' OR products_id='661') UPDATE products_description SET products_description=REPLACE(products_description,' ','') WHERE products_description LIKE '% %' AND (products_id='632' OR products_id='633' OR products_id='658' OR products_id='661') 11.) http://59.124.16.10/items/Pic/000/FS/FS20-PPx25-1.JPG -> http://59.124.16.10/items/Pic/000/FS/FS20-PPx24-1.JPG (products_id=675) 12.) https: -> http: (products_id=709,716) SELECT * FROM `products_description` WHERE products_description LIKE '%https:%' AND (products_id='709' OR products_id='716') UPDATE products_description SET products_description=REPLACE(products_description,'https:','http:') WHERE products_description LIKE '%https:%' AND (products_id='709' OR products_id='716') ?? http://www.purewaterclub.com/catalog/images/Psi-1.jpg -> http://59.124.16.10/catalog/images/Psi-1.jpg 不顯現 30 pic ?? http://i.ebayimg.com/00/s/NDgwWDY0MA==/z/29MAAMXQ3kNTiBiu/$_12.JPG -> href ? 15 pic http://www.purewaterclub.com/catalog/product_info.php?products_id=709 -> Miss 5 Pic http://www.purewaterclub.com/catalog/product_info.php?products_id=711 -> Miss 1 Pic http://www.purewaterclub.com/catalog/product_info.php?products_id=712 -> Miss 1 Pic ----------------> total 52 pic --- 20191130 修改舊RO站產品圖片連結 ========================================================================================================================= UPDATE products_description SET products_description_0=REPLACE(products_description_0,'?','') WHERE products_id='169' AND language_id='1' http://www.purewaterclub.com/catalog/product_info.php?cPath=88_87&products_id=158 舊RO站table products_description->products_description 1114 records Logo Max 218 x 70 1.)改圖片 IP->?? AWS domain + 去掉目錄? http://59.124.16.10/items/Pic/22-57/22-57-F5-2.jpg 2.)改file:// 244 records file:///E:/Documents%20and%20Settings/Administrator/Local%20Settings/Temporary%20Internet%20Files/FrontPageTempDir/pvwA.htm#RO-P1 3.)去掉亂碼 76 records ? 4.)去掉ebay hyper link 656 records
    http://cgi5.ebay.com/ws/eBayISAPI.dll?SimilarListing&itemid=110389038550#RO-P1 http://stores.ebay.com/purewaterclub_Water-Filter-System_W0QQcolZ4QQdirZ1QQfclZ4QQfsubZ231976010QQftidZ2QQtZkmQQ_trksidZp1742.m154.l1264 5.)去掉無效說明 a.) (Please Click Picture to enlarge the picture) -> 324 records b.)Great Gift! We Could Ship This Item To Your Friend Within US Continatal! Good For Your Family And Friends! -> 328 records 6.)去掉破圖 ?? http://59.124.16.10/items/Driver/driver.jpg 7.)去掉下載Download Manual hyper link 32 records http://59.124.16.10/items/Driver/Protable%20RO%20instruction.doc 8.)去掉Buy It Now價格 194 records Buy It Now is Just US$108.99 and 2-7 days* you will GET IT at HOME within US!! 9.)去掉Retail Price價格 256 records (Retail Price:US$320) SELECT * FROM `products_description` WHERE `products_description` LIKE '%file:%' --- 20191110 修改舊RO站產品說明 ========================================================================================================================= magento2 table customer_entity->password_hash: format -> hash(md5/sha256) : salt (max 32digit) : version (0/1) (md5/sha256) ?->: convet to version (1/2?) b7de469740dc4f7edf08fe26c4e3ee5a53bf03c5467ff2f02a831c94b707d455:mCIgmxGBoZBGKgL6vkc7xIcZcKUwYQvd:1 v.0登入成功後將主動升級v.1用sha256重寫password_hash osCommerce 2.4.3.1 table customers->customers_password: format v.1 -> hash(md5) : salt (2digit) df7cde40bc6922f8a885a21ebe8fd4b0:70 format v.2 -> $P$ + D(重複作md5次數 D=2^13=8192次) + salt (64進位 8digit) + hash (64進位 21+1digit 最後1位2bit=21*6+2=128=32*4=16進位 32digit) $P$ D NVAIbn8k ZQQop6d3QAg2lFVkSG2o2 / ./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz (64進位) -> 0123456789abcdef (16進位) migrate osc to mag2 v.1 -> osc + : + 0 df7cde40bc6922f8a885a21ebe8fd4b0:70 -> df7cde40bc6922f8a885a21ebe8fd4b0:70:0 v.2 -> osc + : + osc去掉首位$ + : + 0 利用mag2的salt位置傳遞存檔hash,新增程式判斷若為osc v.2,則字首加上$後依v.2規則產生hash,比對若正確後回送hash $P$DNVAIbn8kZQQop6d3QAg2lFVkSG2o2/ -> $P$DNVAIbn8kZQQop6d3QAg2lFVkSG2o2/:P$DNVAIbn8kZQQop6d3QAg2lFVkSG2o2/:0 $P$DYd3TBSaZT6C85hm5amzC8RwGcu3Pf. -> $P$DYd3TBSaZT6C85hm5amzC8RwGcu3Pf.:P$DYd3TBSaZT6C85hm5amzC8RwGcu3Pf.:0 joe /var/www/html/magento8pm/vendor/magento/framework/Encryption/Encryptor.php 1.)新增產生osc v.2的password hash public function GenPasswordHash($password,$setting){ $itoa64='./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; $count_log2 = strpos($itoa64,$setting[3]); if ($count_log2 < 7 || $count_log2 > 30)return $output; $count = 1 << $count_log2; $salt = substr($setting, 4, 8); if (strlen($salt) != 8)return $output; if (PHP_VERSION >= '5') { $hash = md5($salt . $password, TRUE); do { $hash = md5($hash . $password, TRUE); } while (--$count); } else { $hash = pack('H*', md5($salt . $password)); do { $hash = pack('H*', md5($hash . $password)); } while (--$count); } $output = substr($setting, 0, 12); $tmpout = ''; $count=16; $i = 0; do { $value = ord($hash[$i++]); $tmpout .= $itoa64[$value & 0x3f]; if ($i < $count)$value |= ord($hash[$i]) << 8; $tmpout .= $itoa64[($value >> 6) & 0x3f]; if ($i++ >= $count)break; if ($i < $count)$value |= ord($hash[$i]) << 16; $tmpout .= $itoa64[($value >> 12) & 0x3f]; if ($i++ >= $count)break; $tmpout .= $itoa64[($value >> 18) & 0x3f]; }while ($i < $count); $output .= $tmpout; return $output; } 2.)修改原有的isValidHash(),加入判斷利用salt位置傳遞的hash值是否為osc v.2,並比對由GenPasswordHash()產生的v.2 hash是否正確 public function isValidHash($password, $hash) { $this->explodePasswordHash($hash); foreach ($this->getPasswordVersion() as $hashVersion) { // $password = $this->hash($this->getPasswordSalt() . $password, $hashVersion); //----- 20191109 DV ------- //--- check if RO Site 2nd password hash ($P$D... 33 digit)->(P$D... 32 digit) $tmpsalt=$this->getPasswordSalt(); if($hashVersion==0 && substr($tmpsalt,0,3)=='P$D'){ //--- make hash by salt $tmpsalt="$".$tmpsalt; //--- check if password OK with SQL hash($ + P$D..) if($this->GenPasswordHash($password,$tmpsalt)==$tmpsalt){ //--- set password -> generated hash $password=$tmpsalt; } } else{ $password=$this->hash($tmpsalt.$password,$hashVersion); } //----- } return Security::compareStrings( $password, $this->getPasswordHash() ); } magento2 核心密碼比對程式 01.)D:/Temp-Downloads/AWS/8pm-zip/vendor/zendframework/zend-crypt/src/Utils.php -> public static function compareStrings($expected, $actual) -> 逐ord()比對產生Hash vs SQLHash -> return true 02.)D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/framework/Encryption/Helper/Security.php -> public static function compareStrings($expected, $actual) -> by pass call (01) -> return true 03.)D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/framework/Encryption/Encryptor.php -> public function isValidHash($password, $hash) ->展開SQLHash成passwordHashMap array,根據不同$hashVersion()+getPasswordSalt()+password產生Hash -> 比對SQLHash+getPasswordHash() call (02) -> return true 03-1.)D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/zendframework1/library/Zend/Crypt.php -> public static function hash($algorithm, $data, $binaryOutput = false)實際產生Hash for (03) 研究用only /var/www/html/magento8pm/vendor/magento/module-customer/Model/AccountManagement.php cd /var/www/html/magento8pm/vendor/magento/module-customer/Model/ mv AccountManagement.php-x AccountManagement.php wget http://61.220.188.84/dv-2019-tmp/AccountManagement.php wget http://61.220.188.84/dv-2019-tmp/PasswordHash.x ---------------- https://blog.csdn.net/chengfei112233/article/details/6939144/ 密码生成方式 > 随机产生一个salt 并将salt和password相加 > 进行了count次md5 然后和encode64的hash数值累加 > 最后得到一个以$P$开头的密码,这个密码每次产生的结果都不一样C:/Users/dv-10/Desktop/catalog/includes/classes/passwordhash.php 系统:MD5(WordPress) 例子:$P$B123456780BhGFYSlUqGyE6ErKErL01 说明:WordPress使用的md5 长度:34个字符 描述:$P$表示加密类型,然后跟着一位字符,经常是字符‘B’,后面是8位salt,后面是就是hash 加密算法:8192次md5循环加密 -> 2的(8+5=13)次方=8192 --- 20191107 遷移舊RO站客戶資料 -> 一元站 ========================================================================================================================= /var/www/html/magento8pm/app/design/frontend/Zou/demo/ x->joe /usr/local/apache/conf/httpd.conf x->joe /etc/apache2/apache2.conf ServerName www.buck4u.com DocumentRoot /var/www/html/magento8pm/pub/ SetEnv MAGE_MODE "developer" ServerName www.buck4all.com DocumentRoot /var/www/html/magento8pm/pub/ SetEnv MAGE_MODE "developer" SetEnv MAGE_RUN_CODE "demo3" SetEnv MAGE_RUN_TYPE "website" service apache2 restart /etc/apache2/sites-enabled/mag-wg-1.conf /etc/apache2/sites-available/mag-wg-1.conf /etc/apache2/sites-enabled/000-default.conf /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/buck4u.conf /etc/apache2/sites-enabled/buck4u.conf ls -al /etc/apache2/sites-enabled/ 是 /etc/apache2/sites-available / buck4u.conf 這個, documentroot 對應 magento8pm/pub , 那個 setenv 才有效 在 magneto8pm 和 magneto8pm/pub 下 都各有一個 .htaccess 裡面有指定 index.php RO站後台入口 https://www.purewaterclub.com/catalog/admin/ admin + admin1234! D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-downloadable/view/frontend/layout/downloadable_customer_products.xml D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-customer/Model/Customer/Attribute/Backend/Password.php D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/framework/Exception/InvalidEmailOrPasswordException.php D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-customer/Model/AuthenticationInterface.php D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-captcha/Observer/CheckUserLoginObserver.php D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-captcha/Test/Unit/Observer/CheckUserEditObserverTest.php D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-captcha/Test/Unit/Observer/CheckUserLoginObserverTest.php D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-customer/Controller/Account/EditPost.php D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-customer/Model/Authentication.php D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-customer/Observer/CustomerLoginSuccessObserver.php D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/framework/Encryption/Encryptor.php D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/framework/Encryption/PasswordHash.php D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/framework/Encryption/CheckOscPswHash.php ---------------------------------------------------------------------------------------------------------- D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-theme/view/frontend/layout/default.xml D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-theme/view/frontend/page_layout/1column.xml D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-theme/view/base/page_layout/empty.xml D:/Temp-Downloads/AWS/8pm-zip/app/design/frontend/Venustheme/8pm/Ves_Themesettings/layout/default.xml D:/Temp-Downloads/AWS/8pm-zip/app/code/Ves/Themesettings/Block/Html/Header.php D:/Temp-Downloads/AWS/8pm-zip/app/design/frontend/Venustheme/8pm/Ves_Themesettings/templates/header/default.phtml D:/Temp-Downloads/AWS/8pm-zip/app/code/Ves/Themesettings/Block/Html/Links.php D:/Temp-Downloads/AWS/8pm-zip/app/design/frontend/Venustheme/8pm/Ves_Themesettings/templates/html/links.phtml D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/framework/View/Element/Html/Links.php D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/framework/View/Element/Template.php D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/framework/View/Element/AbstractBlock.php D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-catalog/view/frontend/layout/default.xml D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-catalog/view/frontend/templates/product/compare/link.phtml D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-theme/Block/Html/Header.php D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-theme/view/frontend/templates/html/header.phtml D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-customer/view/frontend/layout/default.xml D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-wishlist/view/frontend/layout/default.xml D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-wishlist/view/frontend/templates/link.phtml table: catalog_product_entity_text entity_id: item id -> attribute_id, value table: eav_attribute attribute_id: 72 -> attribute_code: description attribute_id: 73 -> attribute_code: short_description attribute_id: 82 -> attribute_code: meta_keyword Atomic Endurance Running Tee (V-neck)-S-Blue 修改footer2 背景顏色: 8pm Footer 2 -> Design Elemment -> Prefix Class -> 去掉footer2(黑變白) 修改shipping: STORES -> Configuration -> SALES -> Shipping Methods 修改payment: STORES -> Configuration -> SALES -> Payment Methods 修改注冊設定: Configuration -> CUSTOMERS -> Customer Configuration -> Password Options -> Number of Required Character Classes: 3 -> 2 (20191026) Element Builder -> 8pm categories -> Design -> (Widget) Categories Info And Subcategories -> Edit 首頁目錄element改長寬: (Toggle Code) limit_subcategory=/"3/" limit=/"3/" columns=/"3/" 首頁目錄element改目錄類別: (Toggle Code) catsid=/"20,11,13,3/" /var/www/html/magento8pm/pub/media/catalog/category/cat6.jpg ----------------------- Ref ----------------------------------------------- app/code/Magento/Xxx/ vendor/magento/module-xxx/ app/design/frontend/Venustheme/8pm/ vendor/magento/theme-frontend-blank/ Base layouts: /view/frontend/layout /view/frontend/page_layout Theme layouts: /_/layout /_/page_layout All layouts: /var/www/html/magento8pm/vendor/magento/module-theme/view/frontend/layouts.xml ----------------------- OK Used ----------------------------------------- /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/theme.xml A.) Base Page configuration: /var/www/html/magento8pm/vendor/magento/module-theme/view/frontend/layout/default.xml A-1.) Base Page layout: -> container page-header /var/www/html/magento8pm/vendor/magento/module-theme/view/frontend/page_layout/3columns.xml A-2.) -> 2columns-right -> 1column -> -> container page-wrapper /var/www/html/magento8pm/vendor/magento/module- theme/view/base/page_layout/empty.xml B.) Main Customer (Ves) Theme Page configuration: /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Themesettings/layout/default.xml B-1.) -> header.container :: block ves_header -> /var/www/html/magento8pm/app/code/Ves/Themesettings/Block/Html/ Header.php B-1-1.) protected $_template = 'header/default.phtml' -> /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Themesettings/templates/header/default.phtml B-2.) -> header.container -> block ves_header -> block top.links -> /var/www/html/magento8pm/app/code/Ves/Themesettings/Block/Html/Links.php B-2-1.) $this->setTemplate("Ves_Themesettings::html/links.phtml"); -> /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Themesettings/templates/html/links.phtml B-2-2.) class Links extends /Magento/Framework/View/Element/Html/Links -> class Links extends /Magento/Framework/View/Element/Template -> class Template extends AbstractBlock C.) Sub Customer (Ves) Theme Page configuration: -> 自動搜vendor/magento下的所有module-XXX/view/frontend/layout/default.xml -> module-catalog , module-customer, module-wishlist C-1.) module-catalog -> -> /var/www/html/magento8pm/vendor/magento/module-catalog/view/frontend/layout/default.xml C-2.) module-theme (原本為"-",被C-1 也是"-",插隊變第二) -> -> /var/www/html/magento8pm/vendor/magento/module-customer/view/frontend/layout/default.xml C-3.) module-customer -> -> /var/www/html/magento8pm/vendor/magento/module-customer/view/frontend/layout/default.xml C-4.) module- wishlist -> -> /var/www/html/magento8pm/vendor/magento/module-wishlist/view/frontend/layout/default.xml C-5.) register-link -> module- wishlist -> C-6.) authorization-link -> module- wishlist -> -> /var/www/html/magento8pm/vendor/magento/framework/View/Element/Html/Links.php /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Themesettings/templates/html/links.phtml ------------------------- X-- No Used --------------------------------------------------- /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Magento_Theme/page_layout/1column.xml -> /var/www/html/magento8pm/vendor/magento/module-theme/view/base/page_layout/empty.xml ----------------------------------------------------- (20190914) 社区 https://magento.stackexchange.com https://stackoverflow.com/ https://community.magento.com/ cd /var/www/html/magento8pm/ home page -> app/design/frontend/Venustheme/8pm/Ves_Themesettings/templates/html/links.phtml -> vendor/magento/framework/View/Element/Html/Links.php index.php -> app/bootstrap.php -> app/autoload.php -> vender/autoload.php -> vender/composer/autoloadreal.php 首頁: class Links extends /Magento/Framework/View/Element/Html/Links -> /var/www/html/magento8pm/vendor/magento/framework/View/Element/Html/Links.php class Links extends /Magento/Framework/View/Element/Template -> class Template extends AbstractBlock -> abstract class AbstractBlock extends /Magento/Framework/DataObject implements BlockInterface -> /var/www/html/magento8pm/vendor/magento/module-catalog/view/frontend/layout/default.xml /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Themesettings/templates/header/default.phtml getChildHtml('top_links') ?> --> D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-theme/view/frontend 首頁右上角人頭下拉選單: 選項 catalog.compare.link 定義頁 -> D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-catalog/view/frontend/layout/default.xml -> D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-catalog/view/frontend/templates/product/compare/link.phtml 去掉 Compare Products -> mv /var/www/html/magento8pm/vendor/magento/module-catalog/view/frontend/templates/product/compare/link.phtml 選項 wish-list-link 定義頁 -> D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-wishlist/view/frontend/layout/default.xml -> D:/Temp-Downloads/AWS/8pm-zip/vendor/magento/module-wishlist/view/frontend/templates/link.phtml 去掉My Wish List -> mv /var/www/html/magento8pm/vendor/magento/module-wishlist/view/frontend/templates/link.phtml 改LOGO: http://www.buck4u.com/magento8pm/pub/media/logo/default/logo.png ls /var/www/html/magento8pm/pub/media/logo/default/logo.png cd /var/www/html/magento8pm/pub/media/logo/default/ wget http://61.220.188.84/dv-2019-tmp/logo.png 去掉首頁 panel tool: VES THEMESETTINGS -> General Settings -> Panel Tool -> Enable -> No 去掉 element->8pm-product 彈出 compare, review, price, addtocart: show_compare=/"1/" -> show_compare=/"0/" show_review=/"1/" -> show_review=/"0/" show_price=/"1/" -> show_price=/"0/" show_addtocart=/"1/" -> show_addtocart=/"0/" /Magento/Framework/Exception/LocalizedException cd /var/www/html/magento8pm/ (20191026) AWS 啟動實例 IP-> 3.17.62.14 -> 18.218.158.219 phpmyadmin: http://18.218.158.219/awsadmin/ root + revres88 (20190909) puttygen.exe + dv-1.pem -> dv-1.ppk ssh: putty + IP + dv-1.ppk -> sudo su phpmyadmin: http://3.17.62.14/awsadmin/ root + revres88 手工改mysql data base: magento8pm megamenu -> table ves_megamenu_item 首頁header -> Main Website -> Search Box, Language, Currency(取消) /etc/apache2/sites-enabled/mag-wg-1.conf <- 網址 mag.wg-1.com 的設定檔, 實際設定檔在 /etc/apache2/sites-abvilable/mag-wg-1.conf /etc/apache2/sites-enabled/000-default.conf <- 預設網址 www.buck4u.com 的設定檔, 指向到 /var/www/html 目錄 之前給的STORE網址, 直接連就已經是錯誤, mag.wg-1.com 我改指向到 /var/www/html/mag-wg-1/ 目錄, 再由 index.html 去指向到 測試網址 /etc/apache2/apache2.conf 和 /var/www/html/magento8pm/.htaccess 都已經復原 apache 的 conf /etc/apache2/apache2.conf DocumentRoot /home/httpd/www/magento8pm ServerName www.buck4u.com AllowOverride all Order allow,deny Allow from all ErrorLog /var/log/httpd/error_log CustomLog /var/log/httpd/access_log common DocumentRoot /home/httpd/www/magento8pm ServerName mag.wg-1.com AllowOverride all Order allow,deny Allow from all ErrorLog /var/log/httpd/error_log CustomLog /var/log/httpd/access_log common 兩個網址都對應到同一個目錄 joe /var/www/html/magento8pm/.htaccess RewriteEngine On RewriteCond %{HTTP_HOST} ^www/.buck4u/.com$ RewriteRule ^(.*)$ dn1.html [L] RewriteCond %{HTTP_HOST} ^mag/.wg-1/.com$ RewriteRule ^(.*)$ dn2.html [L] dn1.html 改 www.buck4u.com 要對應的PHP網頁 dn2.html 改 mag.wg-1.com 要對應的PHP網頁, 或直接整個完整網址, 例 http://www.buck4u.com/magento8pm/stores/store/switch/___store/demo2