User Tools

Site Tools


php:magento

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

php:magento [2018/08/09 09:24] – [Login/Logout Header link] adminphp:magento [2022/10/29 16:15] (current) – external edit 127.0.0.1
Line 657: Line 657:
 </code> </code>
 ===== Database ===== ===== Database =====
-==== database init ====+==== Database init ====
 <code sql> <code sql>
 SELECT `core_url_rewrite`.* FROM `core_url_rewrite` WHERE (request_path IN ('/', '')) AND (store_id IN(0, 1)) SELECT `core_url_rewrite`.* FROM `core_url_rewrite` WHERE (request_path IN ('/', '')) AND (store_id IN(0, 1))
Line 892: Line 892:
 } }
 </code> </code>
-==== other optimize methods ====+==== Other optimize methods ====
   - re-index data   - re-index data
     * in admin     * in admin
Line 977: Line 977:
   * config base_url: table core_config_data: replace http://localhost to http://shop.babies.vn<code sql>   * config base_url: table core_config_data: replace http://localhost to http://shop.babies.vn<code sql>
 update core_config_data set value = 'http://shop.babies.vn/' where path in ('web/unsecure/base_url', 'web/secure/base_url','admin/dashboard/enable_charts'); update core_config_data set value = 'http://shop.babies.vn/' where path in ('web/unsecure/base_url', 'web/secure/base_url','admin/dashboard/enable_charts');
 +</code>
 +  * update site from https to non https:<code sql>
 +update core_config_data set value='0' where  path in ('web/secure/use_in_frontend', 'web/secure/use_in_adminhtml');
 </code> </code>
   * Clear all caches for activating new config:<code bash>   * Clear all caches for activating new config:<code bash>
Line 1102: Line 1105:
 Go to "Nhóm Sản Phẩm" -> Random Related Products to edit **"Number of items to show"** Go to "Nhóm Sản Phẩm" -> Random Related Products to edit **"Number of items to show"**
  
 +==== Update all categories to isAnchor ====
 +<code sql>UPDATE catalog_category_entity_int 
 +SET    value = 1 
 +WHERE  attribute_id = (SELECT attribute_id 
 +                       FROM   eav_attribute 
 +                       WHERE  attribute_code = 'is_anchor' 
 +                       LIMIT  1); 
 +</code>
 +==== Update Manufacture ====
 +Research Manufacture database <code sql>
 +select attribute_id, entity_type_id, attribute_code from eav_attribute where attribute_code="manufacture";
 +137 4 manufacture
 +
 +select option_id, value from eav_attribute_option_value where value like "%KIM%"
 +40 Kim Home
 +40 Kim Home
 +40 Kim Home
 +
 +select entity_id,NAME from catalog_product_flat_1 where NAME like "%KIM%";
 +1960 GỐI LÕM CARA KIM HOME
 +1955 GỐI ÔM CARA CHO BÉ 60x25cm KIM HOME
 +
 +INSERT INTO `catalog_product_entity_int` (`entity_type_id`,`attribute_id`,`store_id`,`entity_id`,`value`) VALUES ('4', '137', '0', '1960', '40') ON DUPLICATE KEY UPDATE `value` = VALUES(`value`)--only chage parameter 40(manufacture Kim Home) and 1960(Product Name)
 +
 +--list all products have manufacture with name like "%KIM HOME%"
 +select catp.entity_type_id, catp.attribute_id, catp.entity_id, catflat.name, catp.value from `catalog_product_entity_int` as catp  join catalog_product_flat_1 as catflat on catp.`entity_type_id` = 4 and catp.`attribute_id`=137 and catp.`entity_id` = catflat.`entity_id` and catflat.name like "%KIM HOME%";
 +
 +update `catalog_product_entity_int` as catp, catalog_product_flat_1 as catflat set catp.value = 40 where catp.`entity_type_id` = 4 and catp.`attribute_id`=137 and catp.`entity_id` = catflat.`entity_id` and catflat.name like "%KIM HOME%";
 +</code>
 +Update Manufacture from database:
 +  - Step1: Check manufacture information with name "Kim Home" from database<code sql>
 +select option_id, value from eav_attribute_option_value where value like "%KIM%"
 +40 Kim Home
 +40 Kim Home
 +40 Kim Home
 +</code> => option_id = 40
 +  - Step2: Update manufacture for all products with name like "%KIM HOME%" to manufacture value 40(Manufacture "Kim Home")<code sql>
 +update `catalog_product_entity_int` as catp, catalog_product_flat_1 as catflat set catp.value = 40 
 +where catp.`entity_type_id` = 4 and catp.`attribute_id`=137 and catp.`entity_id` = catflat.`entity_id` and catflat.name like "%KIM HOME%";
 +</code>
 +  - Step3: Recheck<code sql>
 +select catp.entity_type_id, catp.attribute_id, catp.entity_id, catflat.name, catp.value from 
 +`catalog_product_entity_int` as catp  join catalog_product_flat_1 as catflat on catp.`entity_type_id` = 4 and catp.`attribute_id`=137 and catp.`entity_id` = catflat.`entity_id` and catflat.name like "%KIM HOME%";
 +</code>
 ==== Magento upgrade ==== ==== Magento upgrade ====
 === upgrade with magento connect === === upgrade with magento connect ===
Line 1136: Line 1183:
 rm -rf /data/www/babyshopvnupdate/var/cache/* rm -rf /data/www/babyshopvnupdate/var/cache/*
 </code> </code>
 +==== Magento Email Configure ====
 +  - Advanced/System/Mail Sending Settings
 +  - General/Store Email Address
 +  - Sales/Sales Emails: Send Order Email Copy To:[email protected], [email protected]
 +  - You must sure that we can run cron command of magento
 ===== Magento and Wordpress ===== ===== Magento and Wordpress =====
 refer: http://www.thetomorrowlab.com/2014/03/integrating-wordpress-magento-build-ecommerce-website/ refer: http://www.thetomorrowlab.com/2014/03/integrating-wordpress-magento-build-ecommerce-website/
Line 1252: Line 1304:
 truncate table catalogsearch_result; truncate table catalogsearch_result;
 </code> </code>
-===== Lazada support ===== 
  
php/magento.1533806665.txt.gz · Last modified: 2022/10/29 16:15 (external edit)