Thursday, July 18, 2013

การพิมพ์ชื่อไฟล์ใน folder

ใช้ cmd ไปยัง folder นั้น
แล้วพิมพ์คำสั่ง Dir /b > c:listname.txt
เช่น
c:\>cd xxxfolder
c:\xxxfolder>dir /b > listname.txt

ดูรายชื่อใน list
c:\xxxfloder>type listname.txt

name1.......jpg
name2......txt
name3......xls

Wednesday, July 17, 2013

รวมข้อมูลในโพลเดอร์

เปิด CMD Prompt แล้ว รัน copy C:\Users\Administrator\Documents\iMacros\Downloads\*.csv C:\all.csv มันจะทำการรวมทุกรายการเข้าเป็นไฟล์เดียว แล้วก็ค่อยเปิดด้วย excel ดูครับ

Tuesday, July 16, 2013

การกำหนดค่าเริ่มต้นให้ Magento Connect

To avoid warning message :
Warning: Your Magento folder does not have sufficient write permissions. 
If you wish to proceed downloading Magento packages online, please set all Magento folders to have writable permission for the web server user (example: apache) or set up FTP Connection on the Magento Connect Manager Settings tab.

We have to set like this

To ftp to a root install the settings in magento connect should be:
FTP Host: ftp://yourstiename.com 
FTP Login: yourftplogin 
FTP Password: yourftppass 
Installation Path: /public_html/
note: do not change dir access to 777 like alot of places say

Set file permissions for magento installation

Files & directories that must be writeable are:
  • - file: magento/var/.htaccess
  • - directory: magento/app/etc
  • - directory: magento/var
  • - all the directories under: magento/media
If you are using FTP, set the permissions of each to 777 or check read/write/execute for owner, user and group. If you are using SSH, use the following commands:
chmod o+var var/.htaccess app/etc
chmod 
-R o+w media
But actually it should be
chmod o+w -R var var/.htaccess app/etc
The contents in the 'var' directory must be writable as well, otherwise you get this error.

Thursday, July 11, 2013

add Home link in Main Menu

1
[Root folder]\app\design\frontend\base\default\template\page\html\topmenu.phtml
Just change the below coding
?
1
2
3
4
5
6
7
8
<?php $_menu = $this->getHtml('level-top') ?>
<?php if($_menu): ?>
<div class="nav-container">
    <ul id="nav">
        <?php echo $_menu ?>
    </ul>
</div>
<?php endif ?>
to
?
1
2
3
4
5
6
7
8
9
10
<?php $_menu = $this->getHtml('level-top') ?>
<?php if($_menu): ?>
<div class="nav-container">
    <ul id="nav">
        <?php $_anyActive = false; foreach ($this->getStoreCategories() as $_category) { $_anyActive = $_anyActive || $this->isCategoryActive($_category); } ?>
         <li class="home level0 level-top"><a class="level-top" href="<?php echo $this->getUrl('')?>"><span><?php echo $this->__('Home') ?></span></a></li>
        <?php echo $_menu ?>
    </ul>
</div>
<?php endif ?>