13 |
Cms_Controller->evalWithException('?><?php
//Determine if the product has been published or should be pre-order
$is_published = false;
$pubDate = $product -> getAttribute('Published Date');
$pubDate_dt = DateTime::createFromFormat('d/m/Y', $pubDate);
if(!is_null($pubDate)){
if(time() >= $pubDate_dt->getTimestamp()){
$is_published = true;
}
}
?>
<div class="row">
<div class="col-sm-12">
<h5 class="dotted">Book details</h5>
</div>
<div class="col-sm-4 col-md-3">
<div class="product-images">
<div class="box">
<?php if(!empty($product->x_preview)) { ?>
<a href="<?php echo h($product -> x_preview); ?>" target="_blank" class="lookinside">Look Inside</a>
<?php } ?>
<?php $images = $product -> om('images'); ?>
<div class="primary">
<?php if($images->count == 0):?>
<img src="<?php echo theme_resource_url('img/Garratt_thumnail.png'); ?>" class="img-responsive" alt="<?php echo h($product -> name); ?>" />
<?php else: ?>
<img src="<?php echo $product -> image_url(0, 480, 'auto'); ?>" data-zoom-image="<?php echo $product -> image_url(0, 640, 'auto'); ?>" alt="<?php echo h($product -> name); ?>" class="img-responsive" />
<?php endif; ?>
</div>
<div class="thumbs" id="gallery">
<ul class="thumbs-list">
<?php $i = 1; ?>
<?php foreach($images as $image): ?>
<li>
<a <?php echo $i == 1 ? 'class="active"' : ''; ?> href="#" data-image="<?php echo $image -> getThumbnailPath(480, 'auto'); ?>" title="<?php echo h($product -> name); ?>" data-zoom-image="<?php echo $image -> getThumbnailPath(640, 'auto'); ?>">
<img src="<?php echo $image -> getThumbnailPath(160, 'auto'); ?>" class="img-responsive" alt="<?php echo h($product -> name); ?>" />
</a>
</li>
<?php $i++; ?>
<?php endforeach; ?>
</ul>
</div>
<div class="review">
<? if (isset($review_posted)): ?>
<p class="flash success">Your review has been successfully posted.</p>
<? else: ?>
<button class="btn btn-primary btn-xs btn-block" onclick="$('#review_form').modal('show')"><i class="icon-pencil hidden-sm"> </i>Write a review</button>
<? endif ?>
</div>
<div async class="social">
<p>Share:</p>
<div async id="sharrre">
<div async class="facebook"> </div>
<div async class="twitter"> </div>
<div async class="googleplus"> </div>
</div>
</div>
</div>
</div>
</div>
<!--
<a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a>
<div class="g-plusone" data-size="medium" data-count="true"></div>
<div id="fb-root"></div>
<div class="fb-like" data-send="false" data-layout="button_count" data-width="1" data-show-faces="false" data-action="recommend"></div>
-->
<div class="col-sm-8 col-md-9">
<div class="product-content">
<div class="tab-content">
<?php echo open_form(); ?>
<div class="details">
<h1><?php echo h($product -> name); ?></h1>
<div class="meta">
<?php $author = $product -> getAttribute('author'); ?>
<?php if(!empty( $author )): ?>
<div class="author">
<i class="icon-user"></i>
<span title="Author" rel="tooltip"><?php echo $author ?></span>
</div>
<?php endif; ?>
<?php if(isset($product -> sku)):?>
<div class="sku">
<i class="icon-book"></i>
<span rel="tooltip" title="ISBN: <?php echo $product -> sku; ?>"><?php echo $product -> sku; ?></span>
</div>
<?php endif;?>
<!--<?php if($product->manufacturer): ?>
<div class="manufacturer">
<i class="icon-cog"></i>
<span title="Manufactured by <?php echo $product->manufacturer->name; ?>" rel="tooltip"><?php echo $product->manufacturer->name; ?></span>
</div>
<?php endif; ?>-->
<?php
$limited_stock = false;
if($product -> om('in_stock') <= 20 && $product -> om('in_stock') > 0){
$limited_stock = true;
}
//zach - hide stock level if unavailable ticked
if($product->x_garrattcustom_product_not_available == false
&& $product->x_display_price != '' && $product->x_display_price != 0 && $product->sku != 'SOPHIA' && $product -> sku != GarrattCustom_Module::sophiaSku):
if($product -> product_type != false && $product -> product_type -> name != 'eBook'):
if($product->track_inventory): ?>
<div class="stock">
<i class="icon-dropbox"></i>
<?php if($product->allow_pre_order && !$is_published):?>
<span title="Pre-order now and ensure you receive this new item as soon as copies arrive in our warehouse." rel="tooltip">Pre Order</span>
<?php elseif($product -> om('in_stock') <= 0 && $is_published || is_null($pubDate)):?>
<span title="We currently have no stock of this item in our warehouse. Order now to ensure you secure this popular item as soon as we receive our next shipment." rel="tooltip">Awaiting Shipment</span>
<?php elseif(($limited_stock && !$product->allow_pre_order) || ($limited_stock && $product->allow_pre_order) ): ?>
<span title="We currently have limited stock of this item in our warehouse. Order Now for your best chance of securing this popular item." rel="tooltip">Limited stock</span>
<?php else: ?>
<span title="Stock of this item is currently available in our warehouse." rel="tooltip">In stock</span>
<?php endif; ?>
</div>
<?php endif; endif; endif; ?>
<?php if(!empt', 'CMS partial', 'shop:product', array(1) [product => object(Shop_Product)]) |
/modules/cms/classes/cms_controller.php |
1020 |
12 |
Cms_Controller->render_partial('shop:product', array(1) [product => object(Shop_Product)]) |
/modules/cms/classes/cms_controller.php(383) : eval()'d code |
13 |
11 |
eval(()) |
/modules/cms/classes/cms_controller.php |
383 |
10 |
Cms_Controller->evalWithException('?><?php
//Zach - unset all sessions regarding credit card detail saving checkbox when outside payment page
unset($_SESSION['giftviews']);
unset($_SESSION['views']);?>
<div class="container">
<div class="row">
<div class="col-sm-9 col-md-10">
<?php if($product): ?>
<section class="product-info">
<?php $this->render_partial('shop:product', array('product' => $product)); ?>
</section>
<?php //if($product->list_related_products()->find_all()->count): ?>
<!--<section class="product-related">
<?php //$this->render_partial('shop:product_related', array('product' => $product)); ?>
</section>-->
<?php //endif; ?>
<section class="popular">
<?php //$popular = CrossSell::getPopular(array('category'=>1,'top'=>10,'items'=>5,'override_product_ids'=>array(3))); ?>
<?php $popular = CrossSell::getPopular(array('product'=>$product,'items'=>5)); ?>
<?php //only on product page $popular = CrossSell::getPopular(array('category'=>$product->category_id));
if($popular): ?>
<h5 class="dotted">You might also like</h5>
<?php
$this->render_partial('shop:product_list', array('products'=>$popular));
endif;?>
</section>
<section class="product-reviews">
<?php $this->render_partial('shop:product_review', array('product' => $product)); ?>
</section>
<?php $this->render_partial('shop:addtocart', array(
'product' => $product
)); ?>
<?php else: ?>
<?php Phpr::$response->redirect( site_url('/') ); ?>
<?php endif; ?>
</div>
<div class="col-sm-3 col-md-2 prodsidebar">
<?php $this->render_partial('layout:newsletter_subscription'); ?>
<?php global_content_block('sidebar-shipping'); ?>
<?php global_content_block('sidebar-catalogue'); ?>
</div>
</div> <!-- //row -->
</div>', 'CMS page', 'Product') |
/modules/cms/classes/cms_controller.php |
608 |
9 |
Cms_Controller->eval_page_content(()) |
/modules/cms/classes/cms_controller.php |
198 |
8 |
Cms_Controller->open(object(Cms_Page), array(1) [0 => '9780281085286']) |
/controllers/application.php |
72 |
7 |
Application->On404(()) |
/phproad/modules/phpr/classes/phpr_controller.php |
170 |
6 |
Phpr_Controller->executeAction('On404', array(0)) |
/phproad/modules/phpr/classes/phpr_controller.php |
84 |
5 |
Phpr_Controller->_run('On404', array(0)) |
/phproad/modules/phpr/classes/phpr_response.php |
64 |
4 |
Phpr_Response->open404(()) |
/phproad/modules/phpr/classes/phpr_response.php |
37 |
3 |
Phpr_Response->open('/product/9780281085286') |
/phproad/system/phproad.php |
31 |
2 |
include('/home/garrattpublishin/public_html/phproad/system/phproad.php') |
/boot.php |
113 |
1 |
require_once('/home/garrattpublishin/public_html/boot.php') |
/index.php |
3 |