Forums / Upgrading from 1.3.x to 1.3.9 / /index/main_template_vars.php - do I need to change this?

/index/main_template_vars.php - do I need to change this?

Locked

Views: 1,397

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
26 May 2010, 1:08 PM
#1
pb4 avatar

pb4

Totally Zenned

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

/index/main_template_vars.php - do I need to change this?

Hi,

Just upgrading and I have found a few differences within

includes/modules/pages/index/main_template_vars.php

The one I am not sure about is at the bottom:

My old file has this:

// bof modified for Short Description for Categories
$current_categories_description = "";
$current_categories_description_sub = "";
// categories_description
$sql = "SELECT categories_description, categories_description_sub 
        FROM " . TABLE_CATEGORIES_DESCRIPTION . "
        WHERE categories_id= :categoriesID
        AND language_id = :languagesID";

$sql = $db->bindVars($sql, ':categoriesID', $current_category_id, 'integer');
$sql = $db->bindVars($sql, ':languagesID', $_SESSION['languages_id'], 'integer');
$categories_description_lookup = $db->Execute($sql);
if ($categories_description_lookup->RecordCount() > 0) {
  $current_categories_description = $categories_description_lookup->fields['categories_description'];
  $current_categories_description_sub = $categories_description_lookup->fields['categories_description_sub'];
}
// eof modified for Short Description for Categories

require($template->get_template_dir($tpl_page_body, DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . $tpl_page_body);

// This should be last line of the script:
$zco_notifier->notify('NOTIFY_HEADER_END_INDEX_MAIN_TEMPLATE_VARS');
?>

Upgraded file has this at the bottom:

$current_categories_description = "";
// categories_description
$sql = "SELECT categories_description
        FROM " . TABLE_CATEGORIES_DESCRIPTION . "
        WHERE categories_id= :categoriesID
        AND language_id = :languagesID";

$sql = $db->bindVars($sql, ':categoriesID', $current_category_id, 'integer');
$sql = $db->bindVars($sql, ':languagesID', $_SESSION['languages_id'], 'integer');
$categories_description_lookup = $db->Execute($sql);
if ($categories_description_lookup->RecordCount() > 0) {
  $current_categories_description = $categories_description_lookup->fields['categories_description'];
}

require($template->get_template_dir($tpl_page_body, DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . $tpl_page_body);

// This should be last line of the script:
$zco_notifier->notify('NOTIFY_HEADER_END_INDEX_MAIN_TEMPLATE_VARS');
?>

Should I replace this bit with my old script? Or leave alone?

Thanks

26 May 2010, 1:36 PM
#2
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: /index/main_template_vars.php - do I need to change this?

Check the top of your old file.

Does it read this?

....

  • @version $Id: main_template_vars.php 6066 2007-03-25 17:51:43Z ajeh $
    */

If the date and time in your file are older then use the new file

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

26 May 2010, 1:44 PM
#3
pb4 avatar

pb4

Totally Zenned

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

Re: /index/main_template_vars.php - do I need to change this?

Yes its older..so I'll leave the file as it is.

Thanks :bigups:

26 May 2010, 1:56 PM
#4
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: /index/main_template_vars.php - do I need to change this?

pb4:

Yes its older..so I'll leave the file as it is.

Thanks :bigups:

I may not have made myself clear enough: you should use the file with the newer date and discard the file with the older date.

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

26 May 2010, 1:59 PM
#5
pb4 avatar

pb4

Totally Zenned

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

Re: /index/main_template_vars.php - do I need to change this?

Yeah you were clear...I have left the newer version (upgraded file) and not copied over it with the older one :smile:

Thnaks for checking