Re: Testimonial Manager Support Thread
Hello,
Firstly thanks Clyde (again!) for a superb add on :smile:
Two questions:
(I have searched this thread but to no avail.)
1: Would it be possible to display the Testimonials sidebox only on the Home page?
2: Can I add the 'index.php?main_page=display_all_testimonials' page to the site map?
Thanks.
Re: Testimonial Manager Support Thread
To answer question #1 visit this page on the zencart tutorial.
To answer #2 visit this page "How to edit SiteMap links in ZenCart".
Hope that helps...
Re: Testimonial Manager Support Thread
Quote:
Originally Posted by
ultimate_zc
Thanks for the reply,
I managed to add the relevant link to the sitemap so thanks for that usefull link. However Im still struggling with the sidebox question. Heres my /modules/sideboxes/my_template/testimonials_manager.php file as is:
<?php
/**
* Testimonials Manager
*
* @package Template System
* @copyright 2007 Clyde Jones
* @copyright Portions Copyright 2003-2007 Zen Cart Development Team
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: Testimonials_Manager.php v1.5.0 1-9-2009 Clyde Jones $
*/
// test if box should display
$page_query = $db->Execute("select testimonials_id, testimonials_image, testimonials_title, testimonials_html_text, date_added from " . TABLE_TESTIMONIALS_MANAGER . " where status = 1 and language_id = " . (int)$_SESSION['languages_id'] . " order by rand(), testimonials_title limit " . MAX_DISPLAY_TESTIMONIALS_MANAGER_TITLES ."");
if ($page_query->RecordCount()>0) {
$title = BOX_HEADING_TESTIMONIALS_MANAGER;
$box_id = testimonials_manager;
$rows = 0;
while (!$page_query->EOF) {
$rows++;
$page_query_list[$rows]['id'] = $page_query->fields['testimonials_id'];
$page_query_list[$rows]['name'] = $page_query->fields['testimonials_title'];
$page_query_list[$rows]['story'] = $page_query->fields['testimonials_html_text'];
$page_query_list[$rows]['image'] = $page_query->fields['testimonials_image'];
$page_query->MoveNext();
}
$left_corner = false;
$right_corner = false;
$right_arrow = false;
$title_link = false;
require($template->get_template_dir('tpl_testimonials_manager.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_testimonials_manager.php');
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
}
//EOF
Im not sure how, what or where to add the relevant code mentioned here: https://www.zen-cart.com/tutorials/i...hp?article=270 :blush:
Any helps much appreciated :smile:
Re: Testimonial Manager Support Thread
Quote:
Originally Posted by
gaffettape
Thanks for the reply,
I managed to add the relevant link to the sitemap so thanks for that usefull link. However Im still struggling with the sidebox question. Heres my /modules/sideboxes/my_template/testimonials_manager.php file as is:
PHP Code:
<?php
/**
* Testimonials Manager
*
* @package Template System
* @copyright 2007 Clyde Jones
* @copyright Portions Copyright 2003-2007 Zen Cart Development Team
* @license [url]http://www.zen-cart.com/license/2_0.txt[/url] GNU Public License V2.0
* @version $Id: Testimonials_Manager.php v1.5.0 1-9-2009 Clyde Jones $
*/
// test if box should display
$show_testimonial = true
if ($this_is_home_page) {
$show_testimonial = true
} else {
$show_testimonial = false
}
if ($show_testimonial == true) {
$page_query = $db->Execute("select testimonials_id, testimonials_image, testimonials_title, testimonials_html_text, date_added from " . TABLE_TESTIMONIALS_MANAGER . " where status = 1 and language_id = " . (int)$_SESSION['languages_id'] . " order by rand(), testimonials_title limit " . MAX_DISPLAY_TESTIMONIALS_MANAGER_TITLES ."");
if ($page_query->RecordCount()>0) {
$title = BOX_HEADING_TESTIMONIALS_MANAGER;
$box_id = testimonials_manager;
$rows = 0;
while (!$page_query->EOF) {
$rows++;
$page_query_list[$rows]['id'] = $page_query->fields['testimonials_id'];
$page_query_list[$rows]['name'] = $page_query->fields['testimonials_title'];
$page_query_list[$rows]['story'] = $page_query->fields['testimonials_html_text'];
$page_query_list[$rows]['image'] = $page_query->fields['testimonials_image'];
$page_query->MoveNext();
}
$left_corner = false;
$right_corner = false;
$right_arrow = false;
$title_link = false;
require($template->get_template_dir('tpl_testimonials_manager.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_testimonials_manager.php');
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
}
}
//EOF
Im not sure how, what or where to add the relevant code mentioned here:
https://www.zen-cart.com/tutorials/i...hp?article=270 :blush:
Any helps much appreciated :smile:
I've added the corrected code above just copy and paste and save to your server.
Re: Testimonial Manager Support Thread
Quote:
Originally Posted by
clydejones
I've added the corrected code above just copy and paste and save to your server.
Sorry Clyde that hasn't seemed to of worked :dontgetit ?? I would provide a link to the site ... but its just on my comp at the moment (sorry!)
Re: Testimonial Manager Support Thread
Quote:
Originally Posted by
gaffettape
Sorry Clyde that hasn't seemed to of worked :dontgetit ?? I would provide a link to the site ... but its just on my comp at the moment (sorry!)
Try this:
PHP Code:
if ($this_is_home_page) {
$page_query = $db->Execute("select testimonials_id, testimonials_image, testimonials_title, testimonials_html_text, date_added from " . TABLE_TESTIMONIALS_MANAGER . " where status = 1 and language_id = " . (int)$_SESSION['languages_id'] . " order by rand(), testimonials_title limit " . MAX_DISPLAY_TESTIMONIALS_MANAGER_TITLES ."");
if ($page_query->RecordCount()>0) {
$title = BOX_HEADING_TESTIMONIALS_MANAGER;
$box_id = testimonials_manager;
$rows = 0;
while (!$page_query->EOF) {
$rows++;
$page_query_list[$rows]['id'] = $page_query->fields['testimonials_id'];
$page_query_list[$rows]['name'] = $page_query->fields['testimonials_title'];
$page_query_list[$rows]['story'] = $page_query->fields['testimonials_html_text'];
$page_query_list[$rows]['image'] = $page_query->fields['testimonials_image'];
$page_query->MoveNext();
}
$left_corner = false;
$right_corner = false;
$right_arrow = false;
$title_link = false;
require($template->get_template_dir('tpl_testimonials_manager.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_testimonials_manager.php');
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
}
}
Re: Testimonial Manager Support Thread
Yea that worked perfectly, Thanks Clyde :smile:
Re: Testimonial Manager Support Thread
I had the testimonials running on my site. I changed templates, and now it's not running correctly anymore. The testimonials are there....
but when I go to turn on the sidebox, I can see it there....
sideboxes/a_pink_boutique/testimonials_manager.php
I clidk on edit, add to the left column, click update, and it takes me back to my main admin page, out of the layout boxes completely.
I reinstalled all the files, from the newest version, ran the upgrade, and again, I can see all the testimonials are there, but I still can't add them to my sidebox.
Re: Testimonial Manager Support Thread
well, this looks to be something related to something else, because I am having the same problem when I'm adding a link to my ez pages...it just pops straight back to the admin screen
Re: Testimonial Manager Support Thread
Quote:
Originally Posted by
paperthreads
well, this looks to be something related to something else, because I am having the same problem when I'm adding a link to my ez pages...it just pops straight back to the admin screen
Version of Zen Cart?
Have you installed the Security updates?