Portfolio
My Blog

Setup Nginx on Apache (XAMPP) On Same Server

November 12, 2013Category : IT & Network

Step by Step Overview: Nginx port 80 Apache port 8080 Nginx and Apache share root directory (F:\xampp\htdocs) Nginx catch request as front-end and proxy dynamic content (PHP) to Apache which will be running in the back-end. Install WordPress, Joomla and Drupal for development on localhost and work perfectly. Setup on Windows XP.

Read more
01.

[Magento] Exporting products to CSV results in “Invalid entity model” error

November 11, 2013Category : Code/Web

To resolve it open  app/code/core/Mage/ImportExport/Model/Export/Adapter/Abstract.php around line no. 60 replace  $destination = tempnam(sys_get_temp_dir(), ‘importexport_’); to  $destination = tempnam(Mage::getBaseDir() . ‘/tmp/’ , ‘importexport_’);

Read more
02.

Khắc phục lỗi 100% Disk khó chịu trên Windows 8/8.1

November 10, 2013Category : IT & Network

Có khá nhiều bạn đọc than phiền vì “dính” lỗi 100% Disk khi cài Windows 8 hoặc sau khi nâng cấp lên Windows 8.1. Tình trạng này thường hay xảy ra khi người dùng khởi động máy tính, và khi đang bị, máy sẽ hoạt động rất chậm và dễ gây nóng máy.

Read more
03.

Monitor your Website’s Uptime with Google Docs

October 28, 2013Category : IT & Network

Do you have a website or a blog? Would you like to receive instant alerts as soon as your site goes down or becomes inaccessible to users? Would you like these alerts to arrive in your email inbox or as text messages on your mobile phone or both?  

Read more
04.

[WP] Resize images post

October 14, 2013Category : Code/Web

Add layout.css or style.css in your theme p img { max-width: 500px; height: auto; }

Read more
05.

Reverse Engineering a D-Link Backdoor

October 14, 2013Category : IT & Network

On clip: http://www.youtube.com/watch?v=-pIMVZZRb7Y&t=22s On a whim I downloaded firmware v1.13 for the DIR-100 revA. Binwalk quickly found and extracted a SquashFS file system, and soon I had the firmware’s web server (/bin/webs) loaded into IDA:

Read more
06.

[Magento] Cập nhật nhanh sản phẩm qua file csv

September 25, 2013Category : Code/Web

Giá thành sản phẩm dù được cập nhật thông qua hồ sơ cá nhân nhập khẩu mặc định mặc nhưng điều này là rất chậm và đòi hỏi rất nhiều fields csv (ngoài sku và prices) để có thể cập nhật. Hôm nay tôi sẽ nói chuyện về việc cập nhật giá sản phẩm chỉ..

Read more
07.

[Magento] Xóa thuộc tính

September 24, 2013Category : Code/Web

Bạn muốn xóa một thuộc tính. Nhưng không có tùy chọn xóa trong khi bạn chỉnh sửa các thuộc tính. Điều này có nghĩa rằng thuộc tính là thuộc tính hệ thống. Thuộc tính hệ thống không thể bị xóa. Thuộc tính chỉ người dùng định nghĩa có thể bị xóa.

Read more
08.

[Magento] Hiện số người Online – Hiển thị Customer, Guest, Total online

September 17, 2013Category : Code/Web

Vào app\design\frontend\default\your theme\template\page\html\footer.phtml chèn vào đoạn $visitor_count = Mage::getModel(‘log/visitor_online’)->prepare()->getCollection()->count(); $write = Mage::getSingleton(‘core/resource’)->getConnection(‘core_write’); $readresult=$write->query(“select count(distinct customer_id) as num_visitors from log_visitor_online where last_visit_at > date_sub(now(),INTERVAL 20 MINUTE); “); $row = $readresult->fetch();$n=0;if($row[‘num_visitors’]>0) $n = $row[‘num_visitors’]; echo “Customers online: “.$n; $guest = $visitor_count-$n; echo ” | Guest online: “.$guest.” | “; if(!empty($visitor_count) && $visitor_count > 0){ $cnt = $visitor_count;..

Read more
09.

[Magento] number coulumn in hompage – list.phtml

September 12, 2013Category : Code/Web

Thiết lập giá trị $_columnCount = Ở trên đoạn if($_columnCount == 5){ $imgSize = 180; }elseif($_columnCount == 3){ $imgSize = 245; }

Read more
010.

[Mangento] Limit number product in Homepage list.phtml

September 12, 2013Category : Code/Web

Tìm < ?php $i=0; foreach ($_productCollection as $_product): ?> Thêm vào sau < ?php if($this->getIsHomepage() && $i==10) break; ?>

Read more
011.

[Magento] Listing sub-categories on a category page

September 7, 2013Category : Code/Web

Tutorial này sẽ hướng dẫn các bạn cho hiển thị danh sách sub-category bao gồm ảnh thumbnails và tên của subcategories trong trang category. Bước 1: Đăng nhập vào admin: CMS -> Static Blocks -> Add New Block Bước 2: Gọi block này vào nội dung static block -> save. {{block type=”catalog/navigation” template=”catalog/navigation/subcategory_listing.phtml”}}

Read more
012.

[magento] add thành phố vào db

September 7, 2013Category : Code/Web

DS các thành phố VN INSERT INTO `by_directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (485, ‘VN’, ‘HN’, ‘Hà Nội’), (487, ‘VN’, ‘HCMC’, ‘Tp Hồ Chí Minh’), (488, ‘VN’, ‘HP’, ‘Hải Phòng’), (489, ‘VN’, ‘BR’, ‘Bà Rịa’), (490, ‘VN’, ‘VT’, ‘Vũng Tàu’), (491, ‘VN’, ‘BL’, ‘Bạc Liêu’), (492, ‘VN’, ‘BG’, ‘Bắc Giang’), (493, ‘VN’, ‘BC’, ‘Bắc Cạn’),..

Read more
013.

[Magento] Bỏ phần thập phân tiền tệ

September 4, 2013Category : Code/Web

Step 1: Open file with path: app\code\core\Mage\Directory\Model\Currency.php Step 2: Old line: return $this->formatPrecision($price, 2, $options, $includeContainer, $addBrackets); New line: return $this->formatPrecision($price, 0, $options, $includeContainer, $addBrackets); Step 3: System/Cache management/ Action: 1. [Select all] -> [Refresh] -> [Submit] 2. [Flush Cache Storage]

Read more
014.

[Magento] Show bố cục các file .phtml được gọi ra trên trang hiện tại

September 4, 2013Category : Code/Web

Admin -> System -> Configuration. Chuyển “Current Configuration Scope” thành ’Main Website’ ở góc trên cùng bên trái. Chọn Developer Tab ở góc dưới cùng bên trái. Tìm mục Debug trong nội dung. Ở mục Template Path Hints: chọn Yes (also might want to add Block Names to hints)

Read more
015.

[mangento] Hiện sản phẩm theo nhóm ngoài trang chủ

September 1, 2013Category : Code/Web

Vào CMS / Home page / content chèn code sau: Thời trang nữ   {{block type=”catalog/product_list” template=”catalog/product/list.phtml” category_id=”3″}}

Read more
016.
© Oliver / All rights reserved.
To top