Running CodeIgnitor and WordPress in same root directory

Posted in Content Management Systems, Web Development on July 7th, 2011 by admin – Be the first to comment

Once we had a situation of running WordPress based site and CodeIgnitor based application in same root directory. The main site was built in WordPress and the SAAS application was built in CodeIgnitor. There was one issue which was prohibiting us to have files of both apps in same directory level. Both application had their own “index.php”. So to avoid file conflict we renamed renamed CI’s index.php to “ci-index.php”. Then used Apache’s mod_rewrite module to redirect CI based SAAS application’s request to ci-index.php. Fortunately all the SAAS application’s path were starting with “/admin” so we added following rewrite condition in “.htaccess” file.

RewriteCond %{REQUEST_URI} ^/admin/(.*)
RewriteRule ^(.*)$ /ci-index.php?/$1 [L]

If you know any better way to implement this do post your thoughts here.

OpenCart Shipping Module – Flat Shipping Rates – Slabs

Posted in E-Commerce Application Development on April 6th, 2011 by admin – 1 Comment

If you charge shipping based on order total or product weight then this module is for you. It supports geo zone. You can configure separate shipping charges for each geo zone. Set as many flat rates slab as required. Click here to download

Example rates schedule:

Enabling SEO URLs in OpenCart

Posted in E-Commerce Application Development, Search Engine Optimization, Web Development on December 29th, 2010 by admin – Be the first to comment

OpenCart  have inbuilt SEO friendly URLs feature. To enable SEO URLs in OpenCart follow these steps. Also make sure you have mod_rewrite module enabled already. If it’s not consult your hosting company.

1. Rename your htaccess.txt to .htaccess.
2. If you have installed OpenCart in a sub directory then edit “RewriteBase /” in .htaccess
2) Log into admin area.
3) Go to Admin->Configuration->Settings->Server and check SEO URL option Yes.
4) Then you have to enter SEO keyword field in every products/categories/information etc. on edit forms. Refer attached screen shot.

OpenCart shopping cart system an alternative of osCommerce

Posted in E-Commerce Application Development, Web Design, Web Development on December 25th, 2010 by admin – Be the first to comment

We recently started providing development and customization services on OpenCart. OpenCart is a turn-key ready “out of the box” shopping cart solution. You simply install, select your template, add products and you ready to start accepting orders. It has got all the features you need to run your e-store.

We have been doing development in osCommerce and Magento for the last couple of years both of them are an excellent open source shopping cart applications but the problem is the default skin of osCommerce is very basic. You always have to completely modify/alter store front’s template but admin interface remained same. The problem is client’s does not like the admin interface at all.

Then came Magento. We did many projects in it. It’s a complete, well thought and well written shopping cart system. This again was not the solutions what we are looking for. It’s over complicated. It takes more time to develop any extension as compared others and the top most drawback is that it’s very slow. You always need dedicated high end servers.

OpenCart is our ultimate choice now. It’s database architecture and front-end is like osCommerce but far better than OSC. It’s admin looks like magento but is not slow like Magento. It’s based on MVC architecture, very similar to CodeIgnitor. If you know CI and OsCommerce then OpenCart development is very easy to learn.

We just completed one project based on OpenCart http://www.medi-dyne.com/estore and developed two extentions.
Local Tax Total Module
Flat Shipping Rates – Slabs

MODx Revolution 2.0 Released

Posted in Content Management Systems, Search Engine Optimization, Web Design, Web Development on July 23rd, 2010 by admin – Be the first to comment

MODx Team has released the most awaited MODx Revolution 2.0.0-pl. The Revolution version completely differs from MODx Evolution version. It uses the database modeling framework (xPDO).

The MODx Revolution model supports multiple sites on one core install, install the core outside of webroot, pick any name for the manager and assets directories, change and restructure every manager menu option. Now MODx Revolution version is a better candidate for larger sites with lots of traffic.

The new framework supports override system. You can now extend or override any part of the MODx core cleanly and simply, all the while maintaining a clean upgrade path for future releases. Now you can run multiple sites from single MODx installation. Read more here http://s3url.in/aT

