Skills on Display Orders of Zen-Cart.

Especially at the end of every month, we need to know how many orders we have. Here are 2 method you may like when you use Zen-Cart.

First, if you need to know certain latest new orders, say 2000, how to do then, you can use the following mysql command:
SELECT * FROM `orders` order by orders_id desc limit 0,2000;  //show latest orders;

Second is we can use the following mysql code to show all the products with a month, say display all products within March, 2012:

SELECT date_purchased, SUM(order_total) FROM `orders` where date_purchased between “2012-03-01″ and “2012-03-30″;

If we need to know all orders in a year, say 2011, how to then? Simple:

SELECT date_purchased, SUM(order_total) FROM `orders` where date_purchased between “2011-01-01″ and “2011-12-31″;

Here we can use SUM(order_total) to caculate total value within a period.

Show Latest Testimonals at Zen-Cart Homepage

Sometimes we like to show several latest customers testimonals at zen-cart based shopping cart homepage. How to do then? Here are my method, let me share the code with you.

Go go to includes/modules, and open left_column.php, add the following code: <code><? $sql = “select  * from pres_testimonials where status = 1 order by id DESC limit 3″; $result=mysql_query($sql); while($row=mysql_fetch_array($result)) { echo “<strong>”.$row[name].”</strong>”; echo $row[detail]; Continue reading “Show Latest Testimonals at Zen-Cart Homepage”

Problem with cURL and PHP Output Buffering while installing zen cart

When we install zen cart under XAMPP, we often meet two issues:

ATTENTION: Problems Found CURL not compiled into PHP – notify server administrator more info…
CURL not compiled into PHP – notify server administrator more info…
CURL not compiled into PHP – notify server administrator more info…
CURL not compiled into PHP – notify server administrator more info… Continue reading “Problem with cURL and PHP Output Buffering while installing zen cart”

How to remove “New Products …, All Products” in Zen Cart main page?

Open tpl_categories.php under include/templates/template_default/siteboxes/

 1. Remove New Products…,

At line 80,

if ($show_this->RecordCount() > 0) {
        $content .= ‘<a class=”category-links” href=”‘ . zen_href_link(FILENAME_PRODUCTS_NEW) . ‘”>’ . CATEGORIES_BOX_HEADING_WHATS_NEW . ‘</a>’ . ‘<br />’ . “\n”;

Change the code to: Continue reading “How to remove “New Products …, All Products” in Zen Cart main page?”