php 产品转盘 - OWL转盘
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 产品转盘 - OWL转盘相关的知识,希望对你有一定的参考价值。
1) Create a new phtml file:
/app/design/frontend/em0140/default/template/featuredcustom.phtml
2) Create a New Category ie: Featured
3) paste into cms page
{{block type="core/template" template="newproducts/newproducts.phtml"}}
4) paste the following into featuredcustom.phtml
<?php
// Works with OWL carousel
$products = Mage::getModel('catalog/category')->load(3); // 3: NEW ARRIVALS category ID
// get all products
$productslist = $products->getProductCollection()->addAttributeToSelect('*');
?>
<div class="brands-slider-block">
<h2 class="brands-title sub-title secondary-font text-center">FOLLOW ISLAND GIRL MIAMI</h2>
<div class="row">
<div class="prod-slider">
<?php foreach($productslist as $product) : ?>
<div class="brand-item">
<a href="<?php echo $product->getProductUrl() ; ?>" ><img src="<?php echo Mage::helper('catalog/image')->init($product, 'thumbnail') ; ?>" class="img-responsive" alt="a" /></a>
<div class="info">
<div class="separator clear-left">
<p class="btn-add">
<a href="<?php echo $product->getProductUrl() ; ?>" class="hidden-sm pink text-center"><?php echo $product->getName() ; ?></a></p>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('.prod-slider').owlCarousel({
items: 4, // how many items to show
itemsDesktop: [1199, 5],
itemsDesktopSmall: [991, 4],
itemsTablet: [768, 3],
itemsMobile: [600, 2],
lazyLoad: true,
pagination: false,
navigation: true
});
});
</script>
</div>
以上是关于php 产品转盘 - OWL转盘的主要内容,如果未能解决你的问题,请参考以下文章
PHP jQuery微信大转盘抽奖源代码分享
PHP新写的大转盘抽奖源码
PHP实现大转盘抽奖算法实例
php 使用中继器领域的Boostrap转盘
PHP jQuery微信大转盘抽奖源代码分享
php中奖概率算法,可用于刮刮卡,大转盘等抽奖算法