Launched S3URL.in – Free URL Shortening Service

Posted in Web Design, Web Development on June 24th, 2010 by admin – Be the first to comment

Launched free URL Shortening and URL Redirection service. Shorten long web addresses quickly and easily, with no registration required. Share short and sweet URLs with Twitter, Face book, Blogger, Delicious, Digg, MySpace, Google Reader, Gmail or your default mail client.

Use API interface to access this service and generate short URLs via your program. API access is accessible only to registered users. Create an account and request API key. Registered users can also get their links published in the archive section.

Click here to shorten your long URLs

jQuery light weight FAQs accordion plugin

Posted in Content Management Systems, Web Design, Web Development on June 6th, 2010 by admin – Be the first to comment

This is a simple light weight jQuery plugin to implement accordion behavior for FAQs. All answers are hidden except first one. When question is clicked answer is shown. No custom css is needed, use your existing css. Add the “jquery.faq.js” between head tag of your FAQs page.


<script src="jquery.faq.js" type="text/javascript"></script>
<script type="text/javascript">

   $(document).ready(function() {

      jQuery('.questions').faq();

    });
</script>

The faqs should look like this

<div class="questions">
            <h3>Question 1</h3>
            <p>Lorem ipsum dolor sit amet consectetuer adipiscing Cum eu sed Vestibulum. Condimentum malesuada faucibus id Nam Curabitur nibh a arcu Phasellus wisi. Ac at ut nibh sollicitudin nunc mauris.</p>

            <h3>Question 2</h3>
            <p>Nulla nec mauris et Vivamus vitae felis id est turpis vitae. Nibh sollicitudin at fringilla adipiscing ante et Maecenas nibh semper quis. </p>

            <h3>Question 3</h3>
            <p>Quis et In ut justo auctor id wisi quis Donec pede. Ipsum Suspendisse sapien pretium id laoreet nulla Mauris hac ac nulla. Wisi tellus Lorem porta.</p>
      </div>

Click here to download

 

Multiple domains with single MODx Installation

Posted in Content Management Systems, Search Engine Optimization, Web Design on May 22nd, 2010 by admin – Be the first to comment

Multiple domains can run from single MODx installation evolution version. You need to install few tweaks in the core and install some plugin and snippet. There are already few existing ideas mentioned in the MODx Forum. MODx is so flexible and advance that you hardly need to modify any core files but to implement multiple domains we had modified one of the core function of the MODx framework.

Make sure you take backup of the file before making any changes also note that whenever you upgrade the MODx version these can get replaced.

With our approach you will be able to setup any number of domains with single MODx installation and all domains can share common pages also. Make sure you replace “www.mydomain.com”, “www.mydomain.in”, “www-mydomain-com”, “www-mydomain-in” with yours.

Let’s say you want to run 2 domains with single installation:

1. www.mydomain.com (for international customers)
2. www.mydomain.in (for Indian customers)

You need to create site structure like this:
+www.mydomain.com
–index.html
–services.html
–products.html
–about.html
–faq.html
–contact-us.html
–404.html

+www.mydomain.in
–index.html
–services.html
–products.html
–about.html
–faq.html
–contact-us.html
–404.html

common pages shared by both the domain.
links.html
resources.html

1. Enable User-Friendly URLs
First of all you need to enable User-Friendly URLs for your modx installation. Go to Tools >> Configuration >> User-Friendly URLs:

* User-friendly URLs, use: yes
* Suffix:. html
* Use user-friendly alias path information: yes
* Allow duplicate aliases: yes
* Automatically generated aliases: yes

2. Create Sitemap
1st create new document and give it’s title as “www.mydomain.com”, alias as “www-mydomain-com” and deselect show in menu option and create rest of the pages under it.

2nd Create new document document in the root with title “www.mydomain.in” alias as “www-mydomain-in” and show in menu deselected and create rest of the pages under it.

3. Create a plugin
Now you have the site structure ready but the page’s URLs are like following:

