Zen Cart Logo
Forums / All Other Contributions/Addons / Using one single listing template

Using one single listing template

Views: 90,801

Results 101 to 120 of 327
11 Jan 2009, 8:16 PM
#101
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Using one single listing template

rooisnor:

I went to your link for the package you have... uploaded the files and I assume I had to run the install.sql?

As I did I get this error:

#1146 - Table 'artgang_zc2.configuration' doesn't exist

if I'm correct it seems not to read the zen.configuration table...

Maybe I did something wrong?
Did you run it on your admin patch tool?

11 Jan 2009, 9:03 PM
#102
rooisnor avatar

rooisnor

Zen Follower

Join Date:
Jul 2008
Posts:
192
Plugin Contributions:
0

Re: Using one single listing template

Thank you, I did run it initially via phpmyAdmin when I got the error but I used the Admin > Tools this time and it went great but get an error when I click to go to new Products added:

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'limit 0, 10' at line 1
in:
[ limit 0, 10]

Here is the link:

http://theartgangster.com/arttest/index.php?main_page=products_new

11 Jan 2009, 9:15 PM
#103
rooisnor avatar

rooisnor

Zen Follower

Join Date:
Jul 2008
Posts:
192
Plugin Contributions:
0

Re: Using one single listing template

..one more question, aren't the files below suppose to overwrite the original files? ...bacause i see they're in their own folder and not overwriting the original ones..

tpl_featured_products_default
tpl_modules_product_listing
tpl_products_all_default
tpl_specials_default

12 Jan 2009, 1:21 AM
#105
rooisnor avatar

rooisnor

Zen Follower

Join Date:
Jul 2008
Posts:
192
Plugin Contributions:
0

Re: Using one single listing template

I don't know but after following the instruction I get the following error on the All, Specials, Features and New listing pages:

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'limit 0, 10' at line 1
in:
[ limit 0, 10]

12 Jan 2009, 1:31 AM
#106
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Using one single listing template

rooisnor:

I don't know but after following the instruction I get the following error on the All, Specials, Features and New listing pages:
It's hard to say, since the 1064 error code is rather ambiguous, it can mean many things. Lets start from your sql version first, what is it?

12 Jan 2009, 1:55 AM
#107
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,646
Plugin Contributions:
0

Re: Using one single listing template

Secondly, if Zen Cart had a feature in the Admin where you can set the pages as ONE layout it would've not been necessary for a '3rd party' to FIX the problem!

As was stated earlier in this thread, in the upcoming version, you will have the choice of layouts, columnar, tabular or even a custom layout and you can make all the pages match or have each of the listings different.

but,

until then, you have a third party mod that has been generously put together and supported.

Bad attitude is not tolerated very well here ... If you don't like what IS available there are other programs, but none will do everything that Zen Cart does for our price.

12 Jan 2009, 4:57 PM
#108
rooisnor avatar

rooisnor

Zen Follower

Join Date:
Jul 2008
Posts:
192
Plugin Contributions:
0

Re: Using one single listing template

yellow1912:

It's hard to say, since the 1064 error code is rather ambiguous, it can mean many things. Lets start from your sql version first, what is it?

This is what I have according to the host:

mysql version is the following.

mysql Ver 14.7 Distrib 4.1.22.

12 Jan 2009, 5:08 PM
#109
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Using one single listing template

rooisnor:

This is what I have according to the host:
This is what 1064 means:
The error 1064 occurs due to Mysql version mismatch,because differnt
versions have differnt
reserved words,which if used by a previous version causes the error to
occur.

It's a bit hard to understand why you have such error though, since basically this module use the same sql query the original ones use.
However, note that this is for 1.3.8, maybe you are on an older version?

What happens if you open those header_php.php files, then replace the query content (just the query content) by the ones found in the default files?

12 Jan 2009, 5:44 PM
#110
rooisnor avatar

rooisnor

Zen Follower

Join Date:
Jul 2008
Posts:
192
Plugin Contributions:
0

Re: Using one single listing template

yellow1912:

This is what 1064 means:
The error 1064 occurs due to Mysql version mismatch,because differnt
versions have differnt
reserved words,which if used by a previous version causes the error to
occur.

It's a bit hard to understand why you have such error though, since basically this module use the same sql query the original ones use.
However, note that this is for 1.3.8, maybe you are on an older version?

What happens if you open those header_php.php files, then replace the query content (just the query content) by the ones found in the default files?

