Archive | Ecommerce shopping cart RSS feed for this section

Magento Ecommerce – Create New CMS Page & Add Link in Top Menu Along with Category Links

3 Nov

Magento Ecommerce: Create a new CMS page and have the link to it show up in the menu alongside the category links.

Brick House Bakery project: adding the Survey page link to the top navigation bar, alongside the existing category links.

1. Create a new CMS page, titled Survey, in Magento’s admin (Admin > CMS > Manage Pages > Add New Page)

This is our newly-created page’s path: http://www.brickhousebakery.com/survey

2. Add “Survey” link as a line-item (<li>) to the top menu (root > magento > app > design > frontend > default > default > template > catalog > navigation > top.phtml)

top.phtml file:

<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@magentocommerce.com so we can send you a copy immediately.
*
* @category   design_default
* @package    Mage
* @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
* @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
*/
?>
<?php
/**
* Top menu for store
*
* @see Mage_Catalog_Block_Navigation
*/
?>
<div class=”header-nav-container”>
<div class=”header-nav”>
<h4 class=”no-display”><?php echo $this->__(‘Category Navigation:’) ?></h4>
<ul id=”nav”>
<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php echo $this->drawItem($_category) ?>
<?php endforeach ?>
<!– bof – added line-item so survey link will appear in the navigation alongside the existing category links –>
<li><a href=”http://www.brickhousebakery.com/survey/”>Survey</a></li>
<!– eof – added line-item so survey link will appear in the navigation alongside the existing category links –>
</ul>
</div>
<?php echo $this->getChildHtml(‘topLeftLinks’) ?>
</div>

Share:
  • Facebook
  • Twitter
  • Tumblr
  • LinkedIn
  • MySpace
  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Yahoo! Buzz
  • Google Bookmarks
  • email
  • Posterous

Integrate WordPress Blog into Magento Ecommerce using Lazzymonks WordPress Integration 2.61 Extension

22 Oct

Integrate WordPress Blog into Magento Ecommerce Shopping Cart using Lazzymonks WordPress Integration 2.61 Extension
Successfully installed Oct 21, 2008
Application versions: Magento 1.1.6 & WordPress 2.6.2
Hosted on 1&1 Internet

This extension adds the ability to integrate WordPress blog into Magento.
It has adjustable page layout from with in the WordPress admin menu.
WordPress menu can be set to show in the left column, right column, both or neither.
A link in the Magento footer can be enabled or disabled.
And the page title can also be set.
When everything is setup, separate WordPress login and Magento login is still required to operate each application.

1. Install working version of Magento Ecommerce first

2. Upload WordPress directory into a Magento sub-directory called “wordpress” (magento/wordpress)

3. Add Magento’s DB info to WordPress’s wp-config.php file (this is the same MySQL database that all the Magento files are already in – you’ll be mixing the WordPress files in with the Magento files in the pre-existing Magento database)

4. Acquire the Lazzymonks WordPress Integration 2.61 Extension “key” from Magento Connect. The “key” is currently called: magento-community/Mage_Blog

5. In Magento’s admin, go to the Magento Connect Manager (System > Magento Connect > Magento Connect Manager), login in again, click on the Settings tab and change the Preferred State to “beta”

6. Click on the Extensions tab and paste “magento-community/Mage_Blog” (without the quotes) into the “Paste extension key to install:” box and click Install. (The new WordPress integration extension should show up at the bottom of the page)

7. Click on the Settings tab again and change the Preferred State back to “stable”

8. Go back to Lazzymonks WordPress Integration 2.61 Extension page and follow the instructions starting about half-way down the page (or see #9 below, which is taken from Lazzymonks page)

9. Two of the following files and the theme folder can be found in the Magento base directory, in a folder called “wordpress_module_files” (this folder was installed in Magento’s base directory during the WP Integration extension installation in the Magento Connect Manager). Copies of these files, with “some” of the changes already applied, are included in the extension files (which are in the “wordpress_module_files” folder). These files, however, should be used with caution – double-check all of these files in the “wordpress_module_files” folder against what Lazzymonk recommends on his Magento extension Web page (http://www.magentocommerce.com/extension/296/lazzymonks-wordpress-integration)

9.1. Find index.php in the root of your Magento installation and find the following line of code:

require_once $mageFilename;

And add the following after it:

define(‘WP_USE_THEMES’, true);
require(‘./wordpress/wp-blog-header.php’);

(You will need to be sure that the second line points to the location of your WordPress installation, as it is, it assumes WordPress is installed in the Magento directory.)

9.2. In wordpress/wp-settings.php find the following lines of code and remove the & symbol

Around line 399 (line 472 in WP v2.6.2):

$wp_the_query =& new WP_Query();

Around line 414 (line 487 in WP v2.6.2):

$wp_rewrite =& new WP_Rewrite();

Around line 421 (line 494 in WP v2.6.2):

$wp =& new WP();

Around line 456 (line 530 in WP v2.6.2):

$wp_locale =& new WP_Locale();

9.3 Also in wordpress/wp-settings.php remove or comment out the following lines, around line 386 (line 459 in WP v2.6.2):

// Escape with wpdb.
$_GET = add_magic_quotes($_GET );
$_POST = add_magic_quotes($_POST );
$_COOKIE = add_magic_quotes($_COOKIE);
$_SERVER = add_magic_quotes($_SERVER);

9.4. In wordpress/wp-includes/l10n.php at line 116

Change:

function __($text, $domain = ‘default’) {
return translate($text, $domain);
}

To:

if (!function_exists(‘__’)) {
function __($text, $domain = ‘default’) {
return translate($text, $domain);
}
}

9.5. Now, on to the WordPress part: Copy the “magento” theme in the wordpress_module_files/wordpress-theme folder into the wordpress/wp-content/themes folder.

9.6. Log into the admin panel of WordPress and click the “settings” link. Then, change the “Blog address (URL)” to: http://yoursite.com/magento/blog (or, change it to fit your site), but leave the “blog” directory part in the URL. Save settings. Then, click the permalinks tab and ensure that permalinks are set to default. Finally, click on the “design” link and select the WordPress Magento theme installed in step 9.5.

9.7. Now go to http://yoursite.com/magento/blog to access the blog. Mine is actually located at http://www.aqwearium.com/blog, without the extra magento directory in the URL

10. Configuring the WP Integration in Magento’s back-end admin: System > Configuration > Blog (under the General tab in the left-hand menu)

Share:
  • Facebook
  • Twitter
  • Tumblr
  • LinkedIn
  • MySpace
  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Yahoo! Buzz
  • Google Bookmarks
  • email
  • Posterous

Magento Ecommerce – Removing index.php Text from URL

4 Oct

http://www.magentocommerce.com/boards/viewthread/4761/

Example:
So instead of this: http://www.domain.com/INDEX.PHP/category
I get this: http://www.domain.com/category

Share:
  • Facebook
  • Twitter
  • Tumblr
  • LinkedIn
  • MySpace
  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Yahoo! Buzz
  • Google Bookmarks
  • email
  • Posterous