Ebay.com (co.uk, co.de, co.fr etc)
Amazon.com (co.uk, co.de, co.fr etc)
Aliexpress.com
Etsy.com
Focalprice.com
Flipkart.com
Banggood.com
iOffer.com
Walmart.com
Sunsky-online.com
Snapdeal.com
Sportsdirect.com
6pm.com
Buyincoins.com
Tinydeal.com
Superdeal.com
Sammydress.com
Souq.com
Lelong.com.my
Lazada.com
Shopclues.com
Gearbest.com
ali-1688->data-feature-json
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'
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 ) ) )
update `oc_product_option_ext` set image='catalog/cn/pdd161535231081/210312002.jpg' WHERE `option_list` like '453%';
update `oc_product_option_ext` set image='catalog/cn/pdd161535231081/210312003.jpg' WHERE `option_list` like '454%';
update `oc_product_option_ext` set image='catalog/cn/pdd161535231081/210312004.jpg' WHERE `option_list` like '455%';
update `oc_product_option_ext` set image='catalog/cn/pdd161535231081/210312005.jpg' WHERE `option_list` like '456%';
ok-completed
https://mobile.yangkeduo.com/goods.html?goods_id=204691077436&page_from=23&pxq_secret_key=52E7QF663BIFXIHTTSNRFPAHYBZNVWE4VMOVRBW6IOSPD4XS45DQ&share_uin=XF7PSVJD6RNGN62V7F4TOQUYSU_GEXDA&refer_share_id=96cb4b7f7e3e4002b73bdafd706e4323&refer_share_uid=5366106146&refer_share_channel=message&refer_share_form=card#pushState
UPDATE oc_product_source SET product_id = '55', date_collect = NOW() WHERE product_source_id = '181'
crontab -e
* * * * * /usr/bin/php /var/www/html/dv/dv-1-1.php
* * * * * sleep 30; /usr/bin/php /var/www/html/dv/dv-1-1.php
pclose(popen('php dv-1.php 60 &', 'r'));
必需關閉 echo 否則停止
/var/spool/cron/crontabs/root
service cron restart
service cron status
mysqli_result Object ( [current_field] => 0 [field_count] => 11 [lengths] => [num_rows] => 0 [type] => 0 )
https://mobile.yangkeduo.com/mall_quality_assurance.html?_t_timestamp=comm_share_landing&goods_id=56972644840&_oak_share_type=6&_oak_share_url=https%3A%2F%2Ft00img.yangkeduo.com%2Fgoods%2Fimages%2F2019-10-23%2F67509b0a-e274-403d-8c8e-424b90418999.jpg&refer_share_id=0b792476fa464bc6ab879dd994fecad0&refer_share_uid=5366106146&refer_share_channel=copy_link&refer_share_form=text
chrome-extension://id/xx.html
pdd197744894766
181->20210315
store.initDataObj.oakData.review.detailList
F0 9F 8C B9
2018 new bridal headdress Korean style sen hair band red hair accessories fairy hair hoop toast dress wedding accessories
153
Notice : getimagesize(): Error reading from /var/www/html/image/catalog/cn/pdd213354956/210316006.jpg! in /var/www/html/catalog/model/tool/image.php on line 14 Notice : getimagesize(): Error reading from /var/www/html/image/catalog/cn/pdd213354956/210316006.jpg! in /var/www/html/catalog/model/tool/image.php on line 14
210316030.jpg
https://omsproductionimg.yangkeduo.com/images/2017-11-19/bab6ed5e505d7c4692c430300c470acb.jpeg
https://oc.wg-1.com/index.php?route=product/product&product_id=250
SELECT * FROM oc_product_to_category WHERE
https://img.pddpic.com/mms-material-img/2020-08-03/bf2e1b5a-9634-4e6c-a245-6c10a71f2c47.jpg.a.jpeg
SELECT * FROM oc_product_option_ext poe LEFT JOIN oc_product p ON poe.product_id=p.product_id WHERE p.status=1
UPDATE oc_product_option_ext poe LEFT JOIN oc_product p ON poe.product_id=p.product_id SET poe.weight=p.weight WHERE p.status=1
210566159871
https://mobile.yangkeduo.com/search_result.html?search_key=%E7%A7%8B%E5%AD%A3%E5%AE%BD%E6%9D%BE%E5%81%87%E4%B8%A4%E4%BB%B6%E9%95%BF%E8%A2%96%E8%BF%90%E5%8A%A8T%E6%81%A4%E7%94%B7%E5%A3%AB%E8%B7%91%E6%AD%A5%E7%AF%AE%E7%90%83%E8%AE%AD%E7%BB%83
store.listData.list[0].goodsID=101508669875
store.listData.list[0].goodsName="【畅销榜前30名】运动长袖男弹力连帽健身衣篮球跑步训练潮流T恤速干大码宽松上衣"
store.listData.list[0].image_url="https://t00img.yangkeduo.com/goods/images/2020-04-15/57e60657-8730-4af4-96a9-4673d3cfd4f5.jpg"
store.listData.list[0].price=39.9
猜你喜歡
補捉漏圖未成功圖
補rawdata
SQL水平拆表
home-feature
{"name":"home-feature","product_name":"","product":["108","1224","178","2383"],"limit":"4","width":"200","height":"200","status":"1"}
You may also like / Also Bought / Products related to this item recently views recently Bought Also You may also like / Also Bought / Products related to this item recently views recently Bought Also Bought
Cross Selling Bundle module consist of 4 types product :
1. Also bought (Customers who bought this also bought)
When a user viewed any product at product page, it looks into the database and search if any other user has purchased other products along with the currently viewed product.
If yes, it suggests those products to the customer. This type only work at product page.
2. Also viewed (Customers who viewed this also viewed)
When a user viewed any product at product page it looks into the database and search if any other user has viewed other products along with the currently viewed product.
If yes, it suggests those products to the customer. This type only work at product page.
3. Recently purchased
This type will shows recently purchased products by customer.
4. Recently viewed
This type will shows recently viewed products by customer.
oc_setting -> key -> theme_default_product_description_length 100->0
SELECT p.product_id FROM oc_product p LEFT JOIN oc_product_to_store p2s ON (p.product_id = p2s.product_id) WHERE p.price<=6 AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' GROUP BY p.product_id ORDER BY p.date_modified DESC LIMIT 4
{"price":{"16563-16564":10.83,"16563-16565":10.83,"16563-16566":10.83,"16563-16567":10.83,"16563-16568":10.83,"16563-16569":10.83,"16563-16570":10.83,"16563-16571":10.83,"16572-16564":10.83,"16572-16565":10.83,"16572-16566":10.83,"16572-16567":10.83,"16572-16568":10.83,"16572-16569":10.83,"16572-16570":10.83,"16572-16571":10.83,"16573-16564":10.83,"16573-16565":10.83,"16573-16566":10.83,"16573-16567":10.83,"16573-16568":10.83,"16573-16569":10.83,"16573-16570":10.83,"16573-16571":10.83,"16574-16564":10.83,"16574-16565":10.83,"16574-16566":10.83,"16574-16567":10.83,"16574-16568":10.83,"16574-16569":10.83,"16574-16570":10.83,"16574-16571":10.83,"16575-16564":10.83,"16575-16565":10.83,"16575-16566":10.83,"16575-16567":10.83,"16575-16568":10.83,"16575-16569":10.83,"16575-16570":10.83,"16575-16571":10.83},
"weight":{"16563-16564":280,"16563-16565":280,"16563-16566":280,"16563-16567":280,"16563-16568":280,"16563-16569":280,"16563-16570":280,"16563-16571":280,"16572-16564":280,"16572-16565":280,"16572-16566":280,"16572-16567":280,"16572-16568":280,"16572-16569":280,"16572-16570":280,"16572-16571":280,"16573-16564":280,"16573-16565":280,"16573-16566":280,"16573-16567":280,"16573-16568":280,"16573-16569":280,"16573-16570":280,"16573-16571":280,"16574-16564":280,"16574-16565":280,"16574-16566":280,"16574-16567":280,"16574-16568":280,"16574-16569":280,"16574-16570":280,"16574-16571":280,"16575-16564":280,"16575-16565":280,"16575-16566":280,"16575-16567":280,"16575-16568":280,"16575-16569":280,"16575-16570":280,"16575-16571":280},
"image":{"16563-16564":"https://img.wg-1.com/image/catalog/cn/210322/pdd10895270608/012.jpg","16563-16565":"https://t00img.yangkeduo.com/goods/images/2019-06-01/83cabaee-81b4-43f2-a09a-012acc20b04b.jpg","16563-16566":"https://t00img.yangkeduo.com/goods/images/2019-06-01/83cabaee-81b4-43f2-a09a-012acc20b04b.jpg","16563-16567":"https://t00img.yangkeduo.com/goods/images/2019-06-01/83cabaee-81b4-43f2-a09a-012acc20b04b.jpg","16563-16568":"https://t00img.yangkeduo.com/goods/images/2019-06-01/83cabaee-81b4-43f2-a09a-012acc20b04b.jpg","16563-16569":"https://t00img.yangkeduo.com/goods/images/2019-06-01/83cabaee-81b4-43f2-a09a-012acc20b04b.jpg","16563-16570":"https://t00img.yangkeduo.com/goods/images/2019-06-01/83cabaee-81b4-43f2-a09a-012acc20b04b.jpg","16563-16571":"https://t00img.yangkeduo.com/goods/images/2019-06-01/83cabaee-81b4-43f2-a09a-012acc20b04b.jpg","16572-16564":"https://img.wg-1.com/image/catalog/cn/210322/pdd10895270608/013.jpg","16572-16565":"https://t00img.yangkeduo.com/goods/images/2019-06-01/5427d6f4-b2fa-41fd-94a5-6d61f0541949.jpg","16572-16566":"https://t00img.yangkeduo.com/goods/images/2019-06-01/5427d6f4-b2fa-41fd-94a5-6d61f0541949.jpg","16572-16567":"https://t00img.yangkeduo.com/goods/images/2019-06-01/5427d6f4-b2fa-41fd-94a5-6d61f0541949.jpg","16572-16568":"https://t00img.yangkeduo.com/goods/images/2019-06-01/5427d6f4-b2fa-41fd-94a5-6d61f0541949.jpg","16572-16569":"https://t00img.yangkeduo.com/goods/images/2019-06-01/5427d6f4-b2fa-41fd-94a5-6d61f0541949.jpg","16572-16570":"https://t00img.yangkeduo.com/goods/images/2019-06-01/5427d6f4-b2fa-41fd-94a5-6d61f0541949.jpg","16572-16571":"https://t00img.yangkeduo.com/goods/images/2019-06-01/5427d6f4-b2fa-41fd-94a5-6d61f0541949.jpg","16573-16564":"https://img.wg-1.com/image/catalog/cn/210322/pdd10895270608/014.jpg","16573-16565":"https://t00img.yangkeduo.com/goods/images/2019-06-01/ea38e220-adcb-4feb-848e-bcfc26eee81a.jpg","16573-16566":"https://t00img.yangkeduo.com/goods/images/2019-06-01/ea38e220-adcb-4feb-848e-bcfc26eee81a.jpg","16573-16567":"https://t00img.yangkeduo.com/goods/images/2019-06-01/ea38e220-adcb-4feb-848e-bcfc26eee81a.jpg","16573-16568":"https://t00img.yangkeduo.com/goods/images/2019-06-01/ea38e220-adcb-4feb-848e-bcfc26eee81a.jpg","16573-16569":"https://t00img.yangkeduo.com/goods/images/2019-06-01/ea38e220-adcb-4feb-848e-bcfc26eee81a.jpg","16573-16570":"https://t00img.yangkeduo.com/goods/images/2019-06-01/ea38e220-adcb-4feb-848e-bcfc26eee81a.jpg","16573-16571":"https://t00img.yangkeduo.com/goods/images/2019-06-01/ea38e220-adcb-4feb-848e-bcfc26eee81a.jpg","16574-16564":"https://img.wg-1.com/image/catalog/cn/210322/pdd10895270608/015.jpg","16574-16565":"https://t00img.yangkeduo.com/goods/images/2019-06-01/0ebab6e1-87e7-4556-9d92-f1f43724c64e.jpg","16574-16566":"https://t00img.yangkeduo.com/goods/images/2019-06-01/0ebab6e1-87e7-4556-9d92-f1f43724c64e.jpg","16574-16567":"https://t00img.yangkeduo.com/goods/images/2019-06-01/0ebab6e1-87e7-4556-9d92-f1f43724c64e.jpg","16574-16568":"https://t00img.yangkeduo.com/goods/images/2019-06-01/0ebab6e1-87e7-4556-9d92-f1f43724c64e.jpg","16574-16569":"https://t00img.yangkeduo.com/goods/images/2019-06-01/0ebab6e1-87e7-4556-9d92-f1f43724c64e.jpg","16574-16570":"https://t00img.yangkeduo.com/goods/images/2019-06-01/0ebab6e1-87e7-4556-9d92-f1f43724c64e.jpg","16574-16571":"https://t00img.yangkeduo.com/goods/images/2019-06-01/0ebab6e1-87e7-4556-9d92-f1f43724c64e.jpg","16575-16564":"https://img.wg-1.com/image/catalog/cn/210322/pdd10895270608/016.jpg","16575-16565":"https://t00img.yangkeduo.com/goods/images/2019-06-01/480fa453-0a5e-4d2d-a435-5409691f6968.jpg","16575-16566":"https://t00img.yangkeduo.com/goods/images/2019-06-01/480fa453-0a5e-4d2d-a435-5409691f6968.jpg","16575-16567":"https://t00img.yangkeduo.com/goods/images/2019-06-01/480fa453-0a5e-4d2d-a435-5409691f6968.jpg","16575-16568":"https://t00img.yangkeduo.com/goods/images/2019-06-01/480fa453-0a5e-4d2d-a435-5409691f6968.jpg","16575-16569":"https://t00img.yangkeduo.com/goods/images/2019-06-01/480fa453-0a5e-4d2d-a435-5409691f6968.jpg","16575-16570":"https://t00img.yangkeduo.com/goods/images/2019-06-01/480fa453-0a5e-4d2d-a435-5409691f6968.jpg","16575-16571":"https://t00img.yangkeduo.com/goods/images/2019-06-01/480fa453-0a5e-4d2d-a435-5409691f6968.jpg"}}
{"en":{
"10674":{"name":"款式","value":{"62945":"透明底闪粉","62948":"果冻米金双碟","62949":"紫火焰","62950":"渐变金箔","62951":"裸粉透明底闪粉","62952":"Jennie粉火焰","62953":"银闪星月","62954":"银法式","62955":"白珠光圆","62956":"金粉蝴蝶","62957":"芭蕾粉金蝴蝶","62958":"长圆粉灰","62959":"巧克力星月","62960":"涂鸦","62961":"透明银闪","62962":"波点黑心","62963":"波点红心","62964":"磨砂爱心","62965":"红小爱心","62966":"绿星月","62967":"黑渐变星月","62968":"网红橘渐变","62969":"深绿晕染","62970":"简约白线","62971":"黑短磨砂","62972":"草莓波点","62973":"深蓝磨砂方","62974":"双紫磨砂跳方","62975":"黄橘磨砂跳方"}},
"10675":{"name":"套餐","value":{"62946":"收藏送果冻胶+指甲挫+胶水+酒精棉","62947":"送60粒果冻胶+胶水+搓条+其他"}}},
"cn":{
"10674":{"name":"款式","value":{"62945":"透明底闪粉","62948":"果冻米金双碟","62949":"紫火焰","62950":"渐变金箔","62951":"裸粉透明底闪粉","62952":"Jennie粉火焰","62953":"银闪星月","62954":"银法式","62955":"白珠光圆","62956":"金粉蝴蝶","62957":"芭蕾粉金蝴蝶","62958":"长圆粉灰","62959":"巧克力星月","62960":"涂鸦","62961":"透明银闪","62962":"波点黑心","62963":"波点红心","62964":"磨砂爱心","62965":"红小爱心","62966":"绿星月","62967":"黑渐变星月","62968":"网红橘渐变","62969":"深绿晕染","62970":"简约白线","62971":"黑短磨砂","62972":"草莓波点","62973":"深蓝磨砂方","62974":"双紫磨砂跳方","62975":"黄橘磨砂跳方"}},
"10675":{"name":"套餐","value":{"62946":"收藏送果冻胶+指甲挫+胶水+酒精棉","62947":"送60粒果冻胶+胶水+搓条+其他"}}}
{"en":{
"2276":{"name":"Color Classification","value":{"16563":"Khaki","16572":"Pink","16573":"purple","16574":"green","16575":"blue"}},
"2277":{"name":"size","value":{"16564":"S","16565":"M","16566":"L","16567":"XL","16568":"2XL","16569":"3XL","16570":"4XL","16571":"5XL"}}},
"cn":{
"2276":{"name":"颜色分类","value":{"16563":"卡其色","16572":"粉红色","16573":"紫色","16574":"绿色","16575":"蓝色"}},
"2277":{"name":"尺码","value":{"16564":"S","16565":"M","16566":"L","16567":"XL","16568":"2XL","16569":"3XL","16570":"4XL","16571":"5XL"}}}}
{"price":{"129":6.41,"130":6.54,"131":6.47,"132":6.2,"133":6.63,"134":6.34,"135":6.27,"136":6.63,"137":6.7,"138":5.69,"139":5.01,"140":5,"141":4.98,"142":4.97,"143":4.74,"144":4.72,"145":6.2,"146":6.13,"147":6.05,"148":5.98,"149":5.91,"150":5.84,"151":6.24,"152":6.23,"153":6.17,"154":4.26,"155":4.29,"156":4.28,"157":4.31,"158":5.67,"159":5.66,"160":5.64,"161":5.63,"162":5.62,"163":5.6,"164":5.59,"165":5.57,"166":6.44,"167":6.46,"168":4.96,"169":1.49},
"weight":{"129":25,"130":25,"131":25,"132":25,"133":25,"134":25,"135":25,"136":25,"137":25,"138":25,"139":25,"140":25,"141":25,"142":25,"143":25,"144":25,"145":25,"146":25,"147":25,"148":25,"149":25,"150":25,"151":25,"152":25,"153":25,"154":25,"155":25,"156":25,"157":25,"158":25,"159":25,"160":25,"161":25,"162":25,"163":25,"164":25,"165":25,"166":25,"167":25,"168":25,"169":25},
"image":{"129":"catalog/cn/210315/pdd186714170184/020.jpg","130":"catalog/cn/210315/pdd186714170184/021.jpg","131":"catalog/cn/210315/pdd186714170184/022.jpg","132":"catalog/cn/210315/pdd186714170184/023.jpg","133":"catalog/cn/210315/pdd186714170184/024.jpg","134":"catalog/cn/210315/pdd186714170184/025.jpg","135":"catalog/cn/210315/pdd186714170184/026.jpg","136":"catalog/cn/210315/pdd186714170184/027.jpg","137":"catalog/cn/210315/pdd186714170184/028.jpg","138":"catalog/cn/210315/pdd186714170184/029.jpg","139":"catalog/cn/210315/pdd186714170184/011.jpg","140":"catalog/cn/210315/pdd186714170184/030.jpg","141":"catalog/cn/210315/pdd186714170184/031.jpg","142":"catalog/cn/210315/pdd186714170184/032.jpg","143":"catalog/cn/210315/pdd186714170184/033.jpg","144":"catalog/cn/210315/pdd186714170184/034.jpg","145":"catalog/cn/210315/pdd186714170184/035.jpg","146":"catalog/cn/210315/pdd186714170184/014.jpg","147":"catalog/cn/210315/pdd186714170184/036.jpg","148":"catalog/cn/210315/pdd186714170184/037.jpg","149":"catalog/cn/210315/pdd186714170184/016.jpg","150":"catalog/cn/210315/pdd186714170184/038.jpg","151":"catalog/cn/210315/pdd186714170184/018.jpg","152":"catalog/cn/210315/pdd186714170184/017.jpg","153":"catalog/cn/210315/pdd186714170184/039.jpg","154":"catalog/cn/210315/pdd186714170184/040.jpg","155":"catalog/cn/210315/pdd186714170184/041.jpg","156":"catalog/cn/210315/pdd186714170184/012.jpg","157":"catalog/cn/210315/pdd186714170184/042.jpg","158":"catalog/cn/210315/pdd186714170184/043.jpg","159":"catalog/cn/210315/pdd186714170184/044.jpg","160":"catalog/cn/210315/pdd186714170184/015.jpg","161":"catalog/cn/210315/pdd186714170184/045.jpg","162":"catalog/cn/210315/pdd186714170184/046.jpg","163":"catalog/cn/210315/pdd186714170184/047.jpg","164":"catalog/cn/210315/pdd186714170184/048.jpg","165":"catalog/cn/210315/pdd186714170184/049.jpg","166":"catalog/cn/210315/pdd186714170184/013.jpg","167":"catalog/cn/210315/pdd186714170184/050.jpg","168":"catalog/cn/210315/pdd186714170184/051.jpg","169":"catalog/cn/210315/pdd186714170184/052.jpg"}}
oc_product_source_curl
pdd99653571566->101534
$tmpsql="UPDATE oc_product_source SET product_id = '7086', date_collect = NOW() WHERE product_source_id = '6657'
\b Backspace (ascii code 08)
\f Form feed (ascii code 0C)
\n New line
\r Carriage return
\t Tab
\" Double quote
\\ Backslash character
\u followed by four-hex-digits
{
"en":{"11098":{"name":"Style","value":{"79236":"Geometric deer ornaments-black","79237":"Geometric deer ornaments-white","79238":"Black standing deer","79239":"White sitting deer","79240":"Black and white pair of deer","79241":"Golden pair of deer","79242":"36 lights round ball tree light","79243":"72 leaf tree light","79244":"Iron frame flower pot-orange","79245":"Iron frame flowerpot-natural yellow","79246":"Iron frame flowerpot-royal blue","79247":"U-shaped bracket photo frame-4 inch gold","79248":"U-shaped bracket photo frame-4 inch gold plating","79249":"U-shaped bracket photo frame-6 inch gold plating","79250":"U-shaped bracket photo frame-7 inch gold","79251":"Square Antlers Photo Frame-6\" Gold","79252":"Home Decoration Combo 1","79253":"Home Decoration Combo 2","79254":"Home decoration combination 3","79255":"Home decoration combination 4","79256":"Home decoration combination 5","79257":"Home decoration combination 6","79258":"Home decoration combination 7","79259":"Home decoration combination 9","79260":"Home Decoration Combo 10","79261":"Home decoration combination 11","79262":"Simulation vase flower arrangement 2","79263":"Simulation vase flower arrangement 3","79264":"Simulation vase flower arrangement 4","79265":"Simulation vase flower arrangement 5"}}},
"cn":{"11098":{"name":"款式","value":{"79236":"几何鹿摆件-黑色","79237":"几何鹿摆件-白色","79238":"黑色站鹿","79239":"白色坐鹿","79240":"黑白对鹿","79241":"金色对鹿","79242":"36灯圆球款小树灯","79243":"72灯树叶款小树灯","79244":"铁架花盆-橘红","79245":"铁架花盆-土黄","79246":"铁架花盆-宝蓝","79247":"U型支架相框-4寸金色","79248":"U型支架相框-4寸金色电镀款","79249":"U型支架相框-6寸金色电镀款","79250":"U型支架相框-7寸金色","79251":"方形鹿角相框-6寸金色","79252":"家居装饰组合1","79253":"家居装饰组合2","79254":"家居装饰组合3","79255":"家居装饰组合4","79256":"家居装饰组合5","79257":"家居装饰组合6","79258":"家居装饰组合7","79259":"家居装饰组合9","79260":"家居装饰组合10","79261":"家居装饰组合11","79262":"仿真花瓶花艺组合2","79263":"仿真花瓶花艺组合3","79264":"仿真花瓶花艺组合4","79265":"仿真花瓶花艺组合5"}}}}
20210402 19:50 aws reboot 18.217.214.174
20210402 20:00 aws reboot 18.217.214.174
20210403 19:27 aws reboot 18.217.214.174
20210404 13:50 aws reboot 18.217.214.174
20210404 23:27 aws reboot 18.217.214.174
20210407 22:42 aws reboot 18.217.214.174
232052
=========================================================================================================================
dv.php -> 總入口 -> 上傳下載頁面
dv-1.php -> 匯入 -> 將拼多多商品頁采集到已保存在 ko 的 json 轉進 db 產生 product 等資料 + 根據 json 采集所有圖片保存在 ko 對應的商品目錄下
dv-1-1.php -> 采圖列表 -> 由 tp-1-1 調用後根據 db curl 未采集資料表產生 json 列表 + 接收 tp-1-1 上傳列表 json 後轉進 db 更新 curl 資料表
tp-1-1.php -> 采圖 curl-> 由 crx 調用後向 dv-1-1 下載采集圖片列表 json 開始采集並重命名圖片在台北 ko 後回傳列表給 dv-1-1
dv-2.php -> 翻譯 -> 將 wg-1 商品頁由 crx 采集並上傳的英文翻譯 json 轉進 db 更新商品中文名稱,說明,規格,評論等資料轉為英文
dv-2-1.php -> 翻譯列表 -> 根據 oc_product_description 英文說明未翻譯的商品產生列表 json 給 crx 使用
dv-3.php -> 抓拼多多 -> 將 crx 分批上傳采集到拼多多商品頁的 json 保存在 ko 對應的商品目錄下 + 為所有需采集圖片去重產生 db curl 資料表
dv-4.php -> 找貨上傳 -> 將 editer 上傳的拼多多商品頁 url, 重量存入 db
dv-4-1.php -> 抓拼多多列表 ->根據 oc_product_source 未采集的商品產生列表 json 給 crx 使用
dv-5.php -> x圖片編輯 -> 接收 editer 上傳的圖片編輯列表, 重量等存入 db 後返回該商品的圖片編輯資料列表 json 給 wg-1 商品頁
dv-6.php -> x下載分類包 -> 產生圖片加分類目錄的 zip 以供下載使用
dv-6-1.php -> x上傳分類包 -> 接收上傳圖片加分類目錄的 zip 解壓後根據圖片所在的分類目錄更新 oc_product_to_category 的資料
dv-6-2.php -> 上傳分類 csv -> 接收上傳分類目錄的 csv 後更新 oc_product_to_category 的資料
dv-7.php -> 可編緝重量圖頁 -> 根據產品編號產生50個商品的圖片+基本資料+選項等可編輯列表網頁 + 接收 post 上傳的非標,重量資料更新 oc_product_option_ext
dv-7-1.php -> 連續產品圖頁 -> 根據產品編號產生50個商品的圖片+基本資料列表網頁
--- 20210320-0331 DV php 系列
=========================================================================================================================
1.) db->oc_depot_ext
db->oc_order_status
100 -> Unpaid
101 -> Will ship to Depot
105 -> Shipped to Depot
110 -> Arrived in Depot
--- 20210407 opencart-3.0.3.6 新增 checkout depot 照片查看
=========================================================================================================================
1.) JSON.stringify(a)
//轉雙引號 " -> \" 不轉單引號,反斜,斜
2.) JSON.parse(s)
//單反斜無效 反解單反斜加單號 \' 雙反斜加雙反斜,雙引號 \\\\ \\"
3.) json_decode($s,true)
//單反斜,Tab錯誤 反解反斜加反斜,單,雙引號 \\ \' \"
4.) json_encode($a,JSON_UNESCAPED_UNICODE)
//加 JSON_UNESCAPED_UNICODE 保留中文不轉
//轉斜,反斜,單,雙引號,Tab \/ // /' /" /t 反解反斜加反斜,單引號 \\ \' 不反解反斜加斜,雙引號 \/ \"
5.) $db->escape($s)
//mysqli->connection->real_escape_string
//轉反斜,單,雙引號 // /' /" 不轉斜,Tab
6.) joe /var/www/html/dv-1.php ->
//第一次產生資料不用 json_encode 直接將 string 存入 db 前轉反斜,Tab 否則 json_decode 會錯誤
str_replace(["\\","\t"],["\\\\"," "],$s);
7.) joe /var/www/html/dv-2.php ->
//翻譯後是 array 需逃脫中文,斜線轉義的 json_encode 才能更新 db ,因為 json_encode 轉義斜線, json_decode 不解斜線
json_encode($a,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
--- 20210404 SQL json 特殊字符處理
=========================================================================================================================
1.) joe /etc/mysql/mysql.conf.d/mysqld.cnf
//修改 sort buffer ->
sort_buffer_size = 256000000
//新增 slow log
slow_query_log = 1
slow_query_log_file = /var/log/mysql/mysql-slow.log
long_query_time = 2
log-queries-not-using-indexes
// error log
log_error = /var/log/mysql/error.log
//重啟 mysql
systemctl restart mysql
systemctl restart apache2
2.) DELETE oc_product_ext.* FROM oc_product_ext LEFT JOIN oc_product ON oc_product_ext.product_id=oc_product.product_id WHERE sku IS NULL
//刪除左表必須加 左表.*
3.) mysqldump -u root -p oc_work > oc_work-20210406.sql + Frevres88!
//資料在 /var/lib/mysql -> mysqldump 備份 db->oc_work
4.) mysql -u root -p oc_work < oc_work-20210406.sql + revres88
//將備份 sql 還原
--- 20210402 mysql 設置
=========================================================================================================================
啟用新域名 www.willgetone.com
1.) cp html html-20210331-oc-wg1
//複制整個目錄
2.) 申請 www.willgetone.com SSL 證書上傳至相對位置
3.) /etc/apache2/www.willgetone.conf ->
ServerName www.willgetone.com
DocumentRoot /var/www/html
//新增 apache2 虛擬主機設定文件
cp /etc/apache2/sites-available/cn.wg1.conf /etc/apache2/sites-available/www.willgetone.conf
ln -s /etc/apache2/sites-available/www.willgetone.conf /etc/apache2/sites-enabled/www.willgetone.conf
4.) joe /etc/apache2/sites-available/www.willgetone.ssl.conf ->
DocumentRoot /var/www/html
ServerName www.willgetone.com
SSLCertificateFile /etc/ssl/certs/www.willgetone.com.crt
SSLCertificateKeyFile /etc/ssl/private/www.willgetone.com_key.key
//新增 apache2 SSL 設定文件
cp /etc/apache2/sites-available/cn.wg1.ssl.conf /etc/apache2/sites-available/www.willgetone.com.crt
ln -s /etc/apache2/sites-available/www.willgetone.ssl.conf /etc/apache2/sites-enabled/www.willgetone.ssl.conf
apachectl configtest
a2enmod ssl
systemctl restart apache2
5.) joe /var/www/html/config.php
//修改所有相關路徑 oc.wg-1.com -> www.willgetone.com
HTTP_SERVER, HTTPS_SERVER
6.) joe /var/www/html/admin/config.php
//修改所有相關路徑 oc.wg-1.com -> www.willgetone.com
HTTP_SERVER, HTTPS_SERVER
7.) joe /var/www/html/catalog/model/localisation/language.php
//新增判斷非 cn.wg-1.com 的訪問排除中文語言選項
if(substr($_SERVER['SERVER_NAME'],0,11)!='cn.wg-1.com'){
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "language WHERE code<>'zh-cn' AND status = '1' ORDER BY sort_order, name");
8.) joe /var/www/html/catalog/controller/common/header.php
//判斷傳參是否來源為 cn.wg-1.com 的訪問
$data['cnurl'] = substr($_SERVER['SERVER_NAME'],0,2)=='cn';
9.) joe /var/www/html/catalog/view/theme/default/template/common/header.twig
(/var/www/storage/modification/catalog/view/theme/default/template/common/header.twig) 已全刪 modification upload module
//修改 header 的電話為中文 editer 入口
{% if cnurl %}
{% endif %}
--- 20210401 啟用新域名 www.willgetone.com
=========================================================================================================================
修改 product option 資料結構
1.) oc_product -> option_value ->
//以 json 格式存放 product_option_id + 中英文名稱和 product_option_value_id + 中英文名稱
{"en":{
"2276":{"name":"Color Classification","value":{"16563":"Khaki","16572":"Pink","16573":"purple","16574":"green","16575":"blue"}},
"2277":{"name":"size","value":{"16564":"S","16565":"M","16566":"L","16567":"XL","16568":"2XL","16569":"3XL","16570":"4XL","16571":"5XL"}}},
"cn":{
"2276":{"name":"颜色分类","value":{"16563":"卡其色","16572":"粉红色","16573":"紫色","16574":"绿色","16575":"蓝色"}},
"2277":{"name":"尺码","value":{"16564":"S","16565":"M","16566":"L","16567":"XL","16568":"2XL","16569":"3XL","16570":"4XL","16571":"5XL"}}}}
2.) oc_product -> option_ext ->
//以 json 格式存放所有選項組合的 product_option_value_id + 價格-rmb + 重量-g + 圖片 (product_id=1699)
{"price":{"16563-16564":10.83,"16563-16565":10.83,"16563-16566":10.83,"16563-16567":10.83,"16563-16568":10.83,"16563-16569":10.83,"16563-16570":10.83,"16563-16571":10.83,"16572-16564":10.83,"16572-16565":10.83,"16572-16566":10.83,"16572-16567":10.83,"16572-16568":10.83,"16572-16569":10.83,"16572-16570":10.83,"16572-16571":10.83,"16573-16564":10.83,"16573-16565":10.83,"16573-16566":10.83,"16573-16567":10.83,"16573-16568":10.83,"16573-16569":10.83,"16573-16570":10.83,"16573-16571":10.83,"16574-16564":10.83,"16574-16565":10.83,"16574-16566":10.83,"16574-16567":10.83,"16574-16568":10.83,"16574-16569":10.83,"16574-16570":10.83,"16574-16571":10.83,"16575-16564":10.83,"16575-16565":10.83,"16575-16566":10.83,"16575-16567":10.83,"16575-16568":10.83,"16575-16569":10.83,"16575-16570":10.83,"16575-16571":10.83},
"weight":{"16563-16564":280,"16563-16565":280,"16563-16566":280,"16563-16567":280,"16563-16568":280,"16563-16569":280,"16563-16570":280,"16563-16571":280,"16572-16564":280,"16572-16565":280,"16572-16566":280,"16572-16567":280,"16572-16568":280,"16572-16569":280,"16572-16570":280,"16572-16571":280,"16573-16564":280,"16573-16565":280,"16573-16566":280,"16573-16567":280,"16573-16568":280,"16573-16569":280,"16573-16570":280,"16573-16571":280,"16574-16564":280,"16574-16565":280,"16574-16566":280,"16574-16567":280,"16574-16568":280,"16574-16569":280,"16574-16570":280,"16574-16571":280,"16575-16564":280,"16575-16565":280,"16575-16566":280,"16575-16567":280,"16575-16568":280,"16575-16569":280,"16575-16570":280,"16575-16571":280},
"image":{"16563-16564":"https://img.wg-1.com/image/catalog/cn/210322/pdd10895270608/012.jpg","16563-16565":"https://t00img.yangkeduo.com/goods/images/2019-06-01/83cabaee-81b4-43f2-a09a-012acc20b04b.jpg","16563-16566":"https://t00img.yangkeduo.com/goods/images/2019-06-01/83cabaee-81b4-43f2-a09a-012acc20b04b.jpg","16563-16567":"https://t00img.yangkeduo.com/goods/images/2019-06-01/83cabaee-81b4-43f2-a09a-012acc20b04b.jpg","16563-16568":"https://t00img.yangkeduo.com/goods/images/2019-06-01/83cabaee-81b4-43f2-a09a-012acc20b04b.jpg","16563-16569":"https://t00img.yangkeduo.com/goods/images/2019-06-01/83cabaee-81b4-43f2-a09a-012acc20b04b.jpg","16563-16570":"https://t00img.yangkeduo.com/goods/images/2019-06-01/83cabaee-81b4-43f2-a09a-012acc20b04b.jpg","16563-16571":"https://t00img.yangkeduo.com/goods/images/2019-06-01/83cabaee-81b4-43f2-a09a-012acc20b04b.jpg",
"16572-16564":"https://img.wg-1.com/image/catalog/cn/210322/pdd10895270608/013.jpg","16572-16565":"https://t00img.yangkeduo.com/goods/images/2019-06-01/5427d6f4-b2fa-41fd-94a5-6d61f0541949.jpg","16572-16566":"https://t00img.yangkeduo.com/goods/images/2019-06-01/5427d6f4-b2fa-41fd-94a5-6d61f0541949.jpg","16572-16567":"https://t00img.yangkeduo.com/goods/images/2019-06-01/5427d6f4-b2fa-41fd-94a5-6d61f0541949.jpg","16572-16568":"https://t00img.yangkeduo.com/goods/images/2019-06-01/5427d6f4-b2fa-41fd-94a5-6d61f0541949.jpg","16572-16569":"https://t00img.yangkeduo.com/goods/images/2019-06-01/5427d6f4-b2fa-41fd-94a5-6d61f0541949.jpg","16572-16570":"https://t00img.yangkeduo.com/goods/images/2019-06-01/5427d6f4-b2fa-41fd-94a5-6d61f0541949.jpg","16572-16571":"https://t00img.yangkeduo.com/goods/images/2019-06-01/5427d6f4-b2fa-41fd-94a5-6d61f0541949.jpg","16573-16564":"https://img.wg-1.com/image/catalog/cn/210322/pdd10895270608/014.jpg","16573-16565":"https://t00img.yangkeduo.com/goods/images/2019-06-01/ea38e220-adcb-4feb-848e-bcfc26eee81a.jpg","16573-16566":"https://t00img.yangkeduo.com/goods/images/2019-06-01/ea38e220-adcb-4feb-848e-bcfc26eee81a.jpg","16573-16567":"https://t00img.yangkeduo.com/goods/images/2019-06-01/ea38e220-adcb-4feb-848e-bcfc26eee81a.jpg","16573-16568":"https://t00img.yangkeduo.com/goods/images/2019-06-01/ea38e220-adcb-4feb-848e-bcfc26eee81a.jpg","16573-16569":"https://t00img.yangkeduo.com/goods/images/2019-06-01/ea38e220-adcb-4feb-848e-bcfc26eee81a.jpg","16573-16570":"https://t00img.yangkeduo.com/goods/images/2019-06-01/ea38e220-adcb-4feb-848e-bcfc26eee81a.jpg","16573-16571":"https://t00img.yangkeduo.com/goods/images/2019-06-01/ea38e220-adcb-4feb-848e-bcfc26eee81a.jpg",
"16574-16564":"https://img.wg-1.com/image/catalog/cn/210322/pdd10895270608/015.jpg","16574-16565":"https://t00img.yangkeduo.com/goods/images/2019-06-01/0ebab6e1-87e7-4556-9d92-f1f43724c64e.jpg","16574-16566":"https://t00img.yangkeduo.com/goods/images/2019-06-01/0ebab6e1-87e7-4556-9d92-f1f43724c64e.jpg","16574-16567":"https://t00img.yangkeduo.com/goods/images/2019-06-01/0ebab6e1-87e7-4556-9d92-f1f43724c64e.jpg","16574-16568":"https://t00img.yangkeduo.com/goods/images/2019-06-01/0ebab6e1-87e7-4556-9d92-f1f43724c64e.jpg","16574-16569":"https://t00img.yangkeduo.com/goods/images/2019-06-01/0ebab6e1-87e7-4556-9d92-f1f43724c64e.jpg","16574-16570":"https://t00img.yangkeduo.com/goods/images/2019-06-01/0ebab6e1-87e7-4556-9d92-f1f43724c64e.jpg","16574-16571":"https://t00img.yangkeduo.com/goods/images/2019-06-01/0ebab6e1-87e7-4556-9d92-f1f43724c64e.jpg","16575-16564":"https://img.wg-1.com/image/catalog/cn/210322/pdd10895270608/016.jpg","16575-16565":"https://t00img.yangkeduo.com/goods/images/2019-06-01/480fa453-0a5e-4d2d-a435-5409691f6968.jpg","16575-16566":"https://t00img.yangkeduo.com/goods/images/2019-06-01/480fa453-0a5e-4d2d-a435-5409691f6968.jpg","16575-16567":"https://t00img.yangkeduo.com/goods/images/2019-06-01/480fa453-0a5e-4d2d-a435-5409691f6968.jpg","16575-16568":"https://t00img.yangkeduo.com/goods/images/2019-06-01/480fa453-0a5e-4d2d-a435-5409691f6968.jpg","16575-16569":"https://t00img.yangkeduo.com/goods/images/2019-06-01/480fa453-0a5e-4d2d-a435-5409691f6968.jpg","16575-16570":"https://t00img.yangkeduo.com/goods/images/2019-06-01/480fa453-0a5e-4d2d-a435-5409691f6968.jpg","16575-16571":"https://t00img.yangkeduo.com/goods/images/2019-06-01/480fa453-0a5e-4d2d-a435-5409691f6968.jpg"}}
3.) joe /var/www/html/catalog/model/catalog/product.php
//將產生 price, weight, image json 的程式從 getProduct 中移出單獨為一函數,以免拖垮其他不含 option 的調用
//新增函數 getProductExt($product_id) 讀取 oc_product_ext 的所有 option 相關資料傳參給原調用函數 getProductOptions 的 controller 使用
public function getProductExt($product_id) {
//新增函數 getProductOptionsRequired($product_id) 讀取 oc_product_ext 的 product_option_id 傳參給原調用函數 getProductOptions 的 cart.php 檢查 required 使用
public function getProductOptionsRequired($product_id) {
4.) joe /var/www/html/catalog/controller/product/product.php ->
//修改調用函數 getProductOptions -> getProductExt
$product_info_ext = $this->model_catalog_product->getProductExt($product_id); ...
//foreach ($this->model_catalog_product->getProductOptions($this->request->get['product_id']) as $option) {
foreach ($product_info_ext['product_option_data'] as $option) {
5.) joe /var/www/html/catalog/controller/checkout/cart.php ->
//修改調用函數 getProductOptions -> getProductOptionsRequired
//$product_options = $this->model_catalog_product->getProductOptions($this->request->post['product_id']);
$product_options = $this->model_catalog_product->getProductOptionsRequired($this->request->post['product_id']);
6.) joe /var/www/html/dv/dv-1-2.php
//新增全面轉換原 product_option, option_description, product_option_value, option_value_description, product_option_ext -> oc_product_ext
7.) oc_product_ext_setting
{"product_option_id":10673,"product_option_value_id":62944}
8.) joe /var/www/html/dv/dv-1.php, dv-2.php
//廢用原 option 多層連結結構改用 oc_product_ext 單純 option_value + option_ext json 結構
9.) /var/www/html/admin/model/catalog/product.php, /var/www/html/admin/controller/catalog/product.php
//後台未改 option 相關功能不可用
/var/www/html/library/cart/cart.php -> getDepotitems
--- 20210330 opencart-3.0.3.6 修改 product option 資料結構
=========================================================================================================================
新增瀏覽記錄模塊 recentview
1.) cp /var/www/html/admin/controller/extension/module/onedollar.php -> recentview.php
//複制後台 extension controller + 改 class name(必需要和php名相同) + 改所有變數 onedollar -> recentview
$this->response->setOutput($this->load->view('extension/module/bestseller', $data));
//保留不修改共用 bestseller template 不用新增 template
2.) cp /var/www/html/admin/language/en-gb/extension/module/onedollar.php -> recentview.php
//複制後台語言包 + 改所有常數 onedollar -> recentview(否則後台不會出現 recentview 的名稱)
3.) cp /var/www/html/catalog/controller/extension/module/onedollar.php -> recentview.php
//複制前台 extension model + 改 class name(必需要和php名相同) + 改所有變數 onedollar -> recentview
//保留不修改共用 product_list template 不用新增 template
//修改為調用函數 getRecentViewProducts 取得產品
$results = $this->model_catalog_product->getRecentViewProducts($setting['limit']);
4.) Extensions->Extensions->Modules->recentview->install + Add New + enable
//後台先安裝 extension -> 安裝後 db->oc_extension 自動產生 modules recentview -> 再 Add New + enable
5.) joe /var/www/html/catalog/model/catalog/product.php ->
//新增函數讀取 oc_customer_view 資料並返回產品基本資料
public function getRecentViewProducts($limit, $page=1) {
--- 20210401 opencart-3.0.3.6 新增瀏覽記錄模塊 recentview
=========================================================================================================================
新增 extension module onedollar 模塊
1.) cp /var/www/html/admin/controller/extension/module/bestseller.php -> onedollar.php
//複制後台 extension controller + 改 class name(必需要和php名相同) + 改所有變數 bestseller -> onedollar
$this->response->setOutput($this->load->view('extension/module/bestseller', $data));
//保留不修改共用 bestseller template 不用新增 template
2.) cp /var/www/html/admin/language/en-gb/extension/module/bestseller.php -> onedollar.php
//複制後台語言包 + 改所有常數 bestseller -> onedollar(否則後台不會出現 onedollar 的名稱)
3.) cp /var/www/html/catalog/controlle/extension/module/bestseller.php -> onedollar.php
//複制前台 extension model + 改 class name(必需要和php名相同) + 改所有變數 bestseller -> onedollar
//修改為共用 product_list template 不用另外新增 template
//新增函數修改原調用 banner list 為直接調用函數 getOneDollarProducts 取得產品
//$results = $this->model_design_banner->getBanner($setting['banner_id']);
$results = $this->model_catalog_product->getOneDollarProducts($setting['limit']);
4.) cp /var/www/html/catalog/view/theme/default/template/extension/module/bestseller.twig -> product_list.twig
//新增共用 product_list template 提供給原 bestseller, latest 和後續的首頁模塊共用
//修改 title 為共用 + See All + href
5.) Extensions->Extensions->Modules->onedollar->install + Add New + enable
//後台先安裝 extension -> 安裝後 db->oc_extension 自動產生 modules onedollar -> 再 Add New + enable
6.) joe /var/www/html/catalog/model/catalog/product.php ->
//新增函數讀取 oc_product 資料並返回產品基本資料
public function getOndollarProducts($limit, $page=1) {
--- 20210329 opencart-3.0.3.6 首頁新增一元特區
=========================================================================================================================
oc_setting -> key -> config_logo -> value
//直接放在 https://oc.wg-1.com/image/wg1-logo.jpg
--- 20210329 opencart-3.0.3.6 商店 LOGO
=========================================================================================================================
1.) db->customer-view
2.) joe /var/www/html/catalog/model/catalog/product.php ->
//新增寫入 customer-view
public function updateViewed($product_id) { ...
$customer_id=(isset($this->session->data['customer_id']) ? $this->session->data['customer_id'] : 0);
$this->db->query("INSERT INTO " . DB_PREFIX . "customer_view SET customer_id = '" . (int)$customer_id . "', product_id = '" . (int)$product_id . "', date_added = NOW()");
--- 20210329 opencart-3.0.3.6 log customer view
=========================================================================================================================
新增中文站 cn.wg-1.com
1.) cp html html-cn
//複制整個目錄不包括 image/catalog/cn/ 下的圖片
2.) joe /etc/apache2/cn.wg1.conf ->
ServerName cn.wg-1.com
DocumentRoot /var/www/html-cn
//新增 apache2 虛擬主機設定文件
cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/cn.wg1.conf
ln -s /etc/apache2/sites-available/cn.wg1.conf /etc/apache2/sites-enabled/cn.wg1.conf
3.) 申請 cn.wg-1.com SSL 證書上傳至相對位置
4.) joe /etc/apache2/sites-available/cn.wg1.ssl.conf ->
DocumentRoot /var/www/html-cn
ServerName cn.wg-1.com
SSLCertificateFile /etc/ssl/certs/cn.wg-1.com.crt
SSLCertificateKeyFile /etc/ssl/private/cn.wg-1.com_key.key
//新增 apache2 SSL 設定文件
cp /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-available/cn.wg1.ssl.conf
ln -s /etc/apache2/sites-available/cn.wg1.ssl.conf /etc/apache2/sites-enabled/cn.wg1.ssl.conf
apachectl configtest
a2enmod ssl
systemctl restart apache2
5.) joe /var/www/html-cn/config.php
//修改所有相關路徑 oc -> cn
HTTP_SERVER, HTTPS_SERVER, DIR_APPLICATION, DIR_SYSTEM, DIR_IMAGE
6.) joe /var/www/html/catalog/model/localisation/language.php
//新增判斷非 cn.wg-1.com 的訪問排除中文語言選項
if(substr($_SERVER['SERVER_NAME'],0,2)!='cn'){
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "language WHERE code<>'zh-cn' AND status = '1' ORDER BY sort_order, name");
7.) joe /var/www/html/catalog/controller/common/header.php
//判斷傳參是否來源為 cn.wg-1.com 的訪問
$data['cnurl'] = substr($_SERVER['SERVER_NAME'],0,2)=='cn';
8.) joe /var/www/html/catalog/view/theme/default/template/common/header.twig
(/var/www/storage/modification/catalog/view/theme/default/template/common/header.twig)已全刪 upload module
//修改 header 的電話為中文 editer 入口
{% if cnurl %}{% endif %}
--- 20210327 新增中文站 cn.wg-1.com
=========================================================================================================================
產品頁主圖改 slideshow 手機屏可滑
新增 extension module slidethumb 模塊
1.) cp /var/www/html/admin/controller/extension/module/slideshow.php -> slidethumb.php
//複制後台 extension controller + 改 class name(必需要和php名相同) + 改所有變數 slideshow -> slidethumb
$this->response->setOutput($this->load->view('extension/module/slideshow', $data));
//保留不修改共用 slideshow template 不用新增 template
2.) cp /var/www/html/admin/language/en-gb/extension/module/slideshow.php -> slidethumb.php
//複制後台語言包 + 改所有常數 slideshow -> slidethumb(否則後台不會出現 slidethumb 的名稱)
3.) cp /var/www/html/catalog/controller/extension/module/slideshow.php -> slidethumb.php
//複制前台 extension model + 改 class name(必需要和php名相同) + 改所有變數 slideshow -> slidethumb
//修改原調用 banner list 為自行從 db 取得 main image + thumb list ->
//$results = $this->model_design_banner->getBanner($setting['banner_id']);
$tmpq = $this->db->query("SELECT * FROM " . DB_PREFIX . "product WHERE product_id = '" . (int)$product_id . "'");
...
$tmpq = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_image WHERE product_id = '" . (int)$product_id . "'");
4.) cp /var/www/html/catalog/view/theme/default/template/extension/module/slideshow.twig -> slidethumb.twig
//複制後台 extension template + 改所有變數 slideshow -> slidethumb
//修改關閉小點+自動播放
pagination: false, autoplay: 0
5.) Extensions->Extensions->Modules->slidethumb->install + Add New + enable
//後台先安裝 extension -> 安裝後 db->oc_extension 自動產生 modules slidethumb -> 再 Add New + enable
6.) Design->Layouts->Product->Content Top->Add Module->Slidethumb SlideThumb
//後台修改產品頁增加 slidethumb module 在產品頁上半部
7.) joe /var/www/html/catalog/view/theme/default/template/product/product.twig
//修改正常屏不出現 slidethumb, 手機屏隱藏主圖+縮略圖出現 slidethumb
.swiper-viewport { display: none; }
@media (max-width: 518px) { .thumbhide { display: none; } .swiper-viewport { display: block; } }
//修改 slidethumb 的 magnificPopup 為 gallery 模式
$('.thumbnails,.swiper-viewport').magnificPopup({
8.) joe /var/www/html/catalog/view/theme/default/template/product/popupop.twig
//刪除導入 content_top, content_bottom
--- 20210326 opencart-3.0.3.6 產品頁主圖改 slideshow 手機屏可滑
=========================================================================================================================
0.) img.wg-1.com 啟用 SSL
1.) joe tp-1-1.php
//開始改 crx 直接調用采集圖片
2.) https://oc.wg-1.com/image/catalog/cn/pdd30655919420/210316014.jpg-> http://img.wg-1.com/image/catalog/cn/210316/pdd30655919420/014.jpg
//將原 aws image 全部搬遷到 tp ko
/home/httpd/www/html-wg1
find /home/httpd/www/html-wg1/ -type f -print | wc -l -> 72906
du -sh -> 6.8G
3.) oc_product, oc_image, oc_product_description, oc_product_option_ext
//轉換原 db image path 相關的所有資料表的 image 格式 pdd+source-id/tmk(ymd)+000.jpg -> tmk(ymd)/pdd+source-id/000.jpg
4.) joe /var/www/html/config.php ->
define('IMAGE_SERVER', 'https://img.wg-1.com/');
5.) joe /var/www/html/admin/config.php ->
define('IMAGE_SERVER', 'https://img.wg-1.com/');
6.) jeo /var/www/html/catalog/model/tool/image.php ->
//取消 resize 所有動作直接返回原圖
public function resize($filename, $width, $height) {
return IMAGE_SERVER . 'image/' . $filename;
7.) joe /var/www/html/catalog/model/catalog/product.php ->
//修改 config_ssl 為 IMAGE_SERVER
$option_list_image.='"'.$tmpret['option_list'].'":"'.(substr($tmpret['image'],0,4)!="http" ? IMAGE_SERVER.'image/' : "").$tmpret['image'].'",';
8.) joe /var/www/html/catalog/view/theme/default/template/product/category.twig
(/var/www/storage/modification/catalog/view/theme/default/template/product/category.twig)
//修改 thumb image css 大小符合外框
.img-responsive { width: 100%; height: 100%; }
admin-1.) jeo /var/www/html/admin/model/tool/image.php ->
//取消 resize 所有動作直接返回原圖
public function resize($filename, $width, $height) {
return IMAGE_SERVER . 'image/' . $filename;
admin-2.) jeo /var/www/html/admin/controller/catalog/product.php ->
//取消判斷是否圖片存在一律取圖
//if (is_file(DIR_IMAGE . $result['image'])) {
$image = $this->model_tool_image->resize($result['image'], 40, 40);
--- 20210323 啟用台北 image KO
=========================================================================================================================
ubuntu@ip-172-31-16-154:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 30G 9.3G 20G 32% /
devtmpfs 486M 0 486M 0% /dev
tmpfs 490M 0 490M 0% /dev/shm
tmpfs 98M 832K 98M 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 490M 0 490M 0% /sys/fs/cgroup
/dev/loop0 33M 33M 0 100% /snap/amazon-ssm-agent/2996
/dev/loop1 34M 34M 0 100% /snap/amazon-ssm-agent/3552
/dev/loop2 100M 100M 0 100% /snap/core/10859
/dev/loop4 56M 56M 0 100% /snap/core18/1944
/dev/loop5 56M 56M 0 100% /snap/core18/1988
/dev/loop6 70M 70M 0 100% /snap/lxd/19188
/dev/loop7 71M 71M 0 100% /snap/lxd/19647
/dev/loop8 100M 100M 0 100% /snap/core/10908
tmpfs 98M 0 98M 0% /run/user/1000
20210322 17:30 SSH 突然斷連不上
19:00 出現 login 但仍連不上
20210323 08:59 reboot
=========================================================================================================================
oc_work -> 141 张表(dv 新增 oc_product_ext, oc_product_option_ext, oc_product_source, oc_product_source_image) 15.8 MB
1,424 oc_option
2,848 oc_option_description
12,420 oc_option_value
24,840 oc_option_value_description
1,397 oc_product
2,482 oc_product_description
1,372 oc_product_ext
9,885 oc_product_image
1,436 oc_product_option
21,245 oc_product_option_ext
12,449 oc_product_option_value
1,702 oc_product_source
1,286 oc_product_to_category
1,241 oc_product_to_store
1,869 oc_review
41,008 find /var/www/html/image/catalog/cn/ -type f -print | wc -l
1,406 find /var/www/html/image/catalog/cn/ -type d -print | wc -l
1,153 find /var/www/html/dv/ -type f -print | wc -l
du -h --max-depth=1 現在目錄大小
df -h 全部大小
--- 20210322 opencart-3.0.3.6 資料數量統計
=========================================================================================================================
1.) joe /var/www/html/catalog/controller/product/vategory.php ->
//父目錄顯示所有子目錄產品
$filter_data = array( ...
'filter_sub_category' => true,
2.) joe /var/www/html/catalog/view/theme/default/template/common/menu.twig ->
//導航欄顯示所有產品移到第一行
- {{ text_all }} {{ category.name }}
3.) joe /var/www/html/catalog/controller/common/menu.php ->
//子目錄依據產品數量排序由大到小
$cat_item_count[] = ($this->config->get('config_product_count') ? $this->model_catalog_product->getTotalProducts($filter_data) : 0);
...
array_multisort($cat_item_count, SORT_DESC, $children_data);
4.) joe /var/www/html/catalog/controller/product/category.php ->
(/var/www/storage/modification/catalog/controller/product/category.php)
$cat_item_count[] = ($this->config->get('config_product_count') ? $this->model_catalog_product->getTotalProducts($filter_data) : 0);
...
array_multisort($cat_item_count, SORT_DESC, $data['categories']);
--- 20210322 opencart-3.0.3.6 修改目錄頁顯示
=========================================================================================================================
1.) php error log
/var/log/apache2/error.log
2.) php 安裝路徑
echo $PATH ->
/usr/bin/php ->
ln /etc/alternatives/php ->
/usr/bin/php8.0
3.) php.ini
find -name php.ini
/etc/php/8.0/apache2/php.ini
/etc/php/8.0/cli/php.ini
703: post_max_size = 8M -> 32M
855: upload_max_filesize = 2M -> 32M
->
systemctl restart apache2
--- 20210320 修改 PHP 相關設置
=========================================================================================================================
1.) db->oc_view->author, text 原 utf8_general_ci -> utf8mb4_unicode_ci
2.) joe /var/www/html/system/library/db/mysqli.php (/var/www/html/dv/dv-mysqli.php)
// $this->connection->set_charset("utf8");
$this->connection->set_charset("utf8mb4");
--- 20210317 修改數據庫表可以保存中文表情特別符號
=========================================================================================================================
joe /var/www/html/catalog/language/zh-cn/zh-cn.php
$_['code'] = 'zh-cn'; // 'cn';
--- 20210316 opencart-3.0.3.6 修改中文簡體語言包無法被 chrome 翻譯識別
=========================================================================================================================
錯誤用法 timer 不生效
setTimeout(getnext(),2*1000);
正確用法
setTimeout(function(){ getnext(); },2*1000);
--- 20210316 javascript timer 用法
=========================================================================================================================
popup->bg
bg->ajax array
3.) bg->tab get ptt page
cs->inject
inject collect->cs
cs ready->bg
bg->ajax sent
bg ret->cs
cs next array->bg
bg ret complete-> 3.)get next ptt page
--- 20210315 chrome extension 連續自動采集拼多多產品資料
=========================================================================================================================
新增所有 option 組合對應不同重量價格圖片
1.) db->oc_product_option_ext -> product_option_ext_id, product_id, option_list, price, weight, image
//新增數據庫表用以存放所有 option 組合的資料
2.) joe /var/www/html/catalog/model/catalog/product.php
//新增讀取表 product_option_ext 的單品所有 option 組合的資料數組
3.) joe /var/www/html/catalog/controller/product/product.php
(/var/www/storage/modification/catalog/controller/product/product.php)
//新增傳參單品所有 option 組合的資料數組給 tamplate
$data['option_list_price'], $data['option_list_weight'], $data['option_list_image']
4.) joe /var/www/html/catalog/view/theme/default/template/product/popupop.twig
//新增3個 json 變量保存下載 option 組合的資料數組
var basepri={{ price }}; var basewgt={{ weight }}; var baseimg="{{ thumb }}";
//新增函數取得目前已選 option 組合 string
function getoplist(){
//新增函數遍歷 option 組合的數組比對取得對應圖片,最大,最小重量單價
function getopdetail(){
//修改原以 mainselect 為主的計算重量單價方式為 -> 直接以已選 option 組合查找對應的資料
$("#puo-mainimg").attr("src",tmpimg);
$("#puo-price").html((tmpminp*tmpv).toFixed(2) + (tmpminp string 用以上傳新增 json 變數 data['option_weight']
function ajaxeditdata (){ $.ajax({ ... data: JSON.stringify(data),
6.) joe /var/www/html/dv/dv-5.php
//修改處理 ajax 上傳資料的方式 $_POST -> file_get_contents('php://input');
$raw=file_get_contents('php://input'); $tmpj=json_decode($raw,true);
//新增處理 ajax 上傳資料的 option_weight 數組更新對應的數據庫表 oc_product_option_ext 包括 option (value=0)可代表全部 option
$db->query("UPDATE " . DB_PREFIX . "product_option_ext SET weight='$tmpw' WHERE product_id='$product_id' AND option_list LIKE '$tmpl'");
--- 20210313 opencart-3.0.3.6 新增所有 option 組合對應不同重量價格圖片
=========================================================================================================================
chrome extension 采集拼多多產品資料
0.) manifest.json
//設置可訪問 https 權限 + 要注入的 js + 注入時機
"permissions": [ ... "https://*/*" ],
"web_accessible_resources": ["js/inject.js","js/jquery-1.8.3.js"],
"content_scripts": [ { "matches": [""], "js": ["js/jquery-1.8.3.js", "js/content-script.js"], "run_at": "document_start" },
1.) inject.js
//新增要注入采集產品頁的 rawData 轉為 string 最前面加上取出的 source_id 後傳給 conten-cript
var sid=a.store.initDataObj.goods.goodsID; ... a=JSON.stringify(a); ... window.postMessage(a, '*');
2.) content-script.js
//設置調用注入函數
document.addEventListener('DOMContentLoaded', function(){ injectCustomJs(); }
//設置注入函數
function injectCustomJs(jsPath) { ... document.body.appendChild(temp);
//新增函數監聽 inject.js 回傳資料
window.addEventListener("message", function(e){ ...
//從回傳資料取出 source_id 並分割為每個大小為 128KB 的分割塊數組等待命令使用,在最後多加上一個完成信號的 string
sid=a.substr(0,tmpi); ... tosend[i]=a.substr(tmpsz*i,tmpsz); ... tosend[i]=sid + "-completed";
//新增函數監聽 popup 或 background 命令
chrome.runtime.onMessage.addListener(function(request, sender, sendResponse){ ...
//必需先回傳空資料以關閉 port, 否則出現 timeout error, 並且堵塞下次通信
sendResponse('');
//根據收到 popup 或 background 的命令,內容和已傳數量判斷是否調用 sendMessage 傳下一個分割塊給 background 跨域上傳資料給 aws
if(request.cmd=="collect-pdd-item"){ ... if(request.msg.indexOf('ok')==0){ ... if(tmpidx<=tmpcnt){
chrome.runtime.sendMessage(tosend[tmpidx], function(response) { });
3.) background.js
//新增函數監聽 content-script 回傳資料
chrome.runtime.onMessage.addListener(function(request, sender, sendResponse){ ...
//必需先回傳空資料以關閉 port, 否則出現 timeout error, 並且堵塞下次通信
sendResponse('');
//修改 ajax contentType 為 urlencoded 以避免自動轉換解碼已編好的各種怪符號 7B { %7D } + & sign
contentType: 'application/x-www-form-urlencoded',
//調用 ajax 上傳分割塊 string 給 aws dv-3.php
$.ajax({ url: 'https://oc.wg-1.com/dv/dv-3.php',
//從 aws dv-3.php 收到回覆的信息後調用 sendMessageToContentScript 傳送給 content-script
sendMessageToContentScript({cmd:'collect-pdd-item',msg:html}, function(response){ });
//新增函數 sendMessageToContentScript 將資料傳送給 content-script
function sendMessageToContentScript(message, callback){ ...
4.) joe /var/www/html/dv/dv-3.php
//直接讀取 file_get_contents('php://input'), 不可用 $_POST 會被 & sign 自動轉碼等問題干擾讀取不到正確資料
$raw=file_get_contents('php://input');
//取出帶頭的 source_id 後判斷是否未完成 -> 將分割塊 string append ../tmp/ 暫存文件
$sid=substr($raw,0,strpos($raw,"-")); ... $f1 = fopen($PF,"a"); fwrite($f1,$raw);
//判斷是否完成 -> 將暫存文件移到 ../upf/ -> 取出文件轉為數組 -> 判斷是否為拼多多產品頁 -> 取出 source_id 新增 db->oc_product_source 資料
$tmpj=json_decode($f1[0],true); if(isset($tmpj['store']['initDataObj']['goods']['goodsID'])){ ...
$db->query($tmpsql="INSERT INTO " . DB_PREFIX . "product_source SET source_id = '" . $sid . "', source_from = '" . $source_from . "', collect_id = '" . $cid . "', date_upload = NOW()";
5.) popup.html
//新增采集拼多多商品入口
采集此页商品
6.) popup.js
//新增傳送命令給 content-script 開始采集拼多多商品
$('#pdd_get_item').click(e => { sendMessageToContentScript({cmd:'collect-pdd-item',msg:'ok-start'}, function(response){}); });
--- 20210312 chrome extension 采集拼多多產品資料
=========================================================================================================================
array, json, object 的區別
1.) a['xx']='yy'; 宣告為 new Object() 才能以 json 使用
2.) array key 只可以是數字, a['xx']不是 array
3.) json key 可以有文字
4.) object 包含 json 不是 array
--- 20210311 javascript array, json, object 的區別
=========================================================================================================================
修改全部連結為 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;
//刪除廠牌, 型號, 積分, 庫存狀態
... {{ manufacturer }} ... {{ model }} ... {{ reward }} ... {{ stock }}
//新增估計重量
{% if weight %}- {{ text_weight }}{{ weight_format }}
{% endif %}
//新增拼多多產品說明 css style
pdd_desc ... pdd_desc_value
3.) joe /var/www/html/catalog/language/zh-cn/common/common.php
//新增簡體中文標準共用語言包
4.) joe /var/www/html/catalog/language/zh-cn/common/common.php
//新增英文標準共用語言包
5.) joe /var/www/html/catalog/controller/product/product.php
(debug -> /var/www/storage/modification/catalog/controller/product/product.php)
//新增導入標準共用語言包
$this->load->language('common/common');
//修改所有導入標準共用語言包 controller + model
joe /var/www/html/catalog/controller/checkout/cart.php
joe /var/www/html/catalog/controller/checkout/tabestship.php
joe /var/www/html/catalog/controller/checkout/depotorder.php
joe /var/www/html/catalog/model/extension/total/domestic.php
6.) joe /var/www/html/catalog/view/theme/default/template/product/product.twig
//修改所有 twig 直接使用英文改為 {{ dtx_xxx }}
joe /var/www/html/catalog/view/theme/default/template/product/popupop.twig
joe /var/www/html/catalog/view/theme/default/template/checkout/tabcart.twig
joe /var/www/html/catalog/view/theme/default/template/checkout/tabestship.twig
joe /var/www/html/catalog/view/theme/default/template/checkout/depotorder.twig
--- 20210308 opencart-3.0.3.6 修改產品頁小屏格式 + 使用標準共用語言包
=========================================================================================================================
有道翻譯圖片
(!! 如果文字在圖片上下四周會被忽略不翻譯 !!)
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.) https://freessl.cn/ -> 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
//從 keymanager 將 CA 證書 + 證書 + 私鑰導出 zip 後上傳到網站指定位置
/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
(20210327)
//要預加虛擬服務器,否則以後新增 SSL 會出錯
ServerName oc.wg-1.com
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 (20210309 depotship->getEstShip) 函數上傳選項後回傳新資料 json 更新運費
->$.ajax({ url: 'index.php?route=checkout/tabestship/depotship (20210309 depotship->getEstShip)',
//新增判斷 tab-depot 為空提示
-> The forward depot is empty!
//新增判斷 cart 為空 depot 不為空時直接 active tab-depot
->-
->