Zen Cart V1.5.5 Add Extra Text at Category Footer

  1. Modify mysql database, add a field called ‘categories_footer’ at the table of ‘categories_description’, same field names and description of the field called ‘categories_description’.
  2. Add the function at admin panel, to create or modify a category, we need to modify categories.php which is under the admin fold. Within this file we need to add an extra field so that we can fill in the extra text of footer. Take care there are several places need to modify or add.
  3. We need to create a function called “zen_get_category_footer()”, same as  the function of “zen_get_category_description()”, add it within the file called general.php, which is under “admin/includes/functions/”.
  4. We also need to add the new extra block name with categories.php, say “define(‘TEXT_CATEGORIES_FOOTER’, ‘Categories Footer Description:’);”, just let this line under “define(‘TEXT_CATEGORIES_DESCRIPTION’, ‘Categories Description:’);”, which will be added within the file called  categories.php which is under “admin/includes/languages/english/”.
  5.  Now let’s share how to let the  extra text at footer display at front page of a category. We need to modify 2 files. Let modify the first file which is called “tpl_index_product_list.php”, just under “includes/templates/responsive_classic/templates/”. Add the following code just above the last </div> at the end of the file:
    <?php
    // categories_description
    if ($current_categories_footer != ”) {
    ?>
    <div id=”indexProductListCatDescription” class=”content”><?php echo $current_categories_footer;  ?></div>
    <?php } // categories_description ?>
    </div>
  6. Modify the last file called “main_template_vars.php”, which is under “includes/modules/pages/index/”. Modify $sql, and add the new field, so that we can  use “$current_categories_footer” at “tpl_index_product_list.php”.
Posted in MySQL, Php Study, Zen Cart. Comments Off on Zen Cart V1.5.5 Add Extra Text at Category Footer »

How to Modify Price Category of Zen-Cart?

How to modify price categories to:  29 Dollar Glasses, 39 Dollar Glasses, 49 Dollar Glasses, 69 Dollar Glasses, and 99 Dollar Glasses, just as www.bestpriceglasses.com?

We should modify the following files:
admin/prodajxdetails.php
admin/seomgmt.php
admin/categories_header_desc.php, modify price related categories header description.
admin/option_metatag.php, modify price related meta tags
includes/modules/left_column.php
includes/modules/meta_tags.php
includes/templates/template_default/templates/tpl_index_product_list.php

At the same time we also should modify price seo related table: prefix_seo_url_1, take care the id arrangement, from small to big id.

Posted in Zen Cart. Comments Off on How to Modify Price Category of Zen-Cart? »

Zen-Cart Can not Run Admin

When visit zen-cart (V1.3.8a) amdin log in page, it shows:

Fatal error: Class ‘notifier’ not found in /home/myhost/public_html/myshop/includes/autoload_func.php on line 79

modify configure.php under admin/includes

define(‘DIR_FS_CATALOG’, ‘/home/myhost/myshop);  to   define(‘DIR_FS_CATALOG’, ‘/home/myhost/myshop/’);

Always best to run zc_install to build the configure.php files on a new site. Saves all kinds of wasted time troubleshooting needlessly.

 

 

Posted in Zen Cart. Comments Off on Zen-Cart Can not Run Admin »

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”;

For some phpmyadmin or mysql version, we need to use the followng code:

SELECT date_purchased, SUM(order_total) FROM orders where date_purchased between “2012-03-01” and “2012-03-31”;
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 orders, not include unpaid and canceled orders within a month:

SELECT date_purchased, SUM(order_total) FROM orders where date_purchased between “2012-08-01” and “2012-08-31” and  order_status <> “1”  and order_status <> “9”

Posted in MySQL, Zen Cart. Comments Off on Skills on Display Orders of Zen-Cart. »

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]; (more…)

Posted in Zen Cart. Comments Off on 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… (more…)

Posted in Apache, Zen Cart. Comments Off on 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: (more…)

Posted in Zen Cart. Comments Off on How to remove “New Products …, All Products” in Zen Cart main page? »
King Php Science Welcome, you are from: 54.224.158.232