Author Archive for Benny

15
May

Fix Magento Connect Manager 404 error by resetting the folder permission

If you encounter 404 error when you connect to Magento Connnect Manager (System-> Magento Connect Manager), it is probably due to your folder permission not set up correctly.

Fortunately, there is a quick fix for this.

Download the magento clean up tool (a php file) and upload to your store root folder.

Once done, browse to the clean up tool (http://www.yourstore.com/magento-cleanup.php) and you will see a list of messages that it has reset the folder permission.

VN:F [1.9.7_1111]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.7_1111]
Rating: 0 (from 0 votes)
15
May

Install chinese locale for Magento Admin 1.5

Unfortunately, the default Magento does not comes with all the languages installed. Changing the language dropdown at the bottom of the page will not change the interface.

Here’s how to install chinese language for the admin

1. go to magento connect and install the below 2.0 extension key


http://connect20.magentocommerce.com/community/Locale_Mage_community_zh_CN

2. Once installed, check your app\locale and you will see a lot of csv files in the folder. Those files are created by the extension… in the wrong folder!

3. Create a folder ‘zh_CN‘ in app\locale and move all the csv files in app\locale to app\locale\zh_CN

4. Once done, go back to admin page and flush your cache (system -> cache management -> flush magento cache)

5. Change the language to chinese (china) and you should be able to view it in chinese (hopefully)

VN:F [1.9.7_1111]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.7_1111]
Rating: +1 (from 1 vote)
15
May

Fix google anlaytics in magento custom template

If you have turned on your google analytics in admin console and you are using custom design template but the google analytics is not showing up in your html codes, look at the below steps to check if the codes are in your custom design are in placed.

1. check page.xml in app\design\frontend\default\[yourtemplate]\layout and verify if the following line is in place.

\\app\design\frontend\default\[yourtemplate]\layout\page.xml

2. open *.phtml in app\design\frontend\default\magikjewellery\template\page and verify if the following line is after the tag

\\app\design\frontend\default\[yourtemplate]\template\page\1column.phtml
\\app\design\frontend\default\[yourtemplate]\template\page\1columnhome.phtml
\\app\design\frontend\default\[yourtemplate]\template\page\2columns-left.phtml
\\app\design\frontend\default\[yourtemplate]\template\page\2columns-right.phtml
\\app\design\frontend\default\[yourtemplate]\template\page\print.phtml

...

<!--?php echo $this--->getChildHtml('after_body_start') ?&gt;
...

3. clear your cache by going to admin -> system -> cache management and flush magento cache

4. open your home page, right click on it and select view source and check if the following codes are generated.

<!-- BEGIN GOOGLE ANALYTICS CODE -->
<script type="text/javascript">
//<![CDATA[
    (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
    })();

    var _gaq = _gaq || [];

_gaq.push(['_setAccount', 'UA-1234567-7']);
_gaq.push(['_trackPageview']);

//]]>
</script>
<!-- END GOOGLE ANALYTICS CODE -->
VN:F [1.9.7_1111]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.7_1111]
Rating: 0 (from 0 votes)
27
Feb

symfony conditional validation

Below are the snippets on how to implement a conditional validation in the form. i.e. validate field A if field B is true

As discussed in this tutorial (though it is for symfony 1.2, it will works in 1.4), the key thing is to set a post validator to validate values after the initial validation.

Continue reading ‘symfony conditional validation’

VN:F [1.9.7_1111]
Rating: 9.5/10 (2 votes cast)
VN:F [1.9.7_1111]
Rating: 0 (from 0 votes)
26
Feb

sf_guard_user_profile id and user_id are messed up

If you use symfony’s sfDoctrineApply plugin and for some reason, the ‘id’ and ‘user_id’ in sf_guard_user_profile are messed up, you can try the below SQL.

The SQL would update sf_guard_user’s id to match the sf_guard_user_profile’s id.

Take note that this is provided that your other application tables are using sf_guard_user_profile‘s id and not the sf_guard_user‘s id.

Continue reading ‘sf_guard_user_profile id and user_id are messed up’

VN:F [1.9.7_1111]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.7_1111]
Rating: 0 (from 0 votes)



Search Website

www.lingeriesg.com

www.lingeriesg.com

Sponsored Ads

Sponsored Links

www.asiadolly.com

www.asiadolly.com

About Me

Me

Hello, Im Benny Chong. This blog is a proof that I have too much spare time to burn. 

I will be writing topics mainly on web design, application development, photography and other rubbish. Cheers