Call-back icon  Enterprise Sales: +1.310.775.2674 (N. America)   +44 20.3286.4137 (UK)

Magento

eCommerce Software for Online Growth

Tutorial: Integrating 3rd Party CMS Content Within Magento


Integrating 3rd party CMS content into Magento has been a popular request by the Community. Outlined below is a technique using Expression Engine with the idea of managing content pages with EE, and displaying the content within Magento, using Magento’s 404 event handler. We will fetch this content using Varien_Http_Client.

Please note that Expression Engine is used for demonstration purposes only and other CMS platforms (Wordpress, Modx, Joomla, Drupal) can be used if desired.

image

Getting Started

For this example, we’ll assume Expresion Engine is installed inside the Magento directory in a folder called ‘ee’, so our store’s URL will be http://www.example.com and our EE’s URL will be http://www.example.com/ee/.

Note: Both Magento and EE must be installed with the Apache URL rewrite feature.

The .htaccess file for EE:

RewriteEngine on

RewriteCond 
%{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteCond 
%{REQUEST_FILENAME} !-l
RewriteRule 
^(.*)$ index.php?/$1 [QSA,L]

The home page of your installed EE must be the same as your Magento store home page (http://www.example.com)

Create a Local Code Pool Module

We will create a module in the local code pool as follows:

- create a new directory called “Project” under “app/code/local/Mage”
- create a new directory called “Block” under “Project”
- create a new file called Noroute.php under “Block” and copy the following code into the script.

class Mage_Project_Block_Noroute extends Mage_Core_Block_Abstract
{
    
protected function _toHtml()
    
{
      
/**
       * This logic should be in the controller, model, but let's make 
       * this quickly without lots of files :)
       */

        
$uri Mage::getBaseUrl() . 'ee' $this->getRequest()->getRequestString();
        
$post $this->getRequest()->getPost();
        
$method = ( count($post) == ) ? 'GET' 'POST';

      
/**
       * You can add additional
       * headers like cookies, redirects and so on
       * if you need it here.
       */

        
$client = new Varien_Http_Client($uri);
        
$client->setParameterPost($post);
        
$response $client->request($method);

        
$body $response->getRawBody();
        return 
$body;
    
}
}

To enable the Project module from local pool, create a file called “Magento_Project.xml” under “app/etc/modules” and copy the following code:

<?xml version="1.0"?>
<config>
    <
modules>
        <
Mage_Project>
            <
active>true</active>
            <
codePool>local</codePool>
        </
Mage_Project>
    </
modules>
</
config>

Create a Layout

Now we need to add this block to the layout. Let’s edit the app/design/frontend/YOUR_DESIGN_PACKAGE/default/layout/cms.xml and modify ‘cms_index_defaultnoroute’ section:

<cms_index_defaultnoroute>
        <
remove name="left"/>

        <
reference name="root">
            <
action method="setTemplate"><template>page/1column.phtml</template></action>
        </
reference>
        <
reference name="content">
            <
block type="project/noroute" name="no_route" />
        </
reference>
    </
cms_index_defaultnoroute>

Next, we’ll disable the 404 page (identifier: ‘no-route’) in the Magento administration (CMS->Manage Pages).

Finally, refresh Magento’s Cache and edit the templates within EE removing all headers, footers. Visiting pages like http://www.example.com/sample will now include the content from http://www.example.com/ee/sample with Magento’s header, footer and other components.

Extending the Technique

In order not to redirect all invalid requests to EE, a regex expression can be added to limit the requests that are redirected to EE and such requests will be processed by the Magento’s noroute handler.

Comments?

Have any comments or ideas to extend the technique further? We’d love to hear your thoughts in the comments.

+++

This post is also available on the Magento Wiki

RSS comments feed for this entry

User Comments

|58 comments
  1. petemcw

    1petemcw |posted November 17 2008

    What a great, useful post!  Thanks once again Magento.

  2. BryGuy

    2BryGuy |posted November 17 2008

    Nice post.  Now for the big question…

    How can we get magento to run within Joomla without fancy iframes?  Reason being that Joomla offers thousands of templates and other CMS features.  With this type of integration the world can easily wrap a powerful ecommerce engine inside a powerful CMS app that will give ecommerce owners the tools they really need to succeed.

    Thoughts?

  3. Crucial

    3Crucial from Phoenix, AZ|posted November 17 2008

    Awesome! Good to see the example CMS being used here is EE as well since it’s such a fantastic CMS and built extremely well compared to the other ones.

    Looking forward to playing around with Magento and EE once the 2.0 release comes out (for EE that is).

    Hopefully the EE/CI community will work on a more in-depth integration as well, because you could do some cool things with EE and Magento, specifically with the relationship feature, which would be nice with things like the forum, wiki, or blog.

    I think the way to go about these integrations is from the other end though, using the API/XML features available in Magento to build extensions in the CMS of choice instead of the other way around. At least, that’s how I would imagine the best way to do this would be.

  4. Paryank Kansara

    4Paryank Kansara from Ahmedabad, Gujarat, India|posted November 18 2008

    Nice technique!!!

    But, in this case, an extra HTTP request process is required. One is original request sent to magento by web browser and an extra request sent to CMS system sent by magento.

    Wont it cause the performance degrade?

  5. TechDivision

    5TechDivision from Germany|posted November 18 2008

    Pretty cool. Thanks for the post. Especially the combination of shop-functionalities - provided by Magento - combined with the comfort of a 3rd party CMS are really interesting. Looking forward to see more.....

  6. tijuan

    6tijuan from Toulouse (France)|posted November 18 2008

    Awesome idea for an awesome CMS

  7. Lol

    7Lol from Plymouth, UK|posted November 18 2008

    This will be fantastic if it works well.

    Will this kind of integration require management of two different account set-ups – one for Magento accounts and one for the CMS side of things? How would this work? Could both systems be made to use the same account info?

  8. YoavKutner

    8YoavKutner |posted November 18 2008

    @Lol - This is a “quick and dirty” solution it does not solve user account integration between the two systems.

  9. petemcw

    9petemcw |posted November 18 2008

    It should be noted that for this to work, you need to add a “local/Mage/Project/etc/config.xml”.  That file should be similar to this:

    <?xml version="1.0"?>
    <config>
    <modules>
    <Mage_Project>
    <version>1.0.0</version>
    </Mage_Project>
    </modules>
    <global>
    <blocks>

    <class>Mage_Project_Block</class>
    </project>
    </blocks>
    </global>
    </config>

  10. jajaklar82

    10jajaklar82 |posted November 20 2008

    hm.. this does not help so much.. doesnt really integrate much

  11. Paaaaa

    11Paaaaa |posted November 20 2008

    Not working for me with WORDPRESS…

  12. smavilio

    12smavilio |posted November 21 2008

    I’m very intterested in this

    what if magento is installed in a folder called “store” in a WORDPRESS installation?

  13. Paaaaa

    13Paaaaa |posted November 21 2008

    Please make new tutorial with magento 1.1.6 or new 1.1.7 and new wordpress 2.6.3, otherwise this tutorial is helpless and not functional…

  14. yous zioua

    14yous zioua |posted November 21 2008

    Is the wordpress integration module stable?

  15. Classy Llama Studios

    15Classy Llama Studios from Springfield, MO|posted December 3 2008

    I’m am attempting an integration with Wordpress using this technique right now.  I’ll post my findings.

  16. zkorosi

    16zkorosi from Hungary / Magyarország|posted December 8 2008

    Pls! Somebody tell me, how can I make it with Joomla 1.5… I can’t do it without example.  Thx!

  17. wsj3

    17wsj3 from Portland, OR|posted December 9 2008

    Is anybody using Magento with Expression Engine? I’m currently evaluating a license for EE and would love to hear more about it’s use with Magento.

  18. zkorosi

    18zkorosi from Hungary / Magyarország|posted December 9 2008

    Here is a screenshoot, this is my problem: http://easycaptures.com/1873025532
    Please help me! What have to do? Thanks! Zozo

    ps.: Sorry about my English… grin

  19. dankoz

    19dankoz |posted December 11 2008

    cant seem to get this to work

    I am getting this error

    Fatal error: Class ‘Mage_Project_Block_Noroute’ not found in C:\wamp\www\usapp7\app\code\core\Mage\Core\Model\Layout.php on line 461

  20. wsj3

    20wsj3 from Portland, OR|posted December 11 2008

    Is anybody reading this thread using Expression Engine? What do you think? It looks awesome, particuarly if you integrate it with Magento. Not sure how to handle the dual login/account problem?

  21. Paaaaa

    21Paaaaa |posted December 11 2008

    Helpless tutorial, integration with wordpress not working. Author, please make new tutorial with wordpress integration. I think lots of peale would apreciate it. Thanks.

  22. piotrekkaminski

    22piotrekkaminski |posted December 14 2008

    @wsj3 - Magentocommerce.com is actually an example of integration between EE and Magento.

  23. wsj3

    23wsj3 from Portland, OR|posted December 14 2008

    Hmmm. it doesn’t really show an integration of EE withina store. That’s what I’m talking about. I would like to see how the blog/forum/content would be integrated into a Magento store.

  24. zmove

    24zmove |posted December 19 2008

    It is mentionned into the post, but not explained… How to apply this procedure for a drupal integration ?

    (In addition the link to drupal website is wrong, it’s drupal.org and not drupal.com...)

  25. thE_iNviNciblE

    25thE_iNviNciblE from Oldenburg|posted December 23 2008

    has someone tested it with Joomla ?

  26. thE_iNviNciblE

    26thE_iNviNciblE from Oldenburg|posted December 23 2008

  27. zkorosi

    27zkorosi from Hungary / Magyarország|posted December 27 2008

    Solution for unreadable content like ‘@&Đkowz’

    Change this:

    $body = $response->getRawBody();

    To this:

    $body = $response->getBody();

    After change I can use this solution to integrate Joomla 1.5 into my Magento. If you need this + user integration, try the JFusion.

    ps.: Sorry again about my english… grin

  28. gfxguru

    28gfxguru |posted December 30 2008

    Roy do you think we could get a project going that would expand on some of the source you have here for maybe 3rd party integration?

  29. zkorosi

    29zkorosi from Hungary / Magyarország|posted January 3 2009

    The integrated cms (Joomla 1.5) can’t set and read cookies. When I try it out from Magento everything is ok. Any solution? Thx! Zozo

  30. wsj3

    30wsj3 from Portland, OR|posted January 3 2009

    If anyone is using EE and Magento, would you please give me a URL to what you’ve been able to accomplish. We are about to get started and I would really like to be able to show my team what is possible. Also, if anyone has ideas for resources to guide us, that would really be appreciated.

  31. i92segoa

    31i92segoa |posted January 10 2009

    I was able to male it works with wordpress, only need to change the following things:

    1. Install Wordpress in a folder called wordpress under your magento installation

    2. In file Noroute.php under folder block

    change this:

    $uri = Mage::getBaseUrl() . ‘ee’ . $this->getRequest()->getRequestString();

    to this:

    $uri = Mage::getBaseUrl() . ‘wordpress’ . $this->getRequest()->getRequestString();

    3. use this in your .htaccess file:

    <IfModule mod_rewrite.c>
    RewriteEngine on

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule ^(.*)$ index.php/$1 [QSA,L]
    </IfModule>

    Thats all! THanks for this article!

  32. Noah Learner

    32Noah Learner |posted January 14 2009

    Hi All,
    Has anyone successfully used this method with Modx?  If so would you be willing to share your method?  I have tried this method unsuccessfully.  I’m a bit of a newbie, do you put the .htaccess file in the modx root folder AND the Magento root folder?  If anyone is willing to show a demo that is commented it would be immensely helpful to a lot of people.

    Many Thanks in advance!

  33. chinesedream

    33chinesedream |posted January 16 2009

    thanks i92segoa for the tips. I was able to install the Wordpress, but I don’t seem to be able to load the header, category menu and footer from Magento.

    Is there anything I should do in WP’s template? I removed the “<?php get_header(); ?>” and “<?php get_footer(); ?> “, added Magento stylesheets to ‘style.css’ from WP theme.

  34. i92segoa

    34i92segoa |posted January 17 2009

    chinesedream, may be what you need is change:

    the suggested code for layout from:

    <cms_index_defaultnoroute>
    <remove name="left">

    <reference name="root">
    <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>
    <reference name="content">
    <block type="project/noroute" name="no_route" >
    </reference>
    </cms_index_defaultnoroute>

    to:

    <cms_index_defaultnoroute>
    <remove name="left">

    <reference name="root">
    <action method="setTemplate"><template>page/3columns.phtml</template></action>
    </reference>
    <reference name="content">
    <block type="project/noroute" name="no_route" >
    </reference>
    </cms_index_defaultnoroute>

    As you can see the only difference is de refenced layout: 1column/3columns.phtml

    Hope it helps!

  35. chinesedream

    35chinesedream |posted January 17 2009

    i92segoa, much appreciated.

    Got it working now smile

  36. jedo

    36jedo |posted January 23 2009

    Hi
    The tricks would be nice, I like to use it with mediawiki. Unfortunatly I get the following error:

    class Mage_Project_Block_Noroute extends Mage_Core_Block_Abstract { protected function _toHtml() { /** * This logic should be in the controller, model, but let’s make * this quickly without lots of files smile */ $uri = Mage::getBaseUrl() . ‘mediawiki’ . $this->getRequest()->getRequestString(); $post = $this->getRequest()->getPost(); $method = ( count($post) == 0 ) ? ‘GET’ : ‘POST’; /** * You can add additional * headers like cookies, redirects and so on * if you need it here. */ $client = new Varien_Http_Client($uri); $client->setParameterPost($post); $response = $client->request($method); $body = $response->getRawBody(); return $body; } } class Mage_Project_Block_Noroute extends Mage_Core_Block_Abstract { protected function _toHtml() { /** * This logic should be in the controller, model, but let’s make * this quickly without lots of files smile */ $uri = Mage::getBaseUrl() . ‘mediawiki’ . $this->getRequest()->getRequestString(); $post = $this->getRequest()->getPost(); $method = ( count($post) == 0 ) ? ‘GET’ : ‘POST’; /** * You can add additional * headers like cookies, redirects and so on * if you need it here. */ $client = new Varien_Http_Client($uri); $client->setParameterPost($post); $response = $client->request($method); $body = $response->getRawBody(); return $body; } }
    Fatal error: Class ‘Mage_Project_Block_Noroute’ not found in /srv/www/virtual/admin208/domains/test.regiolade.ch/public_html/magento/app/code/core/Mage/Core/Model/Layout.php on line 461

    What problem do I have? I checked several times the Magento_Project.xml --> it is as described above, also the directory-structure matches. What I’m doing wrong?

    I’m on 1.2.0.2

    Thanks for some help
    JeDo

  37. the2ndday

    37the2ndday |posted January 27 2009

    @jedo did you put “<?php" and "?>” around the code?

    if you didn’t try it.

  38. jedo

    38jedo |posted January 27 2009

    Thank you for the tip

    Yes, I havn’t put it. I think, somone should enhance the description.

    But anyway, I’m not rocking.
    Now I got a magento screen from report saying “Unable to read response, or response is empty” followd by 20 lines of trace-info.

    Can this issue also be tested with a native html files? Only to be shure mediawiki is not the problem…

  39. Anuya

    39Anuya |posted February 25 2009

    I am trying to build a website that covers a little bit of news, but the main focus is to buy, sell or trade website. Where Registered users can Post Items and pictures of there items if necessary. I need to know the best CMS for this. And best of all, easy to use. No mater what if its Free or Paid I just need some feedback and opinions. Thank You by Anuya ...!!!

  40. XWare

    40XWare |posted April 1 2009

    Battling to get this to work as well.

    Installed a phpbb3 forum under myserver.com/magento/forum but when I access the myserver.com/magento/forum url I just get the forum with no magento headings etc.

    When I try to access for example myserver.com/magento/test (which is located at myserver/magento/forum/test) I get a

    The requested URL /magento/index.php/forum/test/ was not found on this server.

    Trying really hart to get this to work.

  41. XWare

    41XWare |posted April 1 2009

    Just with regard to above, with accessing myserver.com/magento/test I get the full Magento Headers etc and the invalid URL message in the body.

  42. thaddeusmt

    42thaddeusmt from Bozeman, MT|posted May 1 2009

    Hmmm. I got this to work just fine in WordPress (although it took some hacking to get links to work quite right), but there are two big problems I see with this and I will have to adapt this technique more… or throw it out the window I think. They are:

    1. The page HTTP response headers are all 404/Not Founds! I’m sure there is a way to override this with 200s… but until I figure that out it’s a no-go. Bad form, and I don’t think you want to return 404s on actual content to Google…
    2. No clean way to get Page titles and Meta (keywords, description, and canonical urls) info from the wordpress pages. If you override _prepareLayout() as well as _toHtml() you can set them, but it’s kind of ugly and difficult to pass some of that information from the CMS pages (which no longer have a header or footer, of course.

    Until someone (me?) figures out the Magento routing system a little better and makes a cleaner module to do this, I recommend Branko’s technique (which has plenty of it’s own drawbacks, but hey):
    http://activecodeline.com/wordpress-and-magento-integration-one-way-to-go/

    Cheers

  43. Classy Llama Studios

    43Classy Llama Studios from Springfield, MO|posted May 2 2009

    I have successfully implemented this concept on two live sites:
    http://beeyoutiful.com/articles - this page (and all article pages) is loaded from WP
    http://www.redvelvetart.com/category/press

    I’ve created a basic module that will load content from a CMS system (not WP specific!) installed on a subfolder of your Magento site.

    I have had this code sitting around for quite a while and have been meaning to package it up so that anyone wanting to use this method could use my code.  After experimenting with this method, I realized that 404 headers were being sent to the browser.  This is obviously a problem for anyone concerned with SEO.  I dug around and found that that CMS controller was sending the 404 header.  It took me a while, but I figured out how to override the CMS controller with a custom controller.  I’ve packaged up my files into a ZIP file.  I have detailed instructions in the ZIP file.

    If you have any issues, please post them here and I’ll try to respond to them when I can.

    Download files here: http://budurl.com/magexternalcms

    I’m also copying the instructions below:

    1. Copy contents of /htdocs folder into the root of your Magento installation. 
    If you’re on a Mac, you’ll need to use the command line, otherwise Finder will replace all the contents of the root Magento folder.
    You can do this by running this in Terminal “cp -r EXTRACTED_DIRECTORY/htdocs MAGENTO_DIRECTORY/” - replace the
    uppercase words with their proper folder locations.

    2. Open the /app/code/local/UMA/ExternalCms/Block/RemoteContent.php file.  Modify line 5 and 6 to fit your needs.

    3. You’ll need to make sure the contents of /design/frontend/default/default/ are placed in your active theme. 
    Lines 77-80 of /design/frontend/default/default/layout/cms.xml are the important lines in the cms.xml file. 
    You will probably just want to copy those lines out of that cms.xml and merge them into your current cms.xml file.

    4. In the admin panel, disable the “404 Not Found” page

    5. Now, when you go to:  http://www.example.com/custom-cms-page
    Your module will now try to load the content from this page: http://www.example.com/CMS_PATH/custom-cms-page and will
    display it in the content section.
    The CMS_PATH variable is defined by the variables indicated in step #2.

    6.  IF the http://www.example.com/CMS_PATH/custom-cms-page page can not be found (or if the CMS returns
    a page with a 404 header) this module will display the contents of this file:
    /app/design/frontend/default/default/template/exernalcms/no-route.phtml

    If that page is displayed, you’ll be able to find an html comment with this content:
    <!--We’re sorry, there was no 404 CMS page configured or found. Tried to load page: http://www.exampe.com/wordpress/bad-page-url-->
    I added this for my own debugging purposes so I could see what page was trying to be loaded.

  44. thaddeusmt

    44thaddeusmt from Bozeman, MT|posted May 3 2009

    @classy llama studios

    Nice work! I’m now trying to figure out how to still return 404 headers on actual 404s. My craptacular solution so far is to request the page header of the CMS page in the IndexController, but I’m not stoked on that because I have to request the page again to get the actual content in RemoteContent.php. It would be nice if there was a way to only make one request to Wordpress, I’ll keep at it.

    But anyway thanks! Now to work a good way to get the page title…

  45. kona

    45kona |posted May 3 2009

    Tried the first solution, didn’t work at all, i Got the same error as Dancoz (Fatal error: Class ‘Mage_Project_Block_Noroute’ not found in \app\code\core\Mage\Core\Model\Layout.php on line 461 )

    Tried your solution as well Classy Llama. I got no error, but it just doesn’t seem to work. I load one of the custom pages and it simply loads the front page of my website instead. Do you do freelance work for clients? I would be happy to pay you to get this working for me. And possibly other stuff as well. Email me at alkali at ihug.co.nz if you do, or anyone else who can help get this working.

  46. Classy Llama Studios

    46Classy Llama Studios from Springfield, MO|posted May 3 2009

    Kona, I’m sorry you weren’t able to get the module working.  I sent you an email to the address you provided.
    Erik

  47. mohan2009

    47mohan2009 |posted May 20 2009

    Hi Classy Llama Studios,
    I’m interested in integrating magento-drupal, I have gone through your tips given above and downloaded the zip folder. On implementation with drupal I got a blank page with magento header.On refreshing the cache, I got the magento 404 page.
    I am sure, your package is proven and the 2 sites you have links here are the the proof.
    Why I have failed?
    The detailes are:
    WAMP - LOCALHOST - MAGENTO is at WWW/magento, - drupal is at www/magento/drupal.
    not understood things are:
    1).DS_Store files provided in your package.
    2)Do I need to copy the various files in the corresponding folders in magento?
    3)what is - Copy contents of /htdocs folder,
    4)Drupal is ok are not for this integration.
    5)RemoteContent.php file.  Modify line 5 and 6 to fit your needs.  I have put ‘/drupal/’
    at line5, and ‘/drupal’ at line 6.
    guid me please.
    mohan2009,
    NZ

  48. Classy Llama Studios

    48Classy Llama Studios from Springfield, MO|posted May 20 2009

    @mohan2009

    Here are the responses to your questions:

    1. You can ignore those files.  They are Mac OS X specific
    2. Yes.
    3. You will need to copy the contents of the ZIP file that I provided to the associated Magento directory.
    4. Drupal should work.
    5. Those values should work.

    Make sure you have the 404 Page disabled in the CMS Pages in Magento.

    View the source of the page that you are accessing in order to view the page from Drupal.  Search for this text:  “there was no 404 CMS page configured or found” The module is setup to show you what page the CMS module tried to request content from.  This may be helpful in your debugging.

    Do you have a publicly accessible link I could look at to help you with troubleshooting?
    Erik Hansen,
    Classy Llama Studios

  49. mohan2009

    49mohan2009 |posted May 20 2009

    Hi
    Erik Hansen,
    Classy Llama Studios
    THANKS FOR THE IMMEDIATE RESPONSE.
    Yes, It is working . Great!!!
    I have reinstalled both magento1311 and drupal622 afresh and done your package..
    It is a Straight go. Without any further troubles.
    But
    1)the style problem like password, user name fields are with red curser and type,
    2)’LOCALHOSTLOCALHOST’ an anchored link to magento home page is appearing in the heading.
    3)Missing the aesthetic look. may be style sheets.
    Any comments from your side as a whole about its improved look
    Request comment at point no2 in particular pl.
    I dont have a web site to arrange access to you, unfortunately,
    as I am studying these packages at my localhost at present.
    Any suggestions regarding economicxal/free hosting places for site testing,
    so that my site can be accessable to you for guidence pl.
    with regards

    mohan

  50. Classy Llama Studios

    50Classy Llama Studios from Springfield, MO|posted May 21 2009

    @mohan2009

    It sounds like #1 and #3 can be overcome with some custom CSS.

    #2 I don’t know what the issue with that would be.  I’d have to dig around in the code to be able to figure that one out.

  51. mohan2009

    51mohan2009 |posted May 23 2009

    Hi
    Erik Hansen,
    Thanks.
    But now because of the user log in issue between d and m, I stopped working further on it.
    I want to switch to M and J. of course, with the help of jfusion. Now the problem here is,
    the code goes into the .htaccess file

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
    ------------------------
    where to put this code in joomla, since it is not using .htaccess file.
    Or with out this, will it work?
    In my experment I am getting
    “There was no 404 CMS page configured or found. “
    from app/design/frontend/default/default/templates/cms/default/no-rout.phtml
    page with m headers and footers. and no side bars.
    I have disabled the 404 page.
    Advise pl.

  52. mohan2009

    52mohan2009 |posted 1 month ago

    Hi
    Erik Hansen,
    do we need to change this code to suit to J ?I f so what?
    //Change all links from /wordpress/*** to /***
    $body .= preg_replace("/{$this->cmsLinkBase}\/(?!wp-content|xml|wp-includes)/", ‘’, $bodyRaw);
    regards!

  53. Classy Llama Studios

    53Classy Llama Studios from Springfield, MO|posted 1 month ago

    @mohan2009

    You will need to make sure you can access your Joomla pages directly.  So if your Joomla install is located on http://example.com/joomla/ you need to be able to access that page directly. If Magento loads, then there’s a problem.  You’ll need to make sure Joomla’s URL structure is setup to NOT use the /index.php/ file.  All Joomla pages should be accessible by adding the page slug to the joomla base url. ie:  http://example.com/joomla/about-us

    If Joomla is not currently setup like this, you’ll need to figure out how to turn that setting on in the Joomla admin, OR you can download and install a SEO plugin for Joomla that will enable that functionality.

    Regarding changing the code you listed above… Currently, when the module loads up a page, it searches for all links that are linking to the installed location (ie: http://example.com/joomla/about-us) and removes the CMS Url base from it (ie: http://example.com/about-us).  This code: “wp-content|xml|wp-includes” tells the module to replace all instances EXCEPT any that contain any of those items.  This allows the CMS to send back links to this file:  http://example.com/joomla/css/style.css and the module WON’T replace them.

  54. mohan2009

    54mohan2009 |posted 1 month ago

    Hi
    Erik Hansen,
    Thank you for your tips. I will come back to you with the results when I am ready.
    regards
    mohan

  55. yayo

    55yayo |posted 4 weeks ago

    Hi
    Classy Llama Studios, thanks for your post but… it’s impossible, don’t work!
    I’m working with xampp - localhost - magento: www/magento and wordpress www/magento/wordpress

    I copied contents of your directory “ExternalCMSModule” in the root of Magento folder.
    The steps 2, 3 and 4 are made
    But, when I write localhost/magento/custom-cms-page the module don’t try to load the content from the page: localhost/wordpress/custom-cms-page. Only I can reed: “There was no 404 CMS page configured or found. “

    Can you help me?
    regards

  56. zkorosi

    56zkorosi from Hungary / Magyarország|posted 4 weeks ago

    ’Classy Llama Studios’ <<< THANKS!

    It works with Wordpress! For me need to change ‘getRawBody’ to ‘getBody’ in the code, but it’s ok.
    If you have a new version, please send me a message, if possible! grin

    Thank you again!
    regards
    Zozo

  57. Classy Llama Studios

    57Classy Llama Studios from Springfield, MO|posted 4 weeks ago

    @yayo: try viewing the source of the 404 page to look at the debug information that I’ve coded the module to post.  Make sure that the page that it’s requesting is correct.  Also, make sure the module is enabled by going to System > Config > Advaced > Disable Module Output.

  58. yayo

    58yayo |posted 3 weeks ago

    Thanks for your reply, “Classy Llama Studios”. The module is enabled but don’t work. I don’t know… don’t work. The reason could be that I’m working with xampp and a directory called magento. I’m installing magento on a server and I’ll try it.
    Thank you again.


© Copyright 2009 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
108627 users|317 users currently online|199685 forum posts