I want to combine OpenCart with wordpress. Is it possible to display the header-area with login, cart etc. in an Iframe?
Best regards!

Professionelles Onlineshop-Design & -Programmierung: http://netzor.de
Agreed.vince79 wrote:Not sure that the iframe solution is right.
If all you want is login, cart, etc. then just put your opencart install in it's own directory and create links to the appropriate destinations on your wordpress template.pee wrote:I want to combine OpenCart with wordpress. Is it possible to display the header-area with login, cart etc. in an Iframe?
Code: Select all
<a href="path/to/shop/index.php?route=account/login">Login</a>
Code: Select all
<a href="path/to/shop/index.php?route=checkout/cart">Cart</a>
PM me for custom OpenCart template design and development.
I've started by transplanting the opencart "environment" from index.php and planting them into wordpress' index.php. The next step I would imagine is to copy the proper header MVC files over to the wordpress directory to allow a dynamic login/cart in wordpres' header. Is this what you mean?huhitschris wrote:
This way you are able to allow both frameworks to operate normally without modifying the core files very much. You'll still need to modify your opencart header, home, footer, etc. to match your wordpress theme's layout and stylesheet. If you want opencart data on your wordpress pages you'll need to write custom php/mysql functions into your wordpress theme to pull from the opencart database.
PM me for custom OpenCart template design and development.
Code: Select all
require_once('./shop/config.php');
//require_once(DIR_SYSTEM . 'startup.php');
require_once(DIR_SYSTEM . 'engine/registry.php');
require_once(DIR_SYSTEM . 'library/session.php');
require_once(DIR_SYSTEM . 'library/request.php');
require_once(DIR_SYSTEM . 'library/db.php');
require_once(DIR_SYSTEM . 'library/customer.php');
// Session
$session = new Session();
Registry::set('session', $session);
// Request
$request = new Request();
Registry::set('request', $request);
// Database
$db = new DB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE);
Registry::set('db', $db);
$customer = new Customer();
$logged = $customer->isLogged();
Code: Select all
<div id="shop_links">
<ul>
<li class="inline"><img src="<?php echo get_bloginfo('url'); ?>/shop/catalog/view/theme/default/image/icon_special.png" alt="MMA Specials" class="icon" /><a href="<?php echo get_bloginfo('url'); ?>/shop/product/special">Specials</a></li>
<?php if (!$logged): ?>
<li class="inline lock"><img src="<?php echo get_bloginfo('url'); ?>/shop/catalog/view/theme/default/image/icon_login.png" alt="Login" class="icon" /><a href="<?php echo get_bloginfo('url'); ?>/shop/account/login">Log In</a></li>
<?php else: ?>
<li class="inline"><img src="<?php echo get_bloginfo('url'); ?>/shop/catalog/view/theme/default/image/icon_logout.png" alt="Logout" class="icon" /><a href="<?php echo get_bloginfo('url'); ?>/shop/account/logout">Log Off</a></li>
<li class="inline"><img src="<?php echo get_bloginfo('url'); ?>/shop/catalog/view/theme/default/image/icon_account.png" alt="Account" class="icon" /><a href="<?php echo get_bloginfo('url'); ?>/shop/account/account">Account</a></li>
<?php endif; ?>
<li class="inline"><img src="<?php echo get_bloginfo('url'); ?>/shop/catalog/view/theme/default/image/icon_checkout.png" alt="Shopping Cart" class="icon" /><a href="<?php echo get_bloginfo('url'); ?>/shop/checkout/cart">Cart</a></li>
</ul>
<div class="clear"></div>
</div> <!-- div#shop_links -->
PM me for custom OpenCart template design and development.
I'd also cache the posts from within the wordpress template, depending on what category you're displaying in opencart.huhitschris wrote:Grab the RSS feed from your WordPress install using SimpleXML, then parse and display the feed however you like from your OpenCart - caching of course. Still, this is a lot of overhead but if anyone is looking for a quick and hackish way to get the job done this is one option.
Your one-page-checkout seems really great! Would be really awesome if you could post your code and template changes for that solution...3rdcorner wrote: I also made a one page checkout for that site.
PM me for custom OpenCart template design and development.
Users browsing this forum: No registered users and 9 guests