Magento WordPress Integration for multiple Websites via sub-directories.
Using Lazzymonk’s dated Magento WordPress module and a WordPress community plugin called “Mage-enabler“. I am using subdirectories to have multiple Magento websites all into the same Magento installation. Everything seems to work fine until I noticed the WordPress URL’s only contained WordPress’s baseurl, and not Magento’s, causing the Website scope to be lost and the user being reverted back to the default website after clicking another link within the WordPress integration.
My structure is similar to:
United States Magento URL:
/us/
United States WordPress Blog URL:
/us/blog/
United Kingdom Magento URL:
/uk/
United Kingdom WordPress Blog URL:
/uk/blog/
In app/code/community/Mage/Blog/controllers/IndexController.php after this line
if (Mage::getStoreConfig('blog/blog/enabled'))
{
I added:
<?php
# Base URL rewrites for WordPress - mb
$baseurl = Mage::app()->getStore()->getBaseUrl();
define('WP_HOME',$baseurl.'blog');
define('WP_SITEURL',$baseurl.'blog');
?>
Which causes WordPress’s base URL to be set to Magento’s and not loose website scope.
This may also work with different setups for multiple websites within Magento. But I have not tested it with any other setup.
Another plus to using the Mage-Enabler WordPress plugin is the ability to call on anything from Magento into WordPress. Some examples would be pulling in a customers first and last name, or showing how many products are in the users cart, etc. ![]()
Possibly Related Posts:
- Magento vs X-Cart
- Magento version 2.0 (X.Commerce) and eBay
- Magento Supercharged Development Tools and Links
- Book Review: Magento 1.4 Themes Design by PacktLib
- Magento modules post deployment uninstall & downgrading
29Sep2010
Magento Module Developers: Stop encrypting & domain jailing!
After spending, let me rephrase that. After wasting almost 4 hours now on simply trying to get a “licensed” or “purchased” Magento module from a 3rd party development shop. I have now come to the same conclusion I had back when I was selling X-Cart modifications: Encrypting your code will do nothing but hurt you in the long run.
Most will ask, but if I do not than anyone can easily use my module on multiple domains/stores without my knowledge and no more money in my pocket at the end of the day.
A few things to pounder. For one, does Magento charge you anything for its community edition which in essence isn’t much different base code wise to Pro and Enterprise? – No. Why does Magento not charge a huge amount up front for such a great piece of software? It’s pretty simple. Get the code (100% open of course) to the masses as quickly and easily as possible. Magento does NOT offer official support for this “Free” software package. If you do want their help its going to cost you. Support is built-in to the pricing schemes and business model Magento uses for Pro and Enterprise. I think its one of the main selling points along with all of the extra modules for bells and whistles larger companies want and need.
Disadvantages of encrypting your code:
- Obviously: It is (almost) impossible to modify or extend for custom needs, without having to contact the original developer which adds more cost to your end user as well as causing more time for “custom” development.
- 3rd party server software like Zend Optimizer is needed in order to execute the encrypted code. Which can be a headache by itself.
- Confusion during transfer for binary and text data, ultimately corrupting your binary encrypted data.
- It is impossible to have others contribute to your code to improve it, and/or help with bug finding and fixes.
- As a store owner or maintainer I’m less confident you are not utilizing any of my data collected from my stores.
- Maintenance becomes chaotic. Having to re-encrypt every release, can be quite pain staking. This is especially true if you have a bug fix that needs to be offered to all of your customers using it – however, the ones with “Custom” versions will require re-encryption for all. Unless your using some kind of release management that handles this automatically for you. Most don’t I’m sure.
My next gripe is phoning home to some service the 3rd party module developer has setup to make sure I’m not using the module on other domains. The allowed domain locations are either a) stored within the encrypted file itself (which can make #6 listed above even more of a problem) or b) remote calls to a service the module creator maintains.
A few problems with this are:
- Most development shops these days use multiple stacks of development areas. Local, Development, Staging and Production. Again more headache for the end user of your module as I’m going to have to setup hosts files now in order to use the module without being thrown an error.
- If you are using remote calls to a service, you run the risk of this service being taken down for whatever reason either permanent or temporarily. Causing more grief from the end users who have paid for the module and are trying to take advantage of it. This can really hurt if its stricken enough the service goes down, the module can’t validate on the customer front end; possibly causing a loss of a sale or potential customer.
The Soultion:
Follow Magento’s lead. Drop the price of your modules or even make them free. Anyone who has done development that has been sold for consuming knows you will spend the majority of your time doing support than actual development. Take advantage of this for those one on one customizations or consulting for your end user by simply making your time more valuable. Your code will prosper, the end users are happier with less headaches and can even make modifications as they please.
Again this is just my opinion of a more “in the now” business model to take and to stop being so paranoid about pirating.
In the end its just like your home or car. If someone wants into it bad enough, they WILL find a way theres nothing you can do but place preventative measures in place to slow them down. Hopefully no one see’s someone who purchases or uses their software as thieves. ![]()
Possibly Related Posts:
- Magento vs X-Cart
- Magento version 2.0 (X.Commerce) and eBay
- Magento Supercharged Development Tools and Links
- Book Review: Magento 1.4 Themes Design by PacktLib
- Magento modules post deployment uninstall & downgrading
23Sep2010
Mr.doob’s awesome inspirational work

Some of the best demo scene influenced Javascript, HTML5 and Actionscript productions I’ve had the pleasure to lay my eyes on in quite some time. Really inspirational stuff Mr Doob! ![]()
Possibly Related Posts:
- Magento vs X-Cart
- Magento version 2.0 (X.Commerce) and eBay
- Magento Supercharged Development Tools and Links
- Book Review: Magento 1.4 Themes Design by PacktLib
- Debugging tips & tricks with Magento Commerce
06Sep2010
“You Should” by Haujobb (Evoke 2010 Invite Demo)
It’s nice to see Haujobb still doing their thing after all these years. Here’s one of their most recent productions an invite to the Evoke 2010 Demo Party. Enjoy! ![]()
Download the original executable to view in its original “should be” viewed state.
Another production to check out is NoSYS’s “Finally Inside” which took home 1st place at the competition.
Possibly Related Posts:
- Mr.doob’s awesome inspirational work
- Farbrausch: debris
- Best 4k Demo EVER! Texas by Keyboarders
- Everything is Under Control – Break Point 09 invite demo
- Favorite Demos on YouTube in a playlist
03Sep2010
Magento Commerce Error Reporting Tip
Whoops, our bad…
The page you requested was not found, and we have a fine guess why. If you typed the URL directly, please make sure the spelling is correct. If you clicked on a link to get here, the link is outdated.
What can you do?
Well, you can start by looking in /var/report/ and view the file that corresponds with the error ID on the web address. ![]()
This is just a merely nice page to display to end users as not to display any nasty php errors to them. However looking at these reports can lead useful if your needing to find out more details on whats causing the issues.
Didn’t realize this until tonight, I must be slow…
but thought I would share. ![]()
Possibly Related Posts:
- Magento vs X-Cart
- Magento version 2.0 (X.Commerce) and eBay
- Magento Supercharged Development Tools and Links
- Book Review: Magento 1.4 Themes Design by PacktLib
- Magento modules post deployment uninstall & downgrading
09Dec2009













