Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Change Order of Columns in Product List Help

Change Order of Columns in Product List Help

Views: 563

Results 1 to 3 of 3
17 Sep 2011, 6:24 PM
#1
chris_black_hills avatar

chris_black_hills

New Zenner

Join Date:
Nov 2007
Posts:
9
Plugin Contributions:
0

Change Order of Columns in Product List Help

Version: 1.3.9f
Here is the URL of what I'm talking about:
http://customvinylenvelopes.com/index.php?main_page=index&cPath=1_31

I have three columns in the Product List page.

  1. Quantity Discount
  2. Item Name
  3. Price

I need it to be:

  1. Item Name
  2. Quantity Discount
  3. Price.

For the life of me, I can't get it to swap those two columns. Iadded some code (from another post here) that allows me to put the quantity discounts for each product to display in the product list column.
I've checked in /modules/<templatename>/product_listing.php and changed the order around, but I can't get Item Name to list first.
Can someone please help me understand what file controls the order of columns to be displayed.
Thank you!
Chris.

17 Sep 2011, 6:45 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Change Order of Columns in Product List Help

modules/pages/index/main_template_vars.php```
// create column list
$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);

The values on the left are the strings in the lookup in the products_listing.php file, and the values on the right are numeric values set via Admin->Configuration->Product Listing ... the numbers are the sort order.
So, add your own value to the list, using a string on the left which matches whatever you used for your qty discount column, and assign a numeric value to it for the sort order you want it to use, assuming you didn't add the admin switch to the database so you can use the configuration menu to do it from your browser.
eg 'PRODUCT_QTY_DISC(orwhateveryoucalledit)' =>6
8 Jan 2012, 6:16 AM
#3
nao_1 avatar

nao_1

New Zenner

Join Date:
Jan 2012
Location:
London, UK
Posts:
5
Plugin Contributions:
0

Re: Change Order of Columns in Product List Help

Hi,

I know this is an ancient thread, but it really helped me and I just wanted to say thank you very much!

Nao