14 |
eval(()) |
/modules/cms/classes/cms_controller.php |
383 |
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(!empty( $pubDate )): ?>
<div class="pubdate">
<i class="icon-calendar"></i>
<span rel="tooltip" title="Published Date"><?php echo $pubDate ?></span>
</div>
<?php endif; ?>
<!--<div class="categories">
<span><i class="icon-tags"></i>
<?php foreach($product->category_list as $category): ?>
<a href="<?php echo $category->page_url('/category'); ?>/" title="<?php echo h($category->name); ?>"><?php echo h($category->name); ?></a>
<?php endforeach; ?>
</div>-->
<br/><br/>
<?php if(isset($product->manufacturer-> name)):?>
<div class="manufacturer">
<i class="icon-cog"></i>
<span rel="tooltip" title="Published By"><?php echo $product->manufacturer-> name; ?></span>
</div>
<?php endif;?>
</div>
<?if(!$product->om('disabled') && !$product->x_garrattcustom_product_not_available
&& $product->x_display_price != '' && $product->x_display_price != 0): ?>
<p class="rrp">RRP $<?php echo h($product -> x_display_price); ?></p>
<?php if($product->om('is_on_sale')): ?>
<div class="prices"><span class="price">On Sale <?php echo format_currency($product -> om('sale_price')); ?></span> <del class="base"><?php echo format_currency($product -> om('price')); ?></del> </div>
<?php else: ?>
<div class="prices"><span class="price">Your price <?php echo format_currency($product -> om('sale_price')); ?></span></div>
<?php endif; ?>
<? foreach ($product->price_tiers as $tier):
if($tier->fetched['customer_group_calculated'] != 'SophiaWeb')
continue;?>
<?if($tier->quantity == 1):
$tprice = $tier->price;
//zach - removed this by Matt's request
//$tper = 100-(round($tprice/$product->price, 2)*100);
?>
<?php if($product->sku != 'SOPHIA' && $product->om('sale_price') > $tier->price): ?>
<?if($tier->price != '' && !is_null($tier->price)): ?>
<p class="sophia">Sophia BookClub <?= format_currency($tier -> price) ?></p>
<?php endif; ?>
<?php endif;
endif;
?>
<? endforeach ?>
<? endif; ?>
</div>
<div class="add-to-cart">
<?php
if(!$product->om('disabled') && !$product->x_garrattcustom_product_not_available
&& $product->x_display_price != '' && $product->x_display_price != 0): ?>
<button class="btn btn-primary btn-small add" onclick="return $(this).getForm().sendRequest('shop:on_addToCart', {
selectorMode: true,
update: {
'.mini-cart': 'shop:mini_cart'
},
onSuccess: function() {
$('#__added').modal('show')
}
});">
<i class="icon-plus"></i>Add to cart
</button>
<?php else: ?>
<a class="btn btn-primary btn-large" style="color:white" href="mailto:sales@garrattpublishing.com.au?subject=Product Enquiry&body=Product ID: <?= $product -> id ?>%0D%0AProduct Name: <?= $product -> name ?>%0D%0A"><i class="icon-envelope"></i> Contact Us</a>
<?php endif; ?>
</div>
<!--<div class="short-description">
<p><?php echo nl2br( h( $product->short_description ) ); ?></p>
</div>-->
<div class="description">
<?php echo nl2br($product -> description); ?>
</div>
<?php if($product->options->count): ?>
<div class="options">
<?php $this -> render_partial('shop:product_options', array()); ?>
</div>
<?php endif; ?>
<?php if($product->extra_options->count): ?>
<div class="extras">
<?php $this -> render_partial('shop:product_extras', array()); ?>
</div>
<?php endif; ?>
<?php echo close_form(); ?>
<div id="review_form" class="modal fade" tabindex="-1" role="dialog" style="display: none;" aria-hidden="true">
<div class="modal-dialog"><div class="modal-content">
<?= open_form(array('onsubmit' => "return $(this).sendRequest('shop:on_addProductReview', {onAfterUpdate: init_effects, extraFields: {no_flash: true}, update:{'product_page': 'shop:product_partial'}})")) ?>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<hgroup class="title">
<h3>Add a review</h3>
</hgroup>
</div>
<div class="modal-body">
<div class="row">
<div class="col-sm-6">
<div class="control-group">
<label for="rating" class="control-label">Rating</label>
<div class="controls">
<select class="form-control col-sm-12" name="rating">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="control-group">
<label for="review_title" class="control-label">Review title</label>
<div class="controls">
<input class="form-control col-sm-12" id="review_title" name="review_title" type="text">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="control-group">
<label for="review_author_name" class="control-label">Your name</label>
<div class="controls">
<input class="form-control col-sm-12" id="review_author_name" name="review_author_name" type="text" value="">
</div>
</div>
</div>
<div class="col-sm-6">
<div class="control-group">
<label for="review_author_email" class="control-label">Your email</label>
<div class="controls">
<input class="form-control col-sm-12" id="review_author_email" name="review_author_email" type="text" value="">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="control-group">
<label for="review_text" class="control-label">Review</label>
<div class="controls">
<textarea class="form-control col-sm-12" id="review_text" name="review_text"></textarea>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<div class="pull-right">
<button class="btn btn-primary" type="submit" onclick="return $(this).getForm().sendRequest('shop:on_addProductReview', {
update: {
//'ratings': 'shop:product_reviews'
},
onSuccess: function() {
$('#review_form').modal('hide');
$('body').removeClass('modal-open');
$('.modal-backdrop').remove();
}
})">Submit product reveiw</button>
</div>
</div>
</form></div></div></div>
</div>
</div>
</div>
</div>
<!--
<script>
/*(function(doc, script) {
var js,
fjs = doc.getElementsByTagName(script)[0],
frag = doc.createDocumentFragment(),
add = function(url, id) {
if (doc.getElementById(id)) {return;}
js = doc.createElement(script);
js.src = url;
id && (js.id = id);
frag.appendChild( js );
};
// Google+ button
add('http://apis.google.com/js/plusone.js');
// Facebook SDK
add('//connect.facebook.net/en_US/all.js#xfbml=1&appId=200103733347528', 'facebook-jssdk');
// Twitter SDK
add('//platform.twitter.com/widgets.js');
fjs.parentNode.insertBefore(frag, fjs);
}(document, 'script'));*/
</script>-->', '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 => '9781626982277']) |
/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/9781626982277') |
/phproad/system/phproad.php |
31 |
2 |
include('/home/garrattpublishin/public_html/phproad/system/phproad.php') |
/boot.php |
114 |
1 |
require_once('/home/garrattpublishin/public_html/boot.php') |
/index.php |
3 |