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層取在第1,2層都存在對應的最高價 最後才寫入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斤熟牛肚" store.initDataObj.goods.topGallery store.initDataObj.goods.detailGallery.0.url store.initDataObj.goods.goodsProperty store.initDataObj.goods.skus store.initDataObj.goods.skus[0].specs[0].spec_key "颜色分类" store.initDataObj.goods.skus[0].specs[0].spec_value "藏青色 套装 送背心" store.initDataObj.goods.skus[0].specs[1].spec_key "尺码" store.initDataObj.goods.skus[0].specs[1].spec_value "S 建议85-100以内" store.initDataObj.goods.skus[2].defaultQuantity 0 store.initDataObj.goods.skus[0].groupPrice store.initDataObj.goods.skus[0].thumbUrl store.initDataObj.goods.skus[0].weight store.initDataObj.mall.mallId-x store.initDataObj.mall.mallID-x https://img.pddpic.com/mms-material-img/2021-02-23/3d022824-6bce-4006-abad-84c4d89cf97b.jpeg.a.jpeg catalog/cn/pdd_155078611769/210307000.jpg pdd21030801011234 INSERT INTO oc_product_source SET source_id = 'pdd155078611769', source_from = 'pdd', collect_id = 'pdd2103080339143780' 金钱肚新鲜金钱肚蜂窝肚新鲜牛肚子批发清真半成品熟金钱肚包邮 5 Stage Reverse Osmosis System RO Tank Drinking Water Free 1 year Extra 7 Filter INSERT INTO oc_product_source_image SET product_id='79', image='http', status='trans' INSERT INTO oc_product_source_image (product_id, image) SELECT product_id, image FROM oc_product_image WHERE product_id='78' tesseract 210310015.jpg out --psm 0 Tesseract stdClass Object ( [num_rows] => 1 [row] => Array ( [product_source_id] => 2 [source_id] => pdd98305814196 [product_id] => 79 [source_from] => pdd [collect_id] => pdd2103080436373210 ) [rows] => Array ( [0] => Array ( [product_source_id] => 2 [source_id] => pdd98305814196 [product_id] => 79 [source_from] => pdd [collect_id] => pdd2103080436373210 ) ) ) ========================================================================================================================= 修改全部連結為 https joe /var/www/html/system/library/url.php -> // public function link($route, $args = '', $secure = false) { public function link($route, $args = '', $secure = true) { --- 20210310 opencart-3.0.3.6 修改全部連結為 https ========================================================================================================================= 新增產品頁預估運費 1.) joe /var/www/html/catalog/controller/product/product.php -> //新增調用 country model + 預設 country_id $this->load->model('localisation/country'); $data['countries'] = $this->model_localisation_country->getCountries(); ... $data['country_id'] = $this->config->get('config_country_id'); 2.) joe /var/www/html/catalog/view/theme/default/template/product/popupop.twig -> //複制 checkout/tabcart.twig 下拉預估運費整個 panel
...
//複制 checkout/tabcart.twig->function depotship() 修改為 function productship(weight) //修改函數 recalculate() 調用 productship(weight) 時傳參當前產品頁已選規格數量的總重量 //修改函數 productship(weight) 調用 ajax 上傳當前總重量至 checkout/tabestship/getEstShip 取回所有報價 json 並產生下拉區 html 3.) joe /var/www/html/catalog/controller/checkout/tabestship.php -> //修改函數 getEstShip (原為 depotship 改名)產生 session productweight 供 library/cart/cart 使用 $this->session->data['productweight']=round($this->weight->convert($_POST['weight'], $this->config->get('config_weight_class_id'), 2),0); // 5 lb -> 2 g 4.) joe /var/www/html/system/library/cart/cart.php -> //修改函數 getAllWeights 增加產生產品重量 productweight $weights['productweight']=$this->session->data['productweight']; --- 20210309 opencart-3.0.3.6 新增產品頁預估運費 ========================================================================================================================= 修改所有 session selectcart, selectdepot 的判斷和預設 1.) joe /var/www/html/catalog/controller/checkout/cart.php-> 2.) joe /var/www/html/catalog/controller/checkout/checkout.php-> 3.) joe /var/www/html/catalog/controller/checkout/tabsetship.php-> if(isset($this->request->post['selected'])){ $this->session->data['cartselect']=$this->request->post['selected']; } elseif(!isset($this->session->data['cartselect'])){ $this->session->data['cartselect']=array(); } 4.) joe /var/www/html/catalog/controller/checkout/depotcheckout.php-> elseif(!isset($this->session->data['depotselect'])){ 5.) joe /var/www/html/catalog/controller/checkout/tabsetship.php-> public function depotship() (20210309 depotship->getEstShip) { ... elseif(!isset($this->session->data['depotselect'])){ --- 20210308 opencart-3.0.3.6 修改所有 session selectcart, selectdepot 的判斷和預設 ========================================================================================================================= 修改產品頁小屏格式 + 使用標準共用語言包 1.) joe /var/www/html/catalog/view/theme/default/stylesheet/stylesheet.css //面包屑產品名太長超出屏幕 .breadcrumb > li { // 改可換行 .breadcrumb > li:after { //改箭頭大小位置 2.) joe /var/www/html/catalog/view/theme/default/template/product/product.twig //小屏縮略圖太多放不下直接不顯示 @media (max-width: 518px) { .image-additional-row { display: none; //刪除廠牌, 型號, 積分, 庫存狀態