If this is your first visit, check our documentation. To post, register or login.
Forums / All Other Contributions/Addons / Using one single listing template

Using one single listing template

Started by yellow1912 on 31 Dec 2007, 11:21 PM · Views: 90,908

Results 121 to 140 of 327
12 Jan 2009, 6:44 PM
#121
rooisnor avatar

rooisnor

Zen Follower

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

Using one single listing template

yellow1912:

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

Thanks yellow, I'm in the process of coping the template file to the classic folder. I'll override those template files and report back.

12 Jan 2009, 7:12 PM
#122
rooisnor avatar

rooisnor

Zen Follower

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

Re: Using one single listing template

Yellow, just to make sure... I changed and move these following folders also to /classic/

includes/modules/template_default ... and rename this to includes/modules/classic/

If I did that all the pages works great except for New Products which still shows the same error... I'm getting closer!:D

12 Jan 2009, 7:18 PM
#123
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Using one single listing template

rooisnor:

Yellow, just to make sure... I changed and move these following folders also to /classic/

includes/modules/template_default ... and rename this to includes/modules/classic/

If I did that all the pages works great except for New Products which still shows the same error... I'm getting closer!:D
If new product shows the sql error, first post that page header_php.php here

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

12 Jan 2009, 7:22 PM
#124
rooisnor avatar

rooisnor

Zen Follower

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

Re: Using one single listing template