www-mydomain-com/index.html
www-mydomain-com/services.html
www-mydomain-in/index.html
www-mydomain-in/services.html

Next step is to create a plugin to remove domain name’s references from the URLs generated by MODx.

1. Go to Admin >> Manage Resource >> Plugins
2. Click “New Plugin” link
3. Enter name as “Muiltisite”
4. In the plugin code, copy the following code and select “OnWebPagePrerender” event for it

global $modx;

$my_domains     = array();
$my_domains[]  = "www-mydomain-com";
$my_domains[]  = "www-mydomain-in";

foreach( $domains as $domain_alias ){

// delete our identification folder from output
$modx->documentOutput=preg_replace("#/?".$domain_alias."/#i","/", $modx->documentOutput);

}

4. The real magical hack
Yeah, now time to hack the core to embed the real magical code to detect the domain name and return the pages accordingly.

1. Open “manager/includes/document.parser.class.inc.php”
2. Find following code around line# 1092

            // Check use_alias_path and check if $this->virtualDir is set to anything, then parse the path
            if ($this->config['use_alias_path'] == 1) {
                $alias= (strlen($this->virtualDir) > 0 ? $this->virtualDir . '/' : '') . $this->documentIdentifier;
                if (array_key_exists($alias, $this->documentListing)) {
                    $this->documentIdentifier= $this->documentListing[$alias];
                } else {
                    $this->sendErrorPage();
                }
            } else {
                $this->documentIdentifier= $this->documentListing[$this->documentIdentifier];
            }

3. Replace the following line (around line# 1099 and line# 7 in the above code)

$this->sendErrorPage();

with follwing

$found = false;

$my_domains                      = array();
$my_domains['www.mydomain.com']  = "www-mydomain-com";
$my_domains['www.mydomain.in']   = "www-mydomain-in";

if (array_key_exists( $my_domains[$_SERVER['HTTP_HOST']]."/".$alias, $this->documentListing)) {

  $this->documentIdentifier= $this->documentListing[$my_domains[$_SERVER['HTTP_HOST']]."/".$alias];
  $found = true;

}

if($found == false){
  $this->sendErrorPage();
}

5. Toggle template folders accordingly
You can create seperate templates for each domain but if you have few pages which are common for each domain and you want to apply different css then you need to create new snippet to toggle between template folders.

In our case we have two skin folders for respective domains:
1. assets/templates/com
2. assets/templates/in

Create a new snippet to return template folder’s name based on domain name.
1. Go to Manager >> Resources >> Manage Resources >> Snippets
2. Click “New Snippet”
3. Enter snippet name as “skin_name”
4. Copy the following code and save


// host name name template folder name mapping
$my_domains                                  = array();
$my_domains['www.mydomain.com']   = "com";
$my_domains['www.mydomain.in']      = "in";

return  $my_domains[$_SERVER['HTTP_HOST']];

Now wherever you refer to template folder you need to call the above snippet “skin_name” like this:

<link rel="stylesheet" type="text/css" href="assets/templates/[!skin_name!]/stylesheet.css" />

Implement hierarchical pages in Magento CMS

Posted in E-Commerce Application Development, Search Engine Optimization, Web Design on March 26th, 2010 by admin – Be the first to comment

Magento is one of the most advance and popular open source e-commerce application on the planet. It’s loaded with lot’s of features which you do not see in any other open source e-commerce application. Magento provides inbuilt CMS which you can use to create custom pages and show content from catalog using widgets and cms variables but the main drawback of the CMS in community edition is that It does not let’s you create hierarchy of CMS pages.

We have found a work around to fake hierarchical pages structure without doing any coding. You can achieve this by creating product categories and assign static block to it.

Let say you have 3 pages
A
|–B
|–C
Where B and C are children of A.

What you need to do it. Create three static blocks and name them like following:
A, A-B, A-C

Then create product categories for A, B, C and assign respective static blocks to them. Since product categories support hierarchy and you can assign static block to a category, our purpose is achieved. This way you can setup any number of pages and sub pages. See an example here http://www.hyperwear.com


Send your feedback