entroducing.com
  • Home
  • Coding
  • Trading
  • Troubleshooting
    • Operating System
    • Networking
  • Reviews
  • Travel
  • Quick Snap
  • Thoughts
  • Side Hustle
  • Earn Passive Income/Referral
Website sponsored by LingeriesG
@2023 - All Right Reserved. Entroducing. Sponsored by mm3288
magento

Redirect Magento category to a URL

by Ben May 24, 2013
written by Ben

Do you have a category menu that you want to redirect to a URL instead?
Did you install aheadworks blog extension and wants to redirect a category to the blog? e.g. www.domainname.com/blog 

Below are the steps to get these done. You may refer to www.lingeriesg.com for example.

  1. In magento, click on Catalog -> Manage Categories
  2. Click on the root category that you wants to create and click on ‘Add Subcategory’ button
  3. Enter the name of the catagory. e.g. Blog and mark Is Active = Yes
  4. Once created, take note of the ID that is assigned to this category

    2

  5. Click on Catalog -> URL Rewrite Management
  6. Find and click on the entry of the category which you have just created. In my example below, it is id = 11

    3

  7. Set Redirect = permanent (301) and save

    4

  8. Go back to URL Rewrite Management
  9. Create a new entry. Create URL Rewrite = Custom
  10. Type in ID path = any name. e.g. myblog

    5

  11. Request Path = the category ID  which you have just copied
  12. Target Path = the path you want to redirect. In my case, i want to redirect to /blog. Thus, my target path is ‘blog’
  13. Redirect = Permanent
  14. Save this custom URL rewrite entry and clear your index by going to System -> Index Management -> Select All and click submit (Actions = Reindex Data)

Basically, what we have done so far is to mark category URL rewrite as permanent and then create a new URL rewrite that redirect the system(raw) URL to the one you intended to.

At the time of writing, I am using Magento community version 1.7.0.2

May 24, 2013 5 comments
0 FacebookTwitterPinterestEmail
Operating System

Change Outlook’s offline folder file location

by Ben October 3, 2012
written by Ben

If you are connecting to an outlook exchange server and would like to change the offline folder file location but unable to do so, try the following steps to change it.

Quick Summary: To change the location, you need to disable the cached exchange mode and offline use option before you can set a new location.

Detailed Steps

  1. Close and quite Outlook
  2. Go to Control Panel and search mail. Click on Mail (32-bit)as shown below
  3. Continue Reading
October 3, 2012 0 comment
0 FacebookTwitterPinterestEmail
Codingmagentophp

Fix Magento Connect Manager 404 error by resetting the folder permission

by Ben May 15, 2011
written by Ben

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.

May 15, 2011 4 comments
0 FacebookTwitterPinterestEmail
Codingmagentophp

Install chinese locale for Magento Admin 1.5

by Ben May 15, 2011
written by Ben

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)

May 15, 2011 0 comment
0 FacebookTwitterPinterestEmail
Codingmagentophp

Fix google anlaytics in magento custom template

by Ben May 15, 2011
written by Ben

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">
//<!&#91;CDATA&#91;
    (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')&#91;0&#93; || document.getElementsByTagName('body')&#91;0&#93;).appendChild(ga);
    })();

    var _gaq = _gaq || &#91;&#93;;

_gaq.push(&#91;'_setAccount', 'UA-1234567-7'&#93;);
_gaq.push(&#91;'_trackPageview'&#93;);


//&#93;&#93;>
</script>
<!-- END GOOGLE ANALYTICS CODE -->
May 15, 2011 0 comment
0 FacebookTwitterPinterestEmail
Codingphpsymfony

symfony conditional validation

by Ben February 27, 2011
written by Ben

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
February 27, 2011 0 comment
0 FacebookTwitterPinterestEmail
SQLsymfony

sf_guard_user_profile id and user_id are messed up

by Ben February 26, 2011
written by Ben

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
February 26, 2011 0 comment
0 FacebookTwitterPinterestEmail
Codingphpsymfony

symfony backend: displaying thumbnail or photo in listing

by Ben January 9, 2011
written by Ben

if you are using the admin generator to generate your backend application and want to show thumbnail or photo in your listing, you can try the following steps.

Here’s an example of how it will looks like when the thumbnail is showing on the listing page.

Before you add it in, you need to check the variable name of the row that the admin generator uses.

To check the variable name, go to the cache folder for the module and open the _list.php file with a notepad.
Take note of the row

\\cache\backend\dev\modules\autoContestphoto\templates\_list.php
...
        <?php foreach ($pager->getResults() as $i => $contest_photo): $odd = fmod(++$i, 2) ? 'odd' : 'even' ?>
          <tr class="sf_admin_row <?php echo $odd ?>">
            <?php include_partial('contestphoto/list_td_batch_actions', array('contest_photo' => $contest_photo, 'helper' => $helper)) ?>
            <?php include_partial('contestphoto/list_td_tabular', array('contest_photo' => $contest_photo)) ?>
            <?php include_partial('contestphoto/list_td_actions', array('contest_photo' => $contest_photo, 'helper' => $helper)) ?>
          </tr>
        <?php endforeach; ?>
...

In my case, the variable name for the row is $contest_photo

Next, create a partial call _thumbnail.php in the template folder of the module.
In this partial, echo the path of the thumbnail or the photo with a img html tag

\\apps\backend\modules\contestphoto\templates\_thumbnail.php
<img src="<?php echo $contest_photo->getThumbnailPath() ?>"/>

Then, edit the generator file to include the _thumbnail column for your list

\\apps\backend\modules\contest\config\generator.yml


...

      list:
        title: Contest Photo Management
        display: [=title, contest, category, user, title, isDeleted, _thumbnail]
        sort: [created_at, desc]
        max_per_page: 50

...

Clear your cache and see if the thumbnail loads.

January 9, 2011 1 comment
0 FacebookTwitterPinterestEmail
  • 1
  • …
  • 4
  • 5
  • 6
  • 7
  • 8
  • …
  • 10

Search

Categories

  • Coding
    • apache
    • cakephp
    • java
    • magento
    • php
    • SQL
    • symfony
    • wordpress
  • Hosting
  • Quick Snap
  • Reviews
  • Side Hustle
  • Thoughts
  • Trading
  • Travel
  • Troubleshooting
    • Networking
    • Operating System

Tags

3.28 angry bird jb angry birds activity park apache beijing cakephp cdata cruise crypto docker elasticsearch element mall fil ftx claim hacked hanshou how-to html data in xml java johor bahru jumper land linux mac magento magento2 malacca malaysia travel move-to-earn passive income php plugin Programming rides side hustle stepn stfil stfil.io struts SyntaxHighlighter theme travel VPS windows 7 wordpress xampp
  • Email

@2023 - All Right Reserved. Entroducing. Sponsored by mm3288