Note that there are some explanatory texts on larger screens.

plurals
  1. POJoomla countdown for all products
    primarykey
    data
    text
    <p>I want to write a little code for my module that show countdown for all product in this module just show one of the countdown for one product. <br> the code is like this :</p> <pre><code>&lt;?php $ic = 1; foreach ($product as $products) { $ic++; ?&gt; &lt;div class="slider-item"&gt; &lt;div class="sp-vmslider-counter"&gt; &lt;div id="sp-deal-countdown-&lt;?php echo $ic ?&gt;"&gt;&lt;/div&gt; &lt;/div&gt; &lt;script type="text/javascript"&gt; jQuery(function($){ $('#sp-deal-countdown-&lt;?php echo $ic ?&gt;').countdown({ until: new Date(&lt;?php $m = JHtml::date($product-&gt;product_available_date , 'm', true)-1; $y = JHtml::date($product-&gt;product_available_date , 'Y', true); $d = JHtml::date($product-&gt;product_available_date , 'd', true); echo "$y,$m,$d"; ?&gt;), format: 'dHMS', layout: '&lt;ul class="sp-countdown-list"&gt;\ &lt;li&gt;\ &lt;p class="sp-countdown-number"&gt;{dl}&lt;/p&gt;\ &lt;p class="sp-countdown-names"&gt;{dn}&lt;/p&gt; \ &lt;/li&gt;\ &lt;li&gt;\ &lt;p class="sp-countdown-number"&gt;{hl}&lt;/p&gt;\ &lt;p class="sp-countdown-names"&gt;{hn}&lt;/p&gt; \ &lt;/li&gt;\ &lt;li&gt;\ &lt;p class="sp-countdown-number"&gt;{ml}&lt;/p&gt;\ &lt;p class="sp-countdown-names"&gt;{mn}&lt;/p&gt; \ &lt;/li&gt;\ &lt;li&gt;\ &lt;p class="sp-countdown-number"&gt;{sl}&lt;/p&gt;\ &lt;p class="sp-countdown-names"&gt;{sn}&lt;/p&gt;\ &lt;/li&gt;\ &lt;/ul&gt;', expiryText: '&lt;div class="label label-important sp-countdown-over"&gt;Deal is over&lt;/div&gt;', alwaysExpire:true }); }); &lt;/script&gt; </code></pre> <p>and the product variable is: <br> <code>$products = $productModel-&gt;getProductListing($product_group, $max_items, true, true, false, true, $category_id);</code> <br> please help me how can i show this module for all products? Thanks in advance</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload