How to add Magento blocks, CSS and Javascript to an external site

23 Comments

You might have a Magento based website running online and wanted to extend parts of it (also known as blocks, which may include some css and js in the code) to an external site which may either be a blog, another CMS or any other PHP based web application. If you have been following my previous posts, you will know that by adding the Mage.php file of your Magento instance to your application, you can actually pull the needed HTML blocks at any time. The only problem is that most of the examples available online asks you to use the getChildHtml(‘your-block-here’) in which most the time frustrates you because of its complexity and limited resources of how you can actually use it.

There are other ways of doing it. Oddly enough, some are pretty simple and straight forward.
More

How to add a product with custom options into Magento shopping cart from an external site?

7 Comments

This is a follow up post to a previous article I wrote on how to add products into Magento but this time the script includes custom options (attributes) of the product. I used Magento version 1.4.0.1 in this example. Just copy the whole script and save it as index.php.

More

How to fix the ‘The plugin does not have a valid header’ error when activating a WordPress plugin

No Comments

You want to extend WordPress’ functionality and decided to download some plugins found in the Official WordPress Plugin repository. After searching the repo, you’ve found two plugins that accomplishes the tasks you needed to implement in your blog. Downloading the plugins gives you two ZIP files that when double-clicked, shows you the contents in the following format:

plugin-a.zip

plugin-a-folder
---- plugin-a-main-file.php
---- plugin-a-readme.txt

plugin-b.zip

plugin-b-folder
---- plugin-b-subfolder
-------- plugin-b-main-file.php
-------- plugin-b-readme.txt

More

Back in Manila!

No Comments

As a treat, here are some of the photos I took while on vacation :)

Sunset at Paguriran Island

More

Will be back next week!

2 Comments


Hey guys, I’ll be on vacation starting on Monday. Will try to answer your inquiries if I have an internet in the area (which I doubt.) Be back on Thursday!

Mage Enabler is now available for download in the Official WordPress Plugin repository!

4 Comments

I’m soooo happy to see my very first plugin to be released for everyone to use. I hope it will help a lot of Magento and WordPress users!

Click! click! click!

Mage Enabler: A plugin to run Magento's session within WordPress

79 Comments

Mage Enabler

Update (May 12, 2010): Mage Enabler is now available in the Official WordPress Plugin repository. Get it here!

It’s been a while since I posted my tweak that allows Mage object to be utilized within any WordPress installation. The tweak requires the blog owner to modify functions.php as stated in my post. I’m inspired by the feedback of the readers who used the tweak so I decided that a plugin that does the same thing should be made to prevent modifying the WordPress core files thus preventing the tweak to cause inconsistencies when an upgrade is necessary.

More

WordCamp Philippines on October 2010!

3 Comments

I’m sooo excited about this! For those who don’t know what WordCamp is, here is an excerpt from their site:

WordCamp is a conference that focuses on everything WordPress.

WordCamps are informal, community-organized events that are put together by WordPress users like you. Everyone from casual users to core developers participate, share ideas, and get to know each other. WordCamps are open to WordPress.com and WordPress.org users alike.

It is scheduled on October 2 this year and they haven’t publish any details yet, but what the heck! I’m still going! So fellow WordPress bloggers, hop on to our mothership!

How to use Magento’s session within WordPress

120 Comments

Update (May 11, 2010): I created a WordPress plugin for this one. Check it out here.

You have a free WordPress blog that has been online for sometime. You love its simple yet powerful way of managing your content so you’ve decided to have it hosted to a different provider in order to have a more granular control to its code and functionality. Eventually, you needed cash to support the hosting expenses so you decided to utilize your blog for e-commerce use. That’s when Magento comes in to the scene. You want to find a way to use Magento as your backend while pulling your catalog and customer information to be posted to WordPress site. This is what my article is for.

More

How to run Magento (version 1.4.0.1) session into an external site?

24 Comments

This post is an update for my blog entry on how to extend the Magento session to an external site but instead of using the version 1.2.1.2, I used the the latest stable version as of this writing which is version 1.4.0.1. The script below also implements the login() and logout() method the Magento way as well as extracting the customer data (firstname and lastname) using getCustomer() method.

More

Older Entries