Tuesday, December 21, 2010

How to access Windows XAMPP server online

Besure the firewall is OFF then type your xampp server ip on other computer within the network or you may try it outside your network using port forwarding

How to enable mod_rewrite in ubuntu 9.04 (might work in other version)

n default installion of apache2.2 on debian never enable mod_rewrite default. So you may need to enable .
First install the apache2.2 with this command :
debian user please use “su” before start this process
ubuntu user please use “sudo su” before start this process
apt-get install apache2 (it will install apache 2.2)
now use locate to find if the mod_rewrite.so is availble on your server
updatedb
locate mod_rewrite.so

it will found in “/usr/lib/apache2/modules”
new apache follow some folders to enable and desuable mods.
so now do this:
cd /etc/apache2/mods-enabled
touch rewrite.load
gedit rewrite.load (you may use any editor to edit this file)

now paste this following line
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
Then edit /etc/apache2/sites-available/000-default
Find the following
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all

and change it to

Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all

and finally restart Apache

Monday, November 29, 2010

How to connect to remote MySQL db using terminal

mysql -h hostname -u username -p password

Create MySQL user account and priviledge from the Terminal

  1. Open a terminal and login to MySQL as root:
    mysql --user="root" --password="your_root_password"
  2. Create a new user and password with the following command:
    CREATE USER 'new_username'@'localhost' IDENTIFIED BY 'password_for_new_username';
  3. Assign privileges to the new user, enter the command:
    GRANT ALL ON *.* TO 'new_username'@'localhost';
  4. Exit MySQL interface, enter:
    exit

Tuesday, October 26, 2010

Delete test orders, invoices, shipments, and credit memos in magento

Before you proceed, be sure to back-up your magento db.

