A
A
azaza2019-12-08 08:37:49
PHP
azaza, 2019-12-08 08:37:49

Opencart owl carousel margin option not working?

I'm sawing a carousel on the site, I found a problem, margin does not work in the carousel
where to dig

<div id="carousel-1">
  <?php foreach ($banners as $banner) { ?>
  <div class="item">
    <?php if ($banner['link']) { ?>
    <a href="<?php echo $banner['link']; ?>"><img src="<?php echo $banner['image']; ?>" alt="<?php echo $banner['title']; ?>" class="img-responsive" /></a>
    <?php } else { ?>
    <img src="<?php echo $banner['image']; ?>" alt="<?php echo $banner['title']; ?>" class="img-responsive" />
    <?php } ?>
  <?php echo $banner['title']; ?>
  </div>
  <?php } ?>
</div>
<script type="text/javascript"><!--
$('#carousel-1').owlCarousel({
  items: 2,
  margin:20,
  autoPlay: 5000,
  pagination: true
});
--></script>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
RainbowPower, 2019-01-06
@RainbowPower

There are a ton of implementations, one of them, create a table in which there will be user_id, score1, score2, score3, score4 and write down the rating in the corresponding fields.
SELECT * FROM table ORDER BY score DESC LIMIT 30 will do.
Individual user place - look at the id of the current user, look for a record by the user_id field and pull out the required rating.

M
miki131, 2019-01-06
@miki131

Place in the ranking is the number of records with a score less
SELECT COUNT(*) FROM table WHERE score < ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question