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
cd /var/www/html/magento8pm/app/design/frontend/Venustheme/
cp 8pm 7pm -r
joe registration.php
joe theme.xml
/var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Themesettings/templates/header/default.phtml
增加Ves header的layout: copy default.phtml default-b4u.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的名稱
/var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Themesettings/layout/default.xml
--- 20200121
=========================================================================================================================
Bug->Ves ->同一page只會出現第一種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無效
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
--- 20200120
=========================================================================================================================
cd /var/www/html/magento8pm
/usr/bin/php bin/magento indexer:reindex
改ves megamenu alias
cd /var/www/html/magento8pm
app/code/Ves/Megamenu/view/frontend/layout/default.xml
menu-top
catagary背景圖:bg_brc.jpg
menu背景圖:
Add class “menu-bg” to insert background in dropdown, change background in the path: app/design/frontend/Venustheme/8pm/web/images/menu-bg.jpg
--- 20200119
=========================================================================================================================
缺主圖片
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
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
=========================================================================================================================
Marketing->Cart Price Rule->滿$50包郵->Conditions
->Subtotal equals or greater than 50
借用屬性 Eco Collect 成為 Free Shipping(false:可以排除不包郵的item)
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
=========================================================================================================================
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
=========================================================================================================================
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)
/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.)