Forums / Templates, Stylesheets, Page Layout / Which file do I edit for All Products page

Which file do I edit for All Products page

Locked

Views: 1,575

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
14 Jul 2006, 9:16 PM
#1
onisama avatar

onisama

New Zenner

Join Date:
Dec 2005
Posts:
60
Plugin Contributions:
0

Which file do I edit for All Products page

I want to move the product description for each product on the "All Products" page, but I'm not sure which file to edit.

Thanks.

14 Jul 2006, 10:10 PM
#2
tinas avatar

tinas

Totally Zenned

Join Date:
Jan 2005
Location:
Lake Havasu, AZ
Posts:
1,090
Plugin Contributions:
0

Re: Which file do I edit for All Products page

I believe you are looking for :

Includes/Templates/template_default/templates/tpl_products_all_default.php

Which of course should be placed in your over ride directory once you have edited it ;)

When the world gets in my face I say Have A Nice Day.

14 Jul 2006, 11:07 PM
#3
onisama avatar

onisama

New Zenner

Join Date:
Dec 2005
Posts:
60
Plugin Contributions:
0

Re: Which file do I edit for All Products page

Well after playing with this file for a couple of hours all I got were parse errors and the like. I'm just begining to half-way understand php, so I'm not getting very far.

I'd like to move the product description above the price.

I think I've targeted this line of code as the culprit (line 38)

  $products_all_query_raw = "select 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 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 = '" . (int)$_SESSION['languages_id'] . "'" . $order_by;

I'm just not sure what to change.

15 Jul 2006, 3:31 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Which file do I edit for All Products page

If you peek in the code for:
/includes/templates/template_default/templates/tpl_module_products_all.php

You will find this row ... that displays the description after everything else:

<?php if (PRODUCT_ALL_LIST_DESCRIPTION != 0) { ?>
          <tr>
            <td colspan="3" valign="top" class="main">
              <?php
                echo $display_products_description;
              ?>
            </td>
          </tr>
<?php } ?>

This displays the price when it is time to display it based on the sort order:

                  if ($disp_sort_order->fields['configuration_key'] == 'PRODUCT_ALL_LIST_PRICE') {
                    echo $display_products_price;
                  }

If you were to move the echo for the description above the echo of the price then the description is now above price vs below everything ...

easy eh?! :cool:

Note: you may wish to fool with clases etc for a nice display ... but this should get you in the right direction ...

NOTE: don't forget to use your templates and overrides directory for this change ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

16 Jul 2006, 3:48 AM
#5
onisama avatar

onisama

New Zenner

Join Date:
Dec 2005
Posts:
60
Plugin Contributions:
0

Re: Which file do I edit for All Products page

I'm using zen version 1.2 and I don't think I have that file. I'm working on a site someone else built about a year and a half ago and so far have been unsuccessful in my upgrade attempts.

I'm trying to get the site looking right as it is now, before I continue with an upgrade attempt. We will also be changing hosts and servers in the future and i may just doa clean install.

What file in 1.2 controls the All Products page.

18 Jul 2006, 9:19 PM
#6
onisama avatar

onisama

New Zenner

Join Date:
Dec 2005
Posts:
60
Plugin Contributions:
0

Re: Which file do I edit for All Products page

anybody know?