Delete test orders:
sales_order.entity_id = sales_order_entity.parent_id
  1. Select sales_order  table
  2. Take note the sales_order.entity_id of the test orders.
  3. Delete all test order rows. You can determine the test orders based on sales_order.increment_id and sales_order.created_at.
  4. Select sales_order_entity table
  5. Delete all rows with sales_order_entity.parent_id equal to sales_order.entity_id

    Delete test invoices:
    • sales_order_entity -  delete rows with entity_type_id = 16
    Delete test shipments:
    • sales_order_entity - delete rows with entity_type_id = 19
    Delete test credit memos:
    • sales_order_entity - delete rows with entity_type_id = 23
    Note: Be sure to double check that you only selected those test orders, test invoices, test shipments, and test credit memos based on increment_id and created_at columns. This process is irreversible.

    Monday, October 25, 2010

    Where to edit "Shipping & Handling" text

    /app/code/core/Mage/Sales/Model/Entity/Quote/Address/Attribute/Frontend/Shipping.php

    /app/code/core/Mage/Sales/Model/Quote/Address/Total/Shipping.php

    Friday, October 1, 2010

    Charice feat Iyaz - "Pyramid" Official Music Video



    Pyramid lyrics
    Songwriters: Alkenas, Johan; Anderson, Lyrica; Jassy, David; Molinder, Niclas; Persson, Joacim;

    Shawty's love is like a pyramid
    We stand together 'til the very end
    There'll never be another love for sure
    Iyaz and Charice let we go

    Stones
    Heavy like the love you've shown
    Solid as the ground we've known
    And I just wanna carry on

    We took it from the bottom up
    And even in a desert storm
    Sturdy as a rock, we hold
    Wishing every moment froze

    Now I just wanna let you know
    Earthquakes can't shake us
    Cyclones can't break us
    Hurricanes can't take away our love

    Pyramid, we built this on a solid rock
    It feels just like it's heaven's touch
    Together at the top
    (At the top, baby)
    Like a pyramid

    And even when the wind is blowing
    We'll never fall, just keep on going
    Forever we will stay
    Like a pyramid

    Like a pyramid, like a pyramid, hey
    Like a pyramid, like a pyramid, hey
    Like a pyramid, like a pyramid, hey

    Cold, never ever when you're close
    We will never let it fold
    A story that was never told
    Something like a mystery

    And every step we took we've grown
    Look how fast the time has flown
    A journey to a place unknown
    We're going down in history

    Earthquakes can't shake us
    Cyclones can't break us
    Hurricanes can't take away our love

    Pyramid, we built this on a solid rock
    It feels just like it's heaven's touch
    Together at the top
    (At the top, baby)
    Like a pyramid

    And even when the wind is blowing
    We'll never fall, just keep it going
    Forever we will stay
    Like a pyramid

    Like a pyramid, girl, l'mma show you
    That I love you so much, that we gonna get through
    Even when it storms, I will never go
    I'mma be the one to keep you safe, hey

    Four walls and love, packin' more than enough
    Holding on to one another, be the cover when it's rough
    Mother nature or disaster
    Won't stop our happy ever after

    Pyramid, keep it going
    (Like a pyramid, like a pyramid)
    Whoa
    (Like a pyramid, like a pyramid)

    Pyramid, we built this on a solid rock
    It feels just like it's heaven's touch
    Together at the top
    (At the top, baby)
    Like a pyramid

    And even when the wind is blowing
    We'll never fall, just keep on going
    Forever we will stay
    Like a pyramid

    We built this on a solid rock
    It feels just like it's heaven's touch
    Together at the top
    (At the top, baby, at the top)
    Like a pyramid

    And even when the wind is blowing
    We'll never fall, just keep it going
    Forever we will stay
    Like a pyramid

    Like a pyramid, like a pyramid, hey
    Like a pyramid, like a pyramid, yeah
    Like a pyramid, like a pyramid, hey

    Thursday, September 30, 2010

    restarting apache in centos

    /etc/rc.d/init.d/httpd restart
    

    Tuesday, September 28, 2010

    How to include files in php from /usr/share/php/ (ubuntu - Hardy Heron)

    How to install Pear in ubuntu
    sudo apt-get install php-pear

    Checking if PEAR works - http://pear.php.net/manual/en/installation.checking.php

    save files to - /usr/share/php

    access the file in your code using:
    require_once 'the_file_stored_in_usr';

    PHP SESSION variables

    file1.php
    session_register('variable1');
    $variable1 = 'sample value';

    file2.php
    session_start();
    echo $variable1; // displays: sample value
    echo $_SESSION['variable1']; // displays: sample value

    note: 
    Be sure that "register_globals = On " in php.ini

    Sunday, September 26, 2010

    database bin files location in ubuntu 8.04

    /var/lib/mysql/

    It is important to note that when exporting/importing large db file or sql it is always best to access it via bin files.

    Friday, September 24, 2010

    How to Install Entrust SSL certificate in cPanel/WHM

    1. Open the WebHost Manager and click Install an SSL Certificate in the SSL/TLS menu.

    2. In the first box, paste in the "Server Certificate" provided by Entrust.

    3. In the second box, paste in your private key which was generated when you created the CSR.

    4. In the third box, paste in both the "Chain Certificate" and then the "Root Certificate".

    5. At the top of the page click "Submit".

    Sunday, September 19, 2010

    Dump just the table structure to a file in MySQL

    mysqldump -d -h localhost -u root -pmypassword databasename > dumpfile.sql

    The only option that is different than creating an entire backup is the -d switch, which tells mysqldump not to output the data.

    Monday, September 13, 2010

    Pyramid (Charice ft. Iyaz)



    copyright from: http://ww9.totalh.com

    Wednesday, August 4, 2010

    network commands for ubuntu

    /etc/init.d/ networking restart   --> restart network


    /etc/password  --> list users

    passwd username   -> change password for user username

    rcp -r foldername username@hostname:/home/username  -> copy folders remotely

    sudo vi /etc/network/interfaces    --> file for assigning static or dynamic ip

    Thursday, July 15, 2010

    Free Webinar Software

    www.yugma.com
    http://www.teamviewer.com

    Monday, July 5, 2010

    MVC Tutorial

    http://www.phpro.org/tutorials/Model-View-Controller-MVC.html

    http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/

    Fatal error: Call to undefined function: curl_init() using lamp in ubuntu

    Install the php5-curl

    sudo apt-get install php5-curl

    Then restart the apache web server

    sudo /etc/init.d/apache2 restart

    Sunday, July 4, 2010

    Enabling Use Of Apache Htaccess Files

    On at least some versions of Ubuntu, .htaccess files will not work by default.

    To make .htaccess files work as expected, you need to edit /etc/apache2/sites-available/default. Look for a section that looks like this:



    <Directory /var/www>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
        # Uncomment this directive is you want to see apache2's
        # default start page (in /apache2-default) when you go to /
        #RedirectMatch ^/$ /apache2-default/
    </Directory>


    You need to modify the line containing AllowOverride None to read AllowOverride All. This tells Apache that it's okay to allow .htaccess files to over-ride previous directives. You must reload Apache before this change will have an effect:

    sudo /etc/init.d/apache2 reload

    For windows, refer to http://www.phpmagicbook.com/allow-htaccess-and-mod-rewrite-in-wamp/

    Password Protect a Directory with .htaccess

    Create a .htaccess file in the directory that you want to protect and add this lines below:

    AuthUserFile /home/riariver/.htpasswd
    AuthName "RiaRiver's Login Area"
    AuthType Basic


    First, you've defined the location of the .htpasswd file. This is the file that contains all the usernames and encrypted passwords for your site.

    The AuthName parameter defines the title of the password entry box when the user logs in. It's not exactly the most important part of the file, but should be defined.
    AuthType tells the server what sort of processing is in use, and "Basic" is the most common and perfectly adequate for almost any purpose.

    If we want to grant access to everyone in the .htpasswd file, we can add this line ("valid-user" is like a keyword, telling apache any user will do):

    require valid-user

    If we want to just grant access to a single user, we can use "user" and their username instead of "valid-user":

    require user riariver

    A normal and complete .htaccess file might look like this:

    AuthUserFile /home/riariver/.htpasswd
    AuthName "RiaRiver's Login Area"
    AuthType Basic

    require user riariver


    An .htpasswd file is made up of a series of lines, one for each valid user. Each line looks like this, with a username, then colon, then encrypted password:

    username:encryptedpassword

    The password encryption is the same as you'll find in PHP's crypt() function. It is not reversible, so you can't find out a password from the encrypted version.

    A user of "riariver" and password of "riariver" might be added with the following line:

    riariver:$1$fuQTAqaj$X9geTeMjTiZaq5axEH/0v

    Each time you run an encryption function like "crypt", you will almost certainly get a different result. This is down to something called "salt", which in the above case was "XO" (first two letters of encrypted password). Different salt will give different encrypted values, and if not explicitly specified will be randomly generated. Don't worry though, the server is quite capable of understanding all this - if you come up with a different value for the encrypted password and replace it, everything would still work fine, as long as the password was the same.

    Once you've created your .htpasswd file, you need to upload it to a safe location on your server, and check you've set the .htaccess file to point to it correctly. Then, upload the .htaccess file to the directory you want to protect and you'll be all set. Simply visit the directory to check it is all working.

    Reference: http://www.addedbytes.com/

    Monday, June 28, 2010

    Create new user and password using linux terminal

    Senario: you're just a sudoer and do not have full access (not a root user)

    Adding new user:
    /usr/sbin/useradd riariver

    Setting up password for new user
    /bin/passwd riariver




    Adding user in sudoer file

    [jdoe@Eng-Lab-004 ~]$ su -
    Password: {user root’s password}
    [root@Eng-Lab-010 ~]# gpasswd -a jdoe wheel
    Adding user jdoe to group wheel
    [root@Eng-Lab-010 ~]#

    Tuesday, June 22, 2010

    Git: You have some suspicious patch lines…

    Monday, December 29th, 2008 at 7:46 pm

    So, I’ve run into this a few times now and it seems like bizarre behaviour to me. While committing, git complains about files which have trailing white space, or spaces followed by a tab. While this may not be the nicest formatting, enforcing this to be fixed before committing a file seems odd.
    It turns out this is being caused by a pre-commit hook. There are two options you can go with to circumvent the issue.
    git commit --no-verify .
    The –no-verify will bypass the pre-commit hooks. This only works on the current commit thought, so you have to add the flag each time you want to commit.
    I’ve found that if you
    cd .git/hooks/
    chmod -x pre-commit
    will disable the pre-commit hooks permanently by removing the executable rights on the file.
    Apparently they are disabled by default in newer releases.
    Hope this helps someone else out as well.

    How to create GIT repository

        Set-up the new bare repo on the server

    • $ ssh myserver.com
            (type your password)

    • $ mkdir /opt/git/myapp.git
    • $ mkdir /opt/git/myapp.git
            (by convention, repo is created inside /opt folder)
            Note: be sure that you own the folder that you have created

    • $ git --bare init    
        Initialized empty Git repository in /var/git/myapp.git
    
    • $ exit


        Add the remote repository to your existing local git repo and push:
        

    • $ cd /var/www/myapp
    • $ git init
            (initializes the repository)

    • $ git add .
            (add those 'unknown' files)

    • $ git commit
            (commit all changes, edit changelog entry)

    • $ git rm --cached
            (ridiculously complicated command to undo, in case you forgot .gitignore)  

    • $ git remote add origin ssh://myserver.com/opt/git/myapp.git
    • $ git remote
    • origin
    • $ cat .git/config
    • [core]
          repositoryformatversion = 0
          filemode = true
          bare = false
          logallrefupdates = true
      [remote "origin"]
          url = ssh://myserver.com/opt/git/myapp.git
          fetch = +refs/heads/*:refs/remotes/origin/*
    • $ git push origin master

        How to pull files from remote server to empty local repo

    • $ cd /var/www/new_myapp
    • $ git init
            (initializes the repository)

    • $ git remote add origin ssh://myserver.com/opt/git/myapp.git
    • $ git remote
    • origin
    • $ cat .git/config
    • [core]
          repositoryformatversion = 0
          filemode = true
          bare = false
          logallrefupdates = true
      [remote "origin"]
          url = ssh://myserver.com/opt/git/myapp.git
          fetch = +refs/heads/*:refs/remotes/origin/*
    • $ git pull origin master

        How to push updates

    • $ cd /var/www/myapp
    • make some changes on the file(s)
    • $ git commit -a -m ""
    • $ git status
            (view the status)
    • $ git log
            (view the logs)
    • $ git push origin master
    • or
    • $ git push
      
        How to pull updates
    • $ cd /var/www/myapp
    • $ git fetch
    • $ git merge origin/master
    • or
    • $ git pull origin master
      
        note: if failed, try to commit first right after you fetch
        $ git diff            # to see the difference between files

        How to add files to remote repo

    • $ git add
    • $ git commit -a -m
    • $ git push origin master

        How to clone files from repo:
    • $ git clone ssh://myserver.com/opt/git/myapp.git

    Monday, June 21, 2010

    Warning: mysqli_connect() [function.mysqli-connect]: (HY000/2000): mysqlnd cannot connect to MySQL 4.1+ using old authentication

    Reset your existing password to a new format.
    This happened because you upgraded your mysql server to 5.x and passwords
    are in 4.x format.
    This will also happen if your database is accessed by
    some outdated clients not supporting the new format.

    Sunday, June 20, 2010

    MYSQL: How to fetch the last inserted row

    $last_date = mysql_query("SELECT date FROM data ORDER BY date DESC LIMIT 1");

    MYSQL: How to fetch a single row

    mysql_fetch_row — Get a result row as an enumerated array

    Example:
    <?php
    $result = mysql_query("SELECT id,email FROM people WHERE id = '42'");
    if (!$result) {
    echo 'Could not run query: ' . mysql_error();
    exit;
    }
    $row = mysql_fetch_row($result);

    echo $row[0]; // 42
    echo $row[1]; // the email value
    ?>

    Wednesday, June 16, 2010

    FreePBX - Cannot receive incoming calls but can make outgoing calls

    Situation : Dynamic IP 
    • Inform bandwidth.com for the new IP
    • Login to FreePBX admin panel
    • Go to "Trunks"
    • Select a trunk to edit
    • Change the externip of both outgoing and incoming settings to its new IP

    How to connect to a remote mySQL database using PHP

    1. You need to access the remote server or get in touch with the remote server's tech support.
    2. Then
      use the_database_name;

      GRANT ALL PRIVILEGES ON
      the_database_name.*
      TO
      'the_user_in_php_code'@'%'
      IDENTIFIED BY
      'password_of_the_user_in_php_code';

      FLUSH PRIVILEGES; 
    3. If you are using phpmyadmin in your remote server, simply login and add a privileged for your host.
      - Select the database from the list
      - Click Privileges
      - Click "Open new phpMyAdmin window" which can be found in the bottom right corner
      - Click "Add a new User" which is located below the list.
      - Fill in the form.

      -- User name: desired_user_name
      -- Host: your_IP_given_by_your_internet_service_provider
      -- Password: desired_password
      -- Re-type: desired_password

      - Click "Go"
      - In the "Database-specific privileges" section select the database for the "Add privileges on the following database:" field.
      - Select "Check All" and Click "Go"
      - Done.
    Note: edit /etc/mysql/my.cnf
    bind-address            = local ip (example: 192.168.2.80)
    restart mysql or restart computer

    Sunday, June 13, 2010

    How to setup multiple sites in magento

    1. Create a new folder and copy index.php and .httaccess file.
    2. Edit index.php to allow it to access the mage.php file.
    3. Create symbolic links for js, media, and skin.
    4. Create a root category for this website.
    5. Setup a website, store, and store view.
    6. Setup Web configuration for the new website
    7. Point the unsecure and secure base url for the new website url

    Monday, June 7, 2010

    How to create symbolic link in linux

    ln -s /path/to/real/file /path/to/non-existant/file

    how to create symbolic links to all contents of a certain folder

    cd /destination_folder
    ln -s /source_folder/* -t .

    Tuesday, June 1, 2010

    how to release/renew ip in linux

    ifconfig eth0 down - release

    ifconfig eth0 up  - renew

    Tuesday, May 18, 2010

    listen to music

    http://listen.grooveshark.com/

    Monday, May 17, 2010

    creating custom fields in simple machines forum

    http://custom.simplemachines.org/mods/index.php?action=parse
    http://www.simplemachines.org/community/index.php?topic=294269.0

    lease of contract

    http://legal-forms.philsite.net/lease-contract.htm

    Wednesday, May 12, 2010

    how to remove duplicate rows in mysql db

    Step 1: Move the non duplicates (unique tuples) into a temporary table
    
    CREATE TABLE new_table as
    SELECT * FROM old_table WHERE 1 GROUP BY [column to remove duplicates by];
    
    
    Step 2: delete delete the old table
    We no longer need the table with all the duplicate entries, so drop it!
    
    DROP TABLE old_table;
    
    
    Step 3: rename the new_table to the name of the old_table
    
    RENAME TABLE new_table TO old_table;
    
    
    
    
    And of course, don't forget to fix your buggy code to stop inserting duplicates!

    Tuesday, May 11, 2010

    upload multiple files to specific Magento products

    - This is possible by creating a custom textarea attribute. Then, create a folder where you will save the files to be linked in the textarea attribute.

    Tuesday, May 4, 2010

    Magento: Display category list on the left column

    http://www.magentocommerce.com/boards/viewthread/4722/#t17585

    Elastix

    http://www.elastix.org/index.php?option=com_openwiki&Itemid=27&id=installation

    Sunday, May 2, 2010

    installing AsteriskNOW

    1. http://www.youtube.com/watch?v=tn9TzJ6eZW0&feature=related   - linux text installation
    2. http://www.youtube.com/watch?v=ONOxNJquatk
    3. http://www.elastix.org/index.php?option=com_openwiki&Itemid=27&id=installation    -    elastix

    Thursday, April 22, 2010

    XML - C++

    • http://www.youtube.com/watch?v=L2f0z0zfIEI
    • http://www.functionx.com/vcnet/xml/readwrite.htm 
    • http://www.codeguru.com/csharp/csharp/cs_data/xml/article.php/c4227

    Wednesday, April 14, 2010

    Graphs

    • http://www.daniweb.com/forums/thread262956.html
    • http://www.phpbuilder.com/columns/nasser20030219.php3?page=2
    • http://www.aditus.nu/jpgraph/jpdownload.php
    • http://code.google.com/apis/visualization/documentation/gallery.html
    • http://code.google.com/apis/visualization/documentation/gallery/annotatedtimeline.html
    • http://danvk.org/dygraphs/
    • http://www.gigasoft.com/graphtool.html3
    • http://danvk.org/dygraphs/

    How to change phpmyadmin password

    • Open C:/[path to phpmyadmin]/config.inc.php
    • Look for $cfg['Servers'][$i]['password'] = 'password'; and replace its value.

    MySQL Connector/C++: Guide on building a windows client using Visual Studio (for Dummies)

    Monday, April 12, 2010

    Gravimeter

    • http://www.waitingforfriday.com/index.php/Open_Source_Visual_C%2B%2B_Class_for_USB_Generic_HID_Communication#Files_for_download
    •  http://www.functionx.com/vcnet/libraries/staticnet.htm
    • http://functionx.com/visualc/controls/dialogbox.htm

    Monday, April 5, 2010

    Going from Cebu City to Bohol

    http://schedule.ph/boat/from/Cebu-City/to/Bohol

    Sunday, April 4, 2010

    jobs

    https://www.odesk.com/w/professionals.php

    Thursday, April 1, 2010

    Magento : Free Shipping

    http://www.magentocommerce.com/blog/comments/from-the-support-team-boosting-sales-by-offering-free-shipping/

    Tuesday, March 30, 2010

    Linux File Permissions

    Three types of access:
    • Read - Denoted as r, files with read access can be displayed to the user.
    • Write - Denoted as w, files with write access can be modified by the user.
    • Execute - Denoted as x, files with execute access can be executed as programs by the user.

    Three types of user group:
    • User - The owner of the file.
    • Group - Other files which are in the same folder or group.
    • World - Everyone else.

    Monday, March 29, 2010

    Smallville Season 9 Episode 11

    Taylor Swift - You Belong with Me

    How to join network workgroup in ubuntu

    Code:
    sudo gedit /etc/samba/smb.conf
    Code:
    # Change this to the workgroup/NT-domain name your Samba server will part of
    workgroup = workgroup
    change what workgroup = to what you want it to be.

    Thursday, March 25, 2010

    delete orders feature in magento admin

    http://www.magentocommerce.com/extension/873/delete-orders/

    Monday, March 22, 2010

    Manually Add Product Manufacturer in magento

    1. Add manufacturer_id in catalog_product_entity_int (using script)
    2. Update the catalogsearch_fulltext (using script)

    FORMAT
    [SKU] [MANUFACTURER] Enabled None [BRAND] [NAME] [PRICE]

    3. Update catalog_product_flat_1 (admin panel)
    - manufacturer
    - manufacturer_value
    4. Update Product Attributes (admin panel)

    Tuesday, March 16, 2010

    my backpack

    http://riagudito.backpackit.com/

    Monday, March 15, 2010

    america 3d

    http://www.vpike.com/

    Tuesday, March 9, 2010

    unclean shutdown in ubuntu

    example unclean shutdown for /dev/sda2
    - run

    root ~ # fsck /dev/sda2
    fsck 1.38 (30-Jun-2005)
    e2fsck 1.38 (30-Jun-2005)
    /dev/sda2 have system errors, check forced.
    Pass 1: Checking inodes, blocks, and sizes
    Pass 2: Checking directory structure
    Pass 3: Checking directory connectivity
    /lost+found not found. Create? y
    .
    .
    .
    .
    .
    /dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
    /dev/sda2: ***** REBOOT LINUX *****

    root ~ # init 6

    -----------blue graphic error screen appears\
    devian login: username
    password:

    ria@devian:~$ init 0

    -----------turn on your computer

    Hurray! its working!

    Wednesday, March 3, 2010

    Partitioning and Formatting Second Hard Drive - (ext3)

    http://www.idevelopment.info/data/Unix/Linux/LINUX_PartitioningandFormattingSecondHardDrive_ext3.shtml

    Tuesday, March 2, 2010

    MAGENTO: How to display additional information in catalog product list



    Std Package: getStdPkgQty() ?>


    Minimum Order: getMinimumOrder() ?>




    Sunday, February 28, 2010

    website IP locator

    http://www.selfseo.com/find_ip_address_of_a_website.php

    Sunday, February 21, 2010

    Free People Search

    http://www.whitepages.com/

    Friday, February 19, 2010

    How to fix image cache in magento and display it in frontend

    1. images in product catalogs - Resize the image to 170x170 and save it in /media/catalog/product/cache/1/small_image/170x170/9df....e95/images/
    2. thumbnail in shopping cart - Resize the image to 75x75 and save it in /media/catalog/product/cache/1/thumbnail/75x/9df....e95/images/
    3. thumbnail in product view - Resize the image to 70x70 and save it in /media/catalog/product/cache/1/thumbnail/70x70/9df....e95/images/
    4. thumbnail in my cart - Resize the image to 50x50 and save it in /media/catalog/product/cache/1/thumbnail/50x50/9df....e95/images/

    Wednesday, February 17, 2010

    Move Magento To Another Directory

    If you’ve installed Magento in a subdirectory or even the root web directory and would like to move it somewhere else, here is how you do it.

    Let’s say you have Magento installed in the following location:

    http://www.yourdomain.com/store/

    And you want Magento to be the first thing that comes up when visitors go to your site:

    http://www.yourdomain.com

    We’ll assume you have a directory structure like this:

    /home/username/public_html/

    Meaning Magento would be installed here:

    /home/username/public_html/store/

    First, login to the backend of Magento and go to:

    System -> Configuration -> Web

    Update the Unsecure and Secure URL for your store.

    Next, connect to your site via SSH and go to the directory where you will be moving Magento:

    • cd public_html/

    Now, move all the files from the store directory to the directory you’re in:

    • mv store/* store/.htaccess .

    Delete the cache data:

    rm -rf var/cache/ var/session/

    And you’re done. Magento has now been moved up one directory.

    Article from: http://www.magentocommerce.com/wiki/groups/227/move_magento_to_another_directory

    Tuesday, February 16, 2010

    Files affected after Magento upgrade

      - Your magento's default theme is replaced by the new default theme after upgrading your Magento store.
    So, it is not a good idea to edit the default theme. If you want a new theme based on its default theme,
    you need to duplicate the default theme and give a new name. Please refer to "Adding new magento theme".
    Adding New Magento Theme
      1. You can download free magento themes from http://www.templates.com/blog/free-magento-themes-for-your-web-store/,
    create your own theme or create a theme based on the default theme.
    2. Place the design files of your theme in magento_root_directory/skin/frontend/default/[template_name] and
    the code files of your theme in magento_root_directory/app/design/frontend/default/[template_name].
    3. Login to magento admin panel and go to System -> Design
    4. Click "Add Design Change"
    5. From the "Custom Design" drop down list, select your newly created theme.
    6. You can also specify the date range for up to when a theme will display by filling-out "Date From" and "Date To" fields.
    7. Click "Save"
    You can add more themes for as long as all theme will have different date range.

    Moving magento to another server

     1. From the admin, go to Configuration -> Web -> and change the (Unsecure and Secure) fields to Template:Base url.
    2. From the admin, go to System -> Tools -> Backups and click on the backup button. This will create a backup of your database.
    3. Make a copy your Magento root.
    4. Move all data over to the new server.
    5. Restore the database on the new host.
    6. If you have a different username, password or database name. You’ll need to update that as well. You can find the file in (’magento_root/app/etc/local.xml’) and make the required changes.
    7. Navigate to your Magento root, and delete all of the files and folders in, (i.e. /var/www/magento/var) except for the .htaccess file.

    Monday, February 15, 2010

    Magento table rates

    1. Go to System -> Configuration -> Shipping Methods
    2. Select a website in Current Configuration Scope at the top left column
    3. Click "Export CSV " button in the right column
    4. Edit the CSV and load it with data then upload it again.
    Note: weight and price values should be in: XX.XXX format. Example : 9.0000

    Sunday, February 14, 2010

    Upgrading Magento with a full package or via SVN

    Here are the steps for upgrading Magento with a full package or via SVN. Steps for upgrading with the MagentoConnect Manager are below.

    1. Backup your database
    2. - In Magento go to Admin, System → Tools → Backups
    3. - You can use PHPMyAdmin (but this may fail due to time-limits on php scripts)
    4. - You can export in SSH by typing...
    5. - mysqldump -u USER -p DBNAME > dump.sql
    6. - Reimport using mysql -u USER -p DBNAME <>
    7. Backup all the code you modified yourself, and don’t forget to keep the original installation archive
    8. Take care of saving the media directory that contains all the uploaded product/category images
    9. Create a backup copy of app/etc/local.xml file
    10. Download a new installation archive or run SVN update if you checked it out from the Magento repository
    11. Extract and upload all the files it contains to your server
    12. Delete var/cache and var/session directories
    13. Point your browser to any Magento page
    14. Database upgrades should happen automatically
    15. You are done!

    Upgrading Magento using the MagentoConnect Manager


    1. Go to http:///downloader
    2. Log in using a user who has full permissions
    3. Make sure to select “Clear all sessions after successful install or upgrade

    How to upgrade from tarball installation

    It is possible that you will see no extensions in MagentoConnect Manager. This means that you have just uploaded the files without using PEAR downloader. In that case enter magento-core/Mage_All_Latest in the extension key field and click Install button. This will install all latest MagentoConnect core packages on top of existing files and will allow future upgrades through MagentoConnect.

    If, after the install has completed and you hit Refresh, you get a 500 error, and you get the same on your regular admin page and your storefront, you may need to change permissions on your .php files. SSH into your server, navigate to your Magento directory, and check the permissions on index.php. If may have been changed from 644 (rw-r-r) to 666 (rw-rw-rw) during the install. If so, you can issue this command to change the permissions on all your .php files to 644 (the -v switch will make it verbose, so you will see all the changes as they are made):

    find -type f -name ‘*.php’ -exec chmod -v 644 {} ;

    (Please note there should be a backward slash before the final semi-colon but the wiki editor sometimes takes it out.)

    Reload downloader/index.php to continue.

    How to upgrade all available extensions

    There should be at least one extension marked in yellow, which means a higher version is available on the MagentoConnect server

    1. Click ‘Select all upgradable extensions’
    2. Click ‘Commit changes’
    3. Watch the console progress for error messages
    4. After successfully upgrading click the ‘Refresh’ button that will appear under the console frame.

    How to upgrade specific extensions

    1. For each desired extension upgrade choose ‘Upgrade’ in the dropdown
    2. To upgrade Magento Core modules choose the following packages, and all required dependencies will be upgraded automatically:
      • magento-core/Interface_Adminhtml_Default
      • magento-core/Interface_Frontend_Default
      • magento-core/Interface_Install_Default
      • magento-core/Mage_Core_Adminhtml
      • magento-core/Mage_Core_Modules

    How to upgrade MagentoConnect Manager

    1. MagentoConnect Manager is not installed as a PEAR package by default. If you wish to upgrade it, you will first need to install it as a PEAR package.
    2. Enter magento-core/Mage_Downloader in the Extension key input field and click Install.
    3. After it is installed the first time, you can upgrade it the same way as other extensions.

    You can not uninstall MagentoConnect Manager

    Using SSH shell access


    You need to discuss the folder/file permissions here!!!

    1. To initialize the Magento PEAR command line registry, run the following command from the shell. Make sure you are in the Magento root folder:
    2. ./pear mage-setup .
    3. (make sure to include the second ‘.’)
    4. select php version (unix): MAGE_PEAR_PHP_BIN=/usr/local/bin/php; export MAGE_PEAR_PHP_BIN
      • for 1and1.com hosting, to use PHP5: MAGE_PEAR_PHP_BIN=/usr/local/bin/php5; export MAGE_PEAR_PHP_BIN

    How to upgrade from tarball installation

    If you have not used MagentoConnect or PEAR command line to install Magento, you will need to enter this command for initial PEAR installation of all Magento core modules:

    1. ./pear install magento-core/Mage_All_Latest

    (You may have to upgrade pear extensions using the next step for this step to work).

    How to upgrade all available extensions

    1. ./pear upgrade-all

    How to upgrade specific extensions

    1. ./pear upgrade magento-core/Mage_Core_Modules magento-core/Mage_Core_Adminhtml
    2. ./pear upgrade magento-core/Interface_Adminhtml_Default magento-core/Interface_Frontend_Default magento-core/Interface_Install_Default

    How to upgrade MagentoConnect Manager

    1. If MagentoConnect Manager is not installed as a PEAR package yet:
    2. ./pear install magento-core/Mage_Downloader
    3. After it is installed it will be upgraded just as any other extension.
    Article from: http://www.magentocommerce.com/wiki/upgrading_magento

    Tuesday, January 26, 2010

    Nice Magento Theme

    http://www.templatemonster.com/category/magento-templates/?from=3&order=date&cat=117

    Sunday, January 17, 2010

    How to remove additional footer links in magento

    Just remove or comment footer_links references in the following:
    • catalog.xml for Site Map
    • catalogsearch.xml for Search Terms and Advanced Search
    • contacts.xml for Contact Us
    The files mentioned are located in /app/design/frontend/default/your_template/layout.

    Friday, January 15, 2010

    msoffice notes

    http://www.fgcu.edu/support/office2007/ppt/GettingStarted.asp

    Wednesday, January 13, 2010

    Subdomain to Separate IP

    Learn to configure a subdomain to a separate IP address. Very useful for sites with shopping carts who want store.theirsite.com to look like it's on the same server. Requirements: Cpanel Control Panel and WHM access.

    Example: domainame.com is hosted on server A but the shopping cart store is on server B. You need to make it look like domainname.com is also on server B. Setup a subdomain to point to a differernt ip address and voila!

    1. Edit the Domains DNS Zone
    Login to your WHM control panel or manually through SSH and edit a DNS zone, select the domain you wish to modify.

    2. Adding the A Record
    Create a new record for the subdomain Eg: Type in store for the name, select A record type and then type in the IP address you need it to mask to.

    A Entry

    3. Ensure it Works
    Make sure there isn't an actual subdomain created in the users account that you're trying to point to a different IP address or the pointer/mask will not work!

    How to setup a server to handle mails from site which is hosted in another server?

    For instance:
    serverA -- the server that holds the website
    serverB -- the server that holds the mail

    In order to be able to receive emails on serverB the domain does not need to be registered there.

    You can register a subdomain mail.domain-name.com in serverA to point to serverB and then create an MX record in serverB to point to mail.domain-name.com.

    The MX record, short for mail exchange record, is an entry in a domain name database that identifies the mail server that is responsible for handling e-mail for that domain name.

    After setting up, all mails sent to @domain-name.com will be handled by the mail.domain-name.com domain which will point to serverB.


    Configuration for serverA:

    1) Login to the server WHM as the root user.

    2) Go to DNS Functions and Edit DNS Zone
    Edit DNS Zone

    3) Select the domain you want to edit, or type it in, and click on Edit.

    4) You should see the following, or something very close to it:

    Edit DNS Zone MX

    5) Now the MX has a priority of 0 meaning its the only MX entry used for the domain. Replace the domainame.com. with mail.domainame.com.

    6) Now change mail from CNAME to A record and take out the domain, and replace it with the IP address.

    WHM edit dns mx

    7) Save the changes. Bind will reload, if it shows any errors then you did something wrong, make sure the MX entry has a . after it!

    8) Login to your server by shell as the root user. Edit the /etc/localdomains file
    pico /etc/localdomains then ctrl+w to and type in the domain you modified.
    Delete the entry for the domain.
    Save the changes to the file, ctrl+x then Y

    9) Edit the /etc/remotedomains file - this tells Exim to not handle mail for this domain.
    pico /etc/remotedomains
    Add the domain name to this file.
    Save the changes.

    10) Your now done! Make sure you dns is updated, in shell run:
    host -t mx domainname.com

    You should see mail.domainname.com



    Configuration for serverB:

    1. Login to the server WHM as the root user.
    2. Create the domain.com (this will not replace your existing domain.com because this domain name is not pointed or registered to this server)
    3. Go to DNS Functions and Edit MX Entry
    4. Select the domain you want to edit, and click Edit
    5. Replace the domainame.com. with mail.domainame.com and make sure it is priority 0.
    6. Click Save.
    7. Done! You may now try some test mails.

    http://www.webhostgear.com/272.html

    Sunday, January 10, 2010

    ORS Nasco images

    • http://www.pferdusa.com/products/204/20424/2042402P.html
    • http://www.shop3m.com/60600102622.html

    Thursday, January 7, 2010

    How to enable Flat Catalog / Product in magento

    First you have to “Rebuild Flat Catalog Product” and “Rebuild Flat Catalog Category” from System->Cache Management.

    After that you will have the selection option at System->Configuration->Catalog->Frontend->Use Flat Catalog Category and Use Flat Catalog Product.

    Web Development Blog

    http://blog.chapagain.com.np/

    Installing Magento

    Installation

    * Please refer to Magento's system requirements to ensure you have the appropriate platform and environment set up. If you attempted to install Magento and the installation wizard suggested to use the PHP-CGI workaround, please click here.
    * Download the .zip or .tar.gz file from the Magento website and decompress it.
    * Upload the Magento web files to your web server via FTP (if you have SSH access and are comfortable with the command line, check out this wiki post.
    * Create a MySQL database and user/password for Magento This step varies by hosting provider and is out of the scope of this document. Consult your provider's support/documentation for instructions on how to do this.
    * Ensure that the file magento/var/.htaccess, the directories magento/app/etc, magento/var, and all the directories under magento/media are writable by the web server. To do so, navigate to the directory with your FTP client. Then locate the function "Change Permissions" or "Change Mode" in your FTP client and select it. Once you find the function, you must set the permissions so the web server can write to this file. There are two typical ways of representing file permissions in Linux:

    * As a number (eg, 755)
    * As a series of permissions categorized into user, group, and other

    If your FTP client uses the first representation, set the permissions on each directory to be 777, or 0777. If your FTP client uses the second representation, set the permissions as shown in the image below. http://www.magentocommerce.com/wiki/magento_filesystem_permissions


    [edit] Creating multiple sites

    Adding a new website to your magento installation

    * Create a new folder for the second websites
    * Copy index.php and .htaccess into this new folder.
    * Change index.hp to find mage.php and to load the new website
    * Create new root category for second website
    * Create new webiste, store, store view in Magento admin - point to new root system
    * Configure URL structure for new website
    * Add categories and products
    * Make sure that products are associated with the new website.
    * Finally, let's customize the look of the new site a bit. The logo is changed, and an actual homepage is assigned.

    Note:

    * Themes etc will be pulled from the main website, which is why the Base URL will be pointed to the main website. The new folder si referenced in the lnk URL.
    * That there are no products - this means it's working, we didn't build the catalog for the second website yet.
    * Also note that the second website is using all themes etc from the main site. This is what we configured in web tab of the Magento configuration.

    [edit] Troubleshooting
    [edit] Admin login problem in local installation

    File: app/code/core/Mage/Core/Model/Session/Abstract/Varien.php Find(this should be line 70):

    // set session cookie params
    session_set_cookie_params(
    $this->getCookie()->getLifetime(),
    $this->getCookie()->getPath()//,
    $this->getCookie()->getDomain(),
    $this->getCookie()->isSecure(),
    $this->getCookie()->getHttponly()
    );

    And comment three last parameters(and trailing comma too to avoid syntax error), this should look like:

    // set session cookie params
    session_set_cookie_params(
    $this->getCookie()->getLifetime()//,
    $this->getCookie()->getPath()//,
    // $this->getCookie()->getDomain(),
    // $this->getCookie()->isSecure(),
    // $this->getCookie()->getHttponly()
    );

    Note: This patch solves ONLY login troubles on local installations(FireFox, IE doesn’t login, Opera does).

    Source: http://www.magentocommerce.com/boards/viewthread/30715/P45/#t100450
    [edit] Admin page menu doesn’t work

    * step1: replace the code of app/code/core/Mage/Page/Block/Html/Head.php with the one here
    * step2: chmod 755 the js/ folder, and folders within.
    * step3: chmod 644 the javascript files inside js/lib/
    * step4: chmod 644 js/index.php

    Source: http://www.magentocommerce.com/boards/viewthread/4679/P120/
    [edit] Moving Magento to another server

    1. From the admin, go to Configuration -> Web -> and change the (Unsecure and Secure) fields to Template:Base url.
    2. From the admin, go to System -> Tools -> Backups and click on the backup button. This will create a backup of your database.
    3. Make a copy your Magento root.
    4. Move all data over to the new server.
    5. Restore the database on the new host.
    6. If you have a different username, password or database name. You’ll need to update that as well. You can find the file in (’magento_root/app/etc/local.xml’) and make the required changes.
    7. Navigate to your Magento root, and delete all of the files and folders in, (i.e. /var/www/magento/var) except for the .htaccess file.

    [edit] Files affected after Magento upgrade

    - Your magento's default theme is replaced by the new default theme after upgrading your Magento store.
    So, it is not a good idea to edit the default theme. If you want a new theme based on its default theme,
    you need to duplicate the default theme and give a new name. Please refer to "Adding new magento theme".

    [edit] Adding New Magento Theme

    1. You can download free magento themes from http://www.templates.com/blog/free-magento-themes-for-your-web-store/,
    create your own theme or create a theme based on the default theme.
    2. Place the design files of your theme in magento_root_directory/skin/frontend/default/[template_name] and
    the code files of your theme in magento_root_directory/app/design/frontend/default/[template_name].
    3. Login to magento admin panel and go to System -> Design
    4. Click "Add Design Change"
    5. From the "Custom Design" drop down list, select your newly created theme.
    6. You can also specify the date range for up to when a theme will display by filling-out "Date From" and "Date To" fields.
    7. Click "Save"
    You can add more themes for as long as all theme will have different date range.

    Maximum number of products Magento can handle

    From forums:
    - http://www.magentocommerce.com/boards/main.php/viewthread/17189/P15/