Our blog

 

If you are working on a theme, you may find that there are hard coded links dotted all over the place.

This can make testing a site offline (and thereby not on the same URL) a bit of a pain.

Here is a quick fix for you:

1. Remove all hard coded links from the CMS section:

SQL:
  1. UPDATE cms_block SET content = REPLACE(content, 'http://www.domain.com/', '{{store url=''}}');

SQL:
  1. UPDATE cms_page SET content = REPLACE(content, 'http://www.domain.com/', '{{store url=''}}');

2. Remove all hard coded links from the theme files.

This is a command line one using grep and sed.

Firstly, cd into the root theme folder

CODE:
  1. cd app/design/frontent/default/hardtheme

Now find files with hard coded links

CODE:
  1. grep -rl 'http://www.domain.com' ./

Now to automatically remove all those,

CODE:
  1. grep -rl 'http://www.domain.com' ./ | xargs sed -i 's/http:\/\/domain.com\//<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);?>/'

More Reading:



 

More Reading:

  • no matching posts found..


 

More Reading:

  • no matching posts found..


 

If you are looking for Magento Design and Magento theme or Magento template creation then you have come to the right place.

Edmonds Commerce have traditionally been a Magento development specialist and have been working on custom Magento projects for a couple of years now. Now we have welcomed some design experts onto the team and so can now offer professional Magento ecommerce design services along with our development services. This means that we are on our way to becoming a full service agency for Magento site owners.

If you are looking to get a Magento site created and would like to enquire about our custom Magento design services then get in touch today.

More Reading:



 

More Reading:

  • no matching posts found..


 

More Reading:

  • no matching posts found..


 

More Reading:

  • no matching posts found..


 

More Reading:

  • no matching posts found..


 

To install Git on a Centos server you need to install something called EPEL first.

This is an extra repository of apps which you need to have accessible in order to install Git.

I tried other tutorials on the net that were quite extensive but didn't work. In the end its just two commands:

1. Install EPEL:

CODE:
  1. rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm

http://fedoraproject.org/wiki/EPEL/FAQ#How_can_I_install_the_packages_from_the_EPEL_software_repository.3F

2. Install Git + Git Daemon

CODE:
  1. yum install git git-daemon

For me to get it to work, I had to manually change the epel.repo file because I had created a non functional one previously. I got the warning:

warning: /etc/yum.repos.d/epel.repo created as /etc/yum.repos.d/epel.repo.rpmnew

So I just did the following:

CODE:
  1. cd /etc/yum.repos.d/
  2. mv epel.repo epel.repo.old
  3. mv epel.repo.rpmnew epel.repo

More Reading:



 

More Reading:

  • no matching posts found..