Post by smiesek » Sun Mar 26, 2017 12:23 pm

How to get the number of total number of active items for sale on the home page store? No administration page.

using xml existension?

Code: Select all

<div>
<?php
  $query = $this->db->query("SELECT status FROM " . DB_PREFIX . "product WHERE status='1' ");
  $products_count = $query->rows ? count($query->rows) : 0;
  echo "Total products in store: " . $products_count;
?>
</div>

Code: Select all

<div>
   echo "Total products in store: " . $products_count;
</div>
thanks your help.

New member

Posts

Joined
Thu Aug 07, 2014 9:00 am
Who is online

Users browsing this forum: No registered users and 16 guests