Magento Resource | E-Commerce Generation Explorer

TAG | development

Subdirectory Method

This is the same scenario as above, except all of the shops will be in subdirectories, e.g.:

  • mall.com/shoes
  • mall.com/shirts

Here’s how we would set this up for the shoes subdirectory:

  1. Login to your site via SSH, and create a subdirectory where your second store will be:
    • cd public_html
    • mkdir shoes/
    • cd shoes/
  2. Copy the index.php and .htaccess file from the directory where Magento is installed, which would be in our root web directory:
    • cp ../public_html/index.php ../public_html/.htaccess .
  3. Open up the index.php file that we just copied over and replace the following line of code:
    1
    
    $mageFilename = 'app/Mage.php';

    …with the following:

    1
    
    $mageFilename = '../public_html/app/Mage.php';
  4. With the index.php file still open, replace the following line of code:

    …with the following:

    1
    
    Mage::run('shoes', 'website');

· · · ·

Magento already had a built-in contact form that can be used for general contacts.

But we can not find this form on the ADMIN => CMS section. So if we want to edit text in that default contact form, we will need to edit back-end file.

If you are a developer, editing your contact form HTML is a piece cake, the path for the file is:
app/design/frontend/default/[yourtheme]/template/contacts/form.phtml

But, if there are cases when you would like to let your client/customer to edit some intro text, phone numbers, edit text behind the form.
(more…)

· ·

Magento blank theme:
magento-core/Interface_Frontend_Default_Blank
magento-core/Interface_Frontend_Default_Modern
magento-community/Free_Mage_Theme
magento-community/Basic_Template
magento-community/templatemonster_theme
magento-community/Monk_Twitter
magento-community/Beck_LiveChat

Language Pack:
French: magento-community/Locale_Mage_community_fr_FR
German: magento-community/Locale_Mage_community_de_DE
Spanish: magento-community/Locale_Mage_community_es_ES
(more…)

· ·

This a very popular problem, after some people updated the MAGENTO to 1.3.2.2 or 1.3.2.3, there are one error shows on the back-end CMS section:

Fatal error: Call to a member function children() on a non-object in /home/xxxxx/public_html/store/app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid.php on line 72

(more…)

· · ·

The file you need to look at is: /app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php. Please do a backup for this file first.

On there, you will notice these codes at the beginning of the file:

1
2
3
4
5
$this->_availableOrder = array(
'position'  => $this->__('Best Value'),
'name'      => $this->__('Name'),
'price'     => $this->__('Price')
);

Default order takes the first value available(The first one is the system automatic load one).

So, all you need to do is:
•reorder it if you want to have a selection in the Toolbar or
•set only one value of choice if you will remove the selection from the toolbar

For example, if you want sort by SKU, just simply update it to:

1
2
3
4
5
$this->_availableOrder = array(
'position'  => $this->__('SKU'),
'name'      => $this->__('Name'),
'price'     => $this->__('Price')
);

Hope this can help someone.

· ·

First thing, we need make a backup of entire Magento database with all the default phpMyAdmin options. Also backup your database to .sql file.

Let’s suppose your development site is located at http://livesite.com/test and your live site is located at http://livesite.com.

So the second step for you would be to open the backup file you created at first step and do Search/Replace All from “livesite.com/test” to “livesite.com”.

Magento stores complete url paths inside the database. Therefore you’ll end up with database full of url paths. My backup file had total of 15400 occurrences of “livesite.com/test”. (I use EDITPLUS 2 to do that)
(more…)

·

As we know, Magento comes with built in function for retrieving URL paths. Function is called getBaseUrl() and its located under Mage class.

But this function is not documented as it should be. Documentation only states that function retrieves $type parametar which is by default equal to “base”.

Here is the list of all the available parameters which they had, and they all come from Mage_Core_Model_Store.
•Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS);
http://magesite.extension/js/
•Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
http://magesite.extension/index.php/
•Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
http://magesite.extension/media/
•Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
http://magesite.extension/skin/
•Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
http://magesite.extension/
(more…)

· ·

For Footer Area, we need edit two different locations.
One part is a static block which created within the magento admin area (CMS > Static Block).

The other part is held as .phtml / .php / .xml files within the design files.

XML files location:
app/design/frontend/*/*/layout/page.xml

Here you will find some footer reference:

1
2
3
4
<block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
<block type="page/switch" name="store_switcher" as="store_switcher" template="page/switch/stores.phtml"></block>
<block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"></block>
</block>

Another XML files location:
app/design/frontend/*/*/layout/cms.xml

(more…)

· ·

Theme Design by devolux.nh2.me