Thanks yellow, I'm using the latest version of Zen Cart.
I'll go and have a look at the header php and report back.

12 Jan 2009, 6:03 PM
#111
rooisnor avatar

rooisnor

Zen Follower

Join Date:
Jul 2008
Posts:
192
Plugin Contributions:
0

Re: Using one single listing template

Here is the test site where I try this:

http://theartgangster.com/arttest/

New Products show the error
All Products do not show the error but not all products.

I replaced the queries but still have the error. Hope this helps

12 Jan 2009, 6:06 PM
#112
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Using one single listing template

rooisnor:

Here is the test site where I try this:

http://theartgangster.com/arttest/

New Products show the error
All Products do not show the error but not all products.

I replaced the queries but still have the error. Hope this helps
post the header_php.php of your all products here

12 Jan 2009, 6:10 PM
#113
rooisnor avatar

rooisnor

Zen Follower

Join Date:
Jul 2008
Posts:
192
Plugin Contributions:
0

Re: Using one single listing template

<?php
/**
 * products_all  header_php.php
 *
 * @package page
 * @copyright Copyright 2003-2007 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: header_php.php 6912 2007-09-02 02:23:45Z drbyte $
 */

  require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));



  $breadcrumb->add(NAVBAR_TITLE);
// display order dropdown
  $disp_order_default = PRODUCT_ALL_LIST_SORT_DEFAULT;
  require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_LISTING_DISPLAY_ORDER));

  $products_all_array = array();

  $listing_sql = "SELECT p.products_type, p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id,
                                    p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight, p.product_is_call,
                                    p.product_is_always_free_shipping, p.products_qty_box_status,
                                    p.master_categories_id
                             FROM " . TABLE_PRODUCTS . " p
                             LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd
                             WHERE p.products_status = 1
                             AND p.products_id = pd.products_id
                             AND pd.language_id = :languageID " . $order_by;

  $listing_sql = $db->bindVars($listing_sql, ':languageID', $_SESSION['languages_id'], 'integer');
  //check to see if we are in normal mode ... not showcase, not maintenance, etc
  $show_submit = zen_run_normal();

$define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
  'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
  'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
  'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
  'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
  'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
  'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE);

  /*                         ,
  'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
  */
  asort($define_list);
  reset($define_list);
  $column_list = array();
  foreach ($define_list as $key => $value)
  {
    if ($value > 0) $column_list[] = $key;
  }
?>
12 Jan 2009, 6:12 PM
#114
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Using one single listing template

It seems like the template files were not changed.

12 Jan 2009, 6:15 PM
#115
rooisnor avatar

rooisnor

Zen Follower

Join Date:
Jul 2008
Posts:
192
Plugin Contributions:
0

Re: Using one single listing template

You mean these files?

tpl_featured_products_default
tpl_modules_product_listing
tpl_products_all_default
tpl_specials_default

12 Jan 2009, 6:17 PM
#116
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Using one single listing template

Yes, for each "page" i remember you have to change at least 1-2 template files. And you have to change them in the correct folder. For example, in your case, your probably have to over ride them in the "classic" folder

12 Jan 2009, 6:21 PM
#117
rooisnor avatar

rooisnor

Zen Follower

Join Date:
Jul 2008
Posts:
192
Plugin Contributions:
0

Re: Using one single listing template

Just for the record and I don't know if that might be the problem.

The above files I mentioned is located in the package under:

templates/template_default

where the original templates are located under

templates/template_default/templates

I wasn't sure if your intentions were to overwrite those files?

12 Jan 2009, 6:24 PM
#118
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Using one single listing template

In your case they should be placed in
includes/templates/classic/templates/

rooisnor:

Just for the record and I don't know if that might be the problem.

The above files I mentioned is located in the package under:

templates/template_default

where the original templates are located under

templates/template_default/templates

I wasn't sure if your intentions were to overwrite those files?

12 Jan 2009, 6:30 PM
#119
rooisnor avatar

rooisnor

Zen Follower

Join Date:
Jul 2008
Posts:
192
Plugin Contributions:
0

Re: Using one single listing template

yellow1912:

In your case they should be placed in
includes/templates/classic/templates/

Thank you. I'm using the template_default folder for all the templates and not classic. Actually I don't have any folders listed under the classic folder exept for the style.css

Does any of the other pages point to /classic/templates or can I use /template_default/templates?

12 Jan 2009, 6:31 PM
#120
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Using one single listing template

You should use classic, by default the classic folder is used for overriding purpose.