Heading

MikeCohenMedia.com

Magento URL Mistake No Access to Backend Admin Area

by Mike Cohen on Aug.03, 2009, under Uncategorized

The urls set in the Magento Admin -> Configuration  -> Web are used to build all the urls to the css and js
files, if you make a mistake saving them and they don’t resolve properly, that means all the references are off and breaks the site. This means your site won’t appear or function properly and worse, your admin back end will not function since it depends heavily on js. Without js, you can’t do anything in the admin, so you can’t go back in and change back to the old config. Big problem. Here’s how you solve:

1. Change the config back directly in the db, as of Magento 1.3 the table is core_config_data the SQL used should be something like this, or just use PhpMyAdmin.

UPDATE core_config_data SET value=’NEW URL’ WHERE value=’OLD URL’

Make this change for both the Unsecure Base Url and Secure Base Url

2. Clear the Magento cache – according to most post on Magento, this solved the problem for most people. Didn’t for us so there was one additional step that took us a long time to figure out.

3. Magento also has the capability of caching the configuration settings in xml. This file apparently controls how Magento loads config variables, once deleted Magento resorted to using the config values stored in the database.

/app/etc/use_cache.ser

Delete this file, and you should now have your site and admin back to normal. It might be necessary to re-upload the file, not 100% sure about that.

Hope this helps someone save their site and a lot of time. Link to a Magento post on the issue:

http://www.magentocommerce.com/boards/viewthread/22420/

Leave a Comment :, , , , , more...

Changing Magento Validation

by Mike Cohen on Jul.24, 2009, under Uncategorized

To change magento checkout validation, you can change the class of the form field to use one of the other validation methods present in js/prototype/validation.js. Just open that file and scroll down to see the methods available. Search fo r this Validation.addAllThese and you’ll see the methods below. Then open up /app/design/frontend/default/YOUR THEME/template/checkout/onepage/billing.html then change the class. For example if the class is class=”required-entry input-text” change to class=”required-entry validate-phoneLax”. This will now change the validation from simply checking if a value is present to actually checking the format.

Leave a Comment more...

Mystery Space Caused by the Byte Order Mark (BOM)

by Mike Cohen on Jul.06, 2009, under Uncategorized

This took way too long to figure out, hopefully this will help someone else. If you have a mystery space occurring somewhere in your web site and it is not one of the many CSS bugs out there then the byte order mark might be the culprit. Here’s a quote taken from the Joomla forums:

Yes, “” is the Byte Order Mark (BOM) of the Unicode Standard. Specifically it is the hex bytes EF BB BF, which form the UTF-8 representation of the BOM, misinterpreted as ISO 8859/1 text instead of UTF-8.

Probably what it means is that you are using a text editor that is saving files in UTF-8 with the BOM, when it should be saving without the BOM. It could be PHP files that have the BOM, in which case they’d appear as literal text on your page. Or it could be translated text you pasted into Joomla! edit windows.

The Unicode Consortium’s FAQ on the Byte Order Mark is at http://www.unicode.org/faq/utf_bom.html#BOM .

The remedy is to find the offending file, open in notepad, select Save AS, select ‘ANSI’ from the ‘Encoding’ drop down then re-upload to your site.

To find the problem file, you can probably narrow it down to one of the last files you edited before the problem started occurring.

If not, this shell command can help you find it on the server. Login to your server using SSH. This may or may not be enabled on your hosting account. Please check with your host if you are not sure. If you don’t know how to connect using SSH, search for Putty which is an easy to use SSH client. Once your are able to login, run this command (type in after the prompt you receive when logging in)

grep -rl $’\xEF\xBB\xBF’ /home/username/public_html

Where /home/username/public_html is the path to the directory you’d like to search. You might need to ech o $_SERVER['DOCUMENT_ROOT'] in a php file to find the full machine path to your directory.

Once you enter and run the command, it will display the file(s) that contain the BOM. Save these as described above and re-upload. That should solve your problem. Hope this helps!

Leave a Comment :, , , , more...

Hi Class

by Mike Cohen on May.03, 2009, under Uncategorized

TESTING

Leave a Comment more...

Customizing Joomla 1.5 and VirtueMart

by Mike Cohen on Apr.19, 2009, under Joomla

I’m thinking it might be a good idea to record the changes I’m making to Joomla 1.5 for posterity. Hopefully I can consult this post when setting up a similar site in Joomla in the future and others can as well. So here goes.

1. First thing — installed Joomla, then installed the VirtueMart package. All is right in the universe, install goes well both running fine.

2. Delete all test content from system and all un-necessary menus. Left with topmenu and usermenu. Please note – top menu is what I consider to be the main menu, some have had the experience of losing their home page. All you have to do is add Home to the menu, indicate it as the front page, then in the Menu Item Manager select it and indicate it as the default. That will then indicate this page as the home page.

3. I like my sites to have a top menu consisting of sections and a left (or right) hand menu that dynamically populates with the categories corresponding to the selected section. To acheive this, I installed the very handy Categoris 1.5 Module, found here http://extensions.joomla.org/extensions/structure-&-navigation/sections-&-categories/2423/details. There are several others like it but from my experimentation this is the only one that auto populates based on selected section. I did edit the helper.php file, as the option to show empty categories didn’t seem to work, commenting out line 161, which makes sure empty categories show up.

4. Making the VirtueMart module appear when in the products section of the site. I created a menu item on the top menu that points to VirtueMart, when clicked, it takes the user to the VirtueMart part of the site. I only wanted the product categories to show up when in the Products (VirtueMart) section. To get this to work I edited the mod_virtuemart.php file in the mod_virtuemart directory. I simply added the following code to the top of the file, and closed out the if at the end of the file. Basically this excludes the virtuemart code if we are not in the VirtueMart part of the site.

if($option==’com_virtuemart’){

5. Enabling Search Engine Friendly URLs – used this 
http://e-fusionsoft.com/downloads/category/1-extension-specific-plugin.html
to make SEF Urls for Joomla.

1 Comment more...

Web Site Maintenance Overview

by Mike Cohen on Apr.18, 2009, under Maintenance and Promotion

Web site maintenance is the ongoing process of updating content, design and functionality of a web site. (continue reading…)

Leave a Comment more...

Planning a Web Site Project

by Mike Cohen on Apr.18, 2009, under Design/Development

This phase occurs before hiring a designer/developer/company. Before requesting a proposal from a potential designer/developer/company you will need to collect and summarize your ideas about your project. (continue reading…)

Leave a Comment more...

Web Site Promotion Overview

by Mike Cohen on Apr.18, 2009, under Maintenance and Promotion

Web site promotion is the continuing process to promote a web site to attract more visitors to the web site. (continue reading…)

Leave a Comment more...

Search Engine Optimization (SEO)

by Mike Cohen on Apr.18, 2009, under Maintenance and Promotion

Search engine optimization is the process of discovering keywords and optimizing your site so that it will rank highly in the search engines for them. (continue reading…)

4 Comments more...

Social Media Optimization

by Mike Cohen on Apr.18, 2009, under Maintenance and Promotion

Social Media Optimization is the process of creating profiles for your business on various social networking sites, maintaining these profiles and encouraging site visitors and customers to interact with you on these social networking sites. (continue reading…)

Leave a Comment more...