Yes, the easiest thing to do is install the two separately in their own folders, OpenCart being in a subdirectory of your WordPress install like I mentioned earlier.
The reason I suggest OpenCart inside of WordPress folder is because of how URLs are routed for each and I very much prefer to leave the routing systems alone and let them do their business as usual while avoiding making .htaccess changes.
To get the same look and feel you need to theme your WordPress and OpenCart exactly the same. In my example I even set up both to refer to the same CSS file so that I wouldn't have to repeat myself. You may want to have a few common includes for things like headers, navigation or the footer for both.
After you theme them both to look the same you will now have a blog & shopping cart working side-by-side but appearing to be all part of one package.
The reason I recommend this method is because at this point you've left the core files untouched for both frameworks, so you haven't broken anything and everything should be working as it normally would.
From here on out if you want to start crossing over data between the two systems you can start with all the modding but at least you're starting with a fresh install.
My example is a very simple example of the two running side-by-side without any complicated calls.
Keep in mind that some simple things don't need to be made complicated. If you want to feature a few store items on your blog, just hand-code the HTML to link to your product pages. Don't drive yourself crazy modding controller files and such to achieve the same effect through the back-end unless you really
If you are interested in calling OpenCart functions from your blog, you might try using an AJAX request to send data to one of your OpenCart controllers which will then respond back with the data you are trying to get.
So for example your blog's sidebar might ask for index.php?route=products/category/list
to return to you a list of categories. You would just create a function called list()
in your controller/products/category.php
file and tell it to respond with the data you need. I haven't tried this yet but it seems like something that could very easily be done and would be useful as some kind of sidebar store navigation on your blog.
I can't really tell you where to go from there, it's up to you and whatever creative ideas you can come up with. Hit me up if you have any more questions.