Tuesday, 10 January 2012

Magento: if language is

Magento: if language is

Use this bit of code see what the language is

$language_settings = Mage::app()->getStore()->getCode();
$language_settings = strtolower($language_settings);
if ( $language_settings == “default") {
echo “Default = English”;
} elseif ( $language_settings == “french") {
echo “French”;
} elseif ( $language_settings == “german") {
echo “German”;
}

click here for the original website

Monday, 9 January 2012

Magento - Add multiple currencies

Magento - Add multiple currencies

  1. Go to System\Configuration\Currency Setup and select your allowed countries.
  2. Then go to System\Manage Currency Rates and adjust your currency converstion rates. You can also do this by importing the rates from 'Webservicex'.

this is the phrase I googled for: "magento setup multiple currency shop"

click here for the original website

Friday, 6 January 2012

Magento - Translation

Magento - Translation


If you want to translate your website there are 2 sets of translate files you need to add.
  1. app/locale/translate_folder_here
    The translation folder you place here is the offical translation of Magento. It contains lots of files all in csv format.
  2. app/design/frontend/default/skin_name_here/locale/translation_folder_here/translate.csv
    This translation file is almost like your customised version. Anything that has been missed or you wish to translate further you can do here in this format:

    'original phrase', 'translated_original phrase'
Translation files:
  • Click here to go to the translation section where you can download all the available translations.
  • Click here to go to the Farsi Files forum entry.

Magento - Free Modules

Magento - Free Modules

An article post that contains free magento modules.


click here for the original website

Wednesday, 4 January 2012

Magento - Maintainence mode

Magento - Maintainence mode

In order to put your Magento site into maintenance mode, put a file called "maintenance.flag" in the sites' root directory


click here for the original website

Magento - How to add an attribute in the back end and make it appear in the front end

Magento - How to add an attribute in the back end and make it appear in the front end

First you define the attribute in the back end as per normal. Login to the admin section, Catalog/Attributes/etc.

Then you have add a snippet of code in the template you want the attribute to appear in.

<'remove this quote'?=$_product->getHERE() ?>

Where 'HERE' is your attributes id.


click here for the original website

Tuesday, 3 January 2012

Magento - Show 'Out of Stock' items in the catalog

Magento - Show 'Out of Stock' items in the catalog

Magento, by default hides 'Out of Stock' items from the front end catalog. If you want them to appear (show in the frontend but have out of stock written next to it) you have to:
  1. Login to the backend
  2. Go to system/configuration
  3. Locate the 'Inventory' tab
  4. and Set Display out of stock products to ‘Yes’ in Stock options tab

click here for the original website

Magento - Editing the Magento email templates

Magento - Editing the Magento email templates

If you want to edit the Magento email templates, you can either edit:
  1. Just the Logo
    If you locate the email logo file here(skin directory/images/logo_email.gif") and replace it with your email logo. That should do a simple swap and any email's that go out will have your logo on them.
  2. The Template Itself
    If you want to edit the templates, the best way is to use the CMS itself.
    • First login to the admin, then go to: system/transactional emails.
    • Here you create your new template based on the original, and then change the aspects you want to change.
    • Then you go to system/configuration/sales | sales emails and using the dropdown menus select your customised emails.

click here for the original website

Monday, 12 December 2011

SilverStripe - Adding Checkbox to CMS

SilverStripe - Adding Checkbox to CMS

This allows you to add a checkbox to CMS, and then display stuff in the frontend dependant on if it is ticked or not.

First you need to add the database field for it.

static $db = array(
'ShowExtraClass' => 'Boolean'
);

Then add the checkbox to the cms

function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Main", new CheckboxField ("ShowExtraClass"));
return $fields;
}

And finally you add the if statement in your template:
<% if ShowExtraClass %>

click here for the original website

Friday, 9 December 2011

Magento - add image to phtml

Magento - add image to phtml
<img src="<?php echo $this->getSkinUrl('images/cassa/banner-overlay.png') ?>" alt="" id="banner-overlay" />