Forum Replies Created

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter SalvisB

    (@salvisb)

    footer.php points to layouts/template.php , and this is file where the widgets are.
    It should be that if I replace <?php get_footer(); ?> with code from template.php file, it should work.
    Mike, maybe you can give a quick look at the code which are in the template.php file.

    // get template configuration
    include($this['path']->path('layouts:template.config.php'));
    
    ?>
    <!DOCTYPE HTML>
    <html lang="<?php echo $this['config']->get('language'); ?>" dir="<?php echo $this['config']->get('direction'); ?>">
    
    <head>
    <?php echo $this['template']->render('head'); ?>
    </head>
    
    <body id="page" class="page <?php echo $this['config']->get('body_classes'); ?>" data-config='<?php echo $this['config']->get('body_config','{}'); ?>'>
    
    	<div id="page-bg">
    
    		<div id="page-bg2">
    
    			<?php if ($this['modules']->count('absolute')) : ?>
    			<div id="absolute">
    				<?php echo $this['modules']->render('absolute'); ?>
    			</div>
    			<?php endif; ?>
    
    			<div id="block-toolbar">
    
    				<div class="wrapper">
    
    					<div id="toolbar" class="grid-block">
    
    						<?php if ($this['modules']->count('toolbar-l') || $this['config']->get('date')) : ?>
    						<div class="float-left">
    
    							<?php if ($this['config']->get('date')) : ?>
    							<time datetime="<?php echo $this['config']->get('datetime'); ?>"><?php echo $this['config']->get('actual_date'); ?></time>
    							<?php endif; ?>
    
    							<?php echo $this['modules']->render('toolbar-l'); ?>
    
    						</div>
    						<?php endif; ?>
    
    						<?php if ($this['modules']->count('toolbar-r')) : ?>
    						<div class="float-right"><?php echo $this['modules']->render('toolbar-r'); ?></div>
    						<?php endif; ?>
    
    					</div>
    
    				</div>
    
    			</div>
    
    			<div class="wrapper grid-block">
    
    				<header id="header">
    
    					<div id="headerbar" class="grid-block">
    
    						<?php if ($this['modules']->count('logo')) : ?>
    						<a id="logo" href="<?php echo $this['config']->get('site_url'); ?>"><?php echo $this['modules']->render('logo'); ?></a>
    						<?php endif; ?>
    
    						<?php if($this['modules']->count('headerbar')) : ?>
    						<div class="left"><?php echo $this['modules']->render('headerbar'); ?></div>
    						<?php endif; ?>
    
    					</div>
    
    					<div id="menubar" class="grid-block">
    
    						<?php  if ($this['modules']->count('menu')) : ?>
    						<nav id="menu"><?php echo $this['modules']->render('menu'); ?></nav>
    						<?php endif; ?>
    
    						<?php if ($this['modules']->count('search')) : ?>
    						<div id="search"><?php echo $this['modules']->render('search'); ?></div>
    						<?php endif; ?>
    
    					</div>
    
    					<?php if ($this['modules']->count('banner')) : ?>
    					<div id="banner"><?php echo $this['modules']->render('banner'); ?></div>
    					<?php endif;  ?>
    
    				</header>
    
    				<?php if ($this['modules']->count('top-a')) : ?>
    				<section id="top-a" class="grid-block"><?php echo $this['modules']->render('top-a', array('layout'=>$this['config']->get('top-a'))); ?></section>
    				<?php endif; ?>
    
    				<?php if ($this['modules']->count('top-b')) : ?>
    				<section id="top-b" class="grid-block"><?php echo $this['modules']->render('top-b', array('layout'=>$this['config']->get('top-b'))); ?></section>
    				<?php endif; ?>
    
    				<?php if ($this['modules']->count('innertop + innerbottom + sidebar-a + sidebar-b') || $this['config']->get('system_output')) : ?>
    				<div id="main" class="grid-block">
    
    					<div id="maininner" class="grid-box">
    
    						<?php if ($this['modules']->count('innertop')) : ?>
    						<section id="innertop" class="grid-block"><?php echo $this['modules']->render('innertop', array('layout'=>$this['config']->get('innertop'))); ?></section>
    						<?php endif; ?>
    
    						<?php if ($this['modules']->count('breadcrumbs')) : ?>
    						<section id="breadcrumbs"><?php echo $this['modules']->render('breadcrumbs'); ?></section>
    						<?php endif; ?>
    
    						<?php if ($this['config']->get('system_output')) : ?>
    						<section id="content" class="grid-block"><?php echo $this['template']->render('content'); ?></section>
    						<?php endif; ?>
    
    						<?php if ($this['modules']->count('innerbottom')) : ?>
    						<section id="innerbottom" class="grid-block"><?php echo $this['modules']->render('innerbottom', array('layout'=>$this['config']->get('innerbottom'))); ?></section>
    						<?php endif; ?>
    
    					</div>
    					<!-- maininner end -->
    
    					<?php if ($this['modules']->count('sidebar-a')) : ?>
    					<aside id="sidebar-a" class="grid-box"><?php echo $this['modules']->render('sidebar-a', array('layout'=>'stack')); ?></aside>
    					<?php endif; ?>
    
    					<?php if ($this['modules']->count('sidebar-b')) : ?>
    					<aside id="sidebar-b" class="grid-box"><?php echo $this['modules']->render('sidebar-b', array('layout'=>'stack')); ?></aside>
    					<?php endif; ?>
    
    				</div>
    				<?php endif; ?>
    				<!-- main end -->
    
    				<?php if ($this['modules']->count('bottom-a')) : ?>
    				<section id="bottom-a" class="grid-block"><?php echo $this['modules']->render('bottom-a', array('layout'=>$this['config']->get('bottom-a'))); ?></section>
    				<?php endif; ?>
    
    				<?php if ($this['modules']->count('bottom-b')) : ?>
    				<section id="bottom-b" class="grid-block"><?php echo $this['modules']->render('bottom-b', array('layout'=>$this['config']->get('bottom-b'))); ?></section>
    				<?php endif; ?>
    
    				<?php if ($this['modules']->count('footer + debug') || $this['config']->get('warp_branding')) : ?>
    				<footer id="footer" class="grid-block">
    
    					<?php if ($this['config']->get('totop_scroller')) : ?>
    					<a id="totop-scroller" href="#page"></a>
    					<?php endif; ?>
    
    					<?php
    						echo $this['modules']->render('footer');
    						$this->output('warp_branding');
    						echo $this['modules']->render('debug');
    					?>
    
    				</footer>
    				<?php endif; ?>
    
    			</div>
    
    		</div>
    
    	</div>
    
    	<?php echo $this->render('footer'); ?>
    
    </body>
    </html>
    Thread Starter SalvisB

    (@salvisb)

    Ok, when I use WordPress default page template, it works great.

    <?php
    /*
    Template Name: Archives with Content
    */
    
    get_header(); ?>
    
    <?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
    
    <div id="main">
      <?php mp_show_cart('checkout'); ?>
    </div>
    <?php get_footer(); ?>

    But now I must figure out how to customize widget appearance.
    <?php get_footer(); ?> refers to footer.php and footer.php file holds in itself this code:

    <?php
    $warp = Warp::getInstance();
    
    // get content from output buffer and set a slot for the template renderer
    $warp['template']->set('content', ob_get_clean());
    
    // load main template file, located in /layouts/template.php
    echo $warp['template']->render('template');

    Which refers to layouts/template.php file. But when I copy template.php content in mp_cart.php, it doesn’t work. What could be the solution?
    Hope that someone could help with this.

    Thread Starter SalvisB

    (@salvisb)

    Nice. Thanks Mike.
    Didn’t know that file mp_cart.php should be placed in themes folder.
    Mike, maybe you have template for a mp_cart file with default functionality?

    Thread Starter SalvisB

    (@salvisb)

    If so you’ll need to create a new template file in your theme that doesn’t include the widgets and use that for the page that displays the checkout

    Those widgets are in the sidebar and inner bottom positions.
    But how can I use template for “virtual” pages? Far as I know e-commerce plugins such as Woocommerce uses “real” pages for checkout process, but it isn’t Marketpress case. In this case that would be much easier.

    Why would you want to remove the payment information screen?

    I haven’t integrated any payment methods by now and that’s why this step is unnecessary. And by analyzing statistics this is checkout step where users tend to abandon checkout process, because there is represented an unnecessary information that unnecessarily takes up time.

    There should be an easy way for users to choose which checkout steps to include. If not, maybe there is way how to jump from ‘shipping-information’ page straight to ‘confirmation page – last step’.

    Summary ??
    1) How can I use template for “virtual” pages?
    2) Maybe there is a way which let as jump from ‘shipping-information’ page straight to ‘confirmation’ page by changing few lines of code?

    Thread Starter SalvisB

    (@salvisb)

    Found it interesting. When I used pages in my menu as set in my theme by default, CSS style didn’t work for me (.page-item-#). But when I created custom menu with .menu-item-# classes, it works fine.
    Looks like problem must be somewhere in theme itself.

    Anyway, problem solved.

Viewing 5 replies - 16 through 20 (of 20 total)