<?php
/**
 * products_new 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_NEW_LIST_SORT_DEFAULT;
  require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_LISTING_DISPLAY_ORDER));
  $products_new_array = array();
// display limits
//  $display_limit = zen_get_products_new_timelimit();
  $display_limit = zen_get_new_date_range();

  $listing_sql = "SELECT p.products_id, p.products_type, 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 " . $display_limit . $order_by;

  $listing_sql = $db->bindVars($listing_sql, ':languageID', $_SESSION['languages_id'], 'integer');
  $products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW);

//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, 7:24 PM
#125
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Using one single listing template

Remove this line
$products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW);

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

12 Jan 2009, 7:31 PM
#126
rooisnor avatar

rooisnor

Zen Follower

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

Re: Using one single listing template

yellow1912:

Remove this line
$products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW);

Great, the error message is gone now but it doesn't read the new products listing.

Shows the following:

More new products will be added soon. Please check back later.

I checked and it seems I have all the files in the correct places though

12 Jan 2009, 7:33 PM
#127
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Using one single listing template

More than likely there is something missing in the new product template, it should look the same with the rest of the template files you have just changed.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

12 Jan 2009, 7:37 PM
#128
rooisnor avatar

rooisnor

Zen Follower

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

Re: Using one single listing template

Thank you yellow... let me 're-do' the package and I'll report back!

12 Jan 2009, 7:58 PM
#129
rooisnor avatar

rooisnor

Zen Follower

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

Re: Using one single listing template

I uploaded a fresh copy from your original package, made the changes with the same results.

The only page which is not showing the listings is the New Products Listing... the others work great!

Although I'm not too worried about the New Products listing but the other pages were crucial!

Thank you very much for your help and time yellow, you did a great job with this package which is a HUGE contribution to Zen Cart!!

I'll fiddle around and see if I can get the New Product Listing to work and I'll let you know :D

14 Jan 2009, 6:57 AM
#130
loriw avatar

loriw

New Zenner

Join Date:
Nov 2006
Posts:
62
Plugin Contributions:
0

Re: Using one single listing template

I am having the same error with my new product listing. I have also tried to restore my sql backups with no luck.

However, I was getting this error also for my featured listing, I did fix this by moving my stuff from mycustomtemplate to mycustomtemplate/templates this is not how it is set in the download. :)

Anyway, How would I go about fixing the new product listing?

Thanks. :)

14 Jan 2009, 7:12 AM
#131
rooisnor avatar

rooisnor

Zen Follower

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

Re: Using one single listing template

...glad to hear I'm not the only one! Yellow might find a solution! :yes:

14 Jan 2009, 7:12 AM
#132
loriw avatar

loriw

New Zenner

Join Date:
Nov 2006
Posts:
62
Plugin Contributions:
0

Re: Using one single listing template

Okay I fixed the new product listing and is working like a charm by using the original header.php in the includes/modules/pages/product new.

Thank you so much Yellow for the contribution. :)

14 Jan 2009, 7:23 AM
#133
rooisnor avatar

rooisnor

Zen Follower

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

Re: Using one single listing template

LoriW.:

Okay I fixed the new product listing and is working like a charm by using the original header.php in the includes/modules/pages/product new.

Thank you so much Yellow for the contribution. :)

...you mean by replacing only the original files wrt. Product New?

14 Jan 2009, 7:24 AM
#134
loriw avatar

loriw

New Zenner

Join Date:
Nov 2006
Posts:
62
Plugin Contributions:
0

Re: Using one single listing template

I should add that I did reinstall my store backup and never did reinstall the install.sql file. Not sure if that was another reason it worked. :)

14 Jan 2009, 7:27 AM
#135
loriw avatar

loriw

New Zenner

Join Date:
Nov 2006
Posts:
62
Plugin Contributions:
0

Re: Using one single listing template

rooisnor:

...you mean by replacing only the original files wrt. Product New?

Not sure what you mean by wrt. But yes I had renamed the original header.php before overwritting it with this new one so I renamed it back. I'm sure it's the same as the one named header.php.php.default. Try naming that back to header.php

20 Jan 2009, 7:29 PM
#136
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Using one single listing template

Module has been updated with multiple fixes.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

25 Jan 2009, 5:45 AM
#137
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

Re: Using one single listing template

Does anybody else get this error message after installation?

1054 Unknown column 'p.master_categories_id' in 'on clause'
in:
[select count(p.products_id) as total FROM products p LEFT JOIN manufacturers m ON (p.manufacturers_id = m.manufacturers_id), products_description pd LEFT JOIN hide_categories h ON (p.master_categories_id = h.categories_id) WHERE (h.visibility_status < 2 OR h.visibility_status IS NULL) AND p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 ]

I couldn't find any information about this in the thread!

25 Jan 2009, 5:47 AM
#138
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Using one single listing template

Look like you are using a module called hide category or whatever it is. You will need to adjust the query so it works with that module. I dont use that module, so no idea :)

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

25 Jan 2009, 3:22 PM
#139
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: Using one single listing template

Hello there,

This is an excellent mod, I have the listing looking standardised across the website.

I just found one thing, which is probably specific to me, as I hae gone through the whole thread and not seen anyone with the same problem.

My Featured and New pages are limited to 10 - the same as the sidebox on the homepage. Specials and All pages are fine.

I am hoping I have not missed something really simple - else I will be kicking myself lol.

I do have Column layout Grid Listing by DrByte, so not sure if that has anything to do with it.

I tried changing the Listing method (1,2, or 3) which was made by the SQL statement. But all pages are on a shared listing now.

Thanks in advance,

Heathenmagic

25 Jan 2009, 4:53 PM
#140
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Using one single listing template

HeathenMagic:

Hello there,

This is an excellent mod, I have the listing looking standardised across the website.

I just found one thing, which is probably specific to me, as I hae gone through the whole thread and not seen anyone with the same problem.

My Featured and New pages are limited to 10 - the same as the sidebox on the homepage. Specials and All pages are fine.

I am hoping I have not missed something really simple - else I will be kicking myself lol.

I do have Column layout Grid Listing by DrByte, so not sure if that has anything to do with it.

I tried changing the Listing method (1,2, or 3) which was made by the SQL statement. But all pages are on a shared listing now.

Thanks in advance,

Heathenmagic
The listing methods are for the index listing only.
The new page for example is using MAX_DISPLAY_PRODUCTS_NEW to set the max products per page. You may want to change it and see if it affects the result.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me