echo isset($pagination['next_page']) ? '<span><a href="' . $pagination['next_page'] . '" class="btn">Next →</a></span>' : '<span class="btn" style="opacity: 0.2;">Next →</span>'; echo '<span>Page ' . $pagination['page'] . ' / ' . $pagination['pages'] . '</span>'; echo '</div>'; } } else { echo '<div style="text-align:center;">No products, yet! :(</div>'; } } else { echo '<ul class="category" style="margin: 10px 0 5px 0;"> <li class="active">Coupons</li>'; if (theme_has_products()) { echo '<li><a href="' . get_update(array('type' => 'products')) . '">Products</a></li>'; } echo '</ul>'; echo '<div class="text-tit">Coupons for ' . $item->name . ':</div>'; $pagination = have_items_custom(array('store' => $item->ID)); if ($pagination['results']) { foreach (items_custom(array('store' => $item->ID, 'orderby' => 'active desc')) as $item) { echo '<article class="array_item"> <div class="table"> <div class="left"> <img src="' . store_avatar($item->store_img) . '" alt=""> <span class="rating"><span style="width:' . $item->stars * 16 . 'px;"></span></span> <a href="' . $item->store_reviews_link . '">' . $item->reviews . ' reviews</a>'; echo !empty($item->cashback) ? '<span class="cashback-points" data-ttip="Great! Use it and you\'ll receive ' . $item->cashback . ' points.">' . $item->cashback . '</span> ' : ''; echo '</div> <div class="right"> <a href="' . $item->link . '" class="title">' . $item->title . '</a>
<div class="left"> <?php if ($pagination = have_items_custom(array('show' => 'active,visible'))) { foreach (items_custom(array('show' => 'active,visible', 'orderby' => 'date desc')) as $item) { echo '<article class="array_item"> <div class="table"> <div class="left"> <img src="' . store_avatar($item->store_img) . '" alt=""> <span class="rating"><span style="width:' . $item->stars * 16 . 'px;"></span></span> <a href="' . $item->store_reviews_link . '">' . $item->reviews . ' reviews</a>'; echo !empty($item->cashback) ? '<span class="cashback-points" data-ttip="Great! Use it and you\'ll receive ' . $item->cashback . ' points.">' . $item->cashback . '</span> ' : ''; echo '</div> <div class="right"> <a href="' . $item->link . '" class="title">' . $item->title . '</a> More coupons for <a href="' . $item->store_link . '">' . $item->store_name . '</a> <div class="description">' . (!empty($item->description) ? nl2br($item->description) : 'no description') . '</div> <ul class="details"> <li>Coupon Added: <b>' . timeago(strtotime($item->date), 'seconds') . ' ago</b></li>'; if ($item->is_expired) { echo '<li>Expired on: <span class="expired">' . date('m/d/y', strtotime($item->expiration_date)) . '</span></li>'; } else { if (!$item->is_started) { echo '<li>Starts on: <span class="notstarted">' . date('m/d/y', strtotime($item->expiration_date)) . '</span></li>'; } else { echo '<li>Expiration: <span class="active">' . date('m/d/y', strtotime($item->expiration_date)) . '</span></li>'; }