Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Sidebox - template doesn't have it..

Sidebox - template doesn't have it..

Locked

Views: 877

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
27 Dec 2010, 10:02 AM
#1
maxy007 avatar

maxy007

Zen Follower

Join Date:
Dec 2010
Posts:
248
Plugin Contributions:
0

Sidebox - template doesn't have it..

Hi I'm using the tvzen_jellyfish template. I really like it but it doesn't have the right sideboxes available. It says it does in the read me file but it's not there.

If I want to add the sidebox on the right for "tell a friend"

**Do i need to change the code in includes/modules/sideboxes/tell_a_friend.php

the code for that file is as follows**

<?php /** * tell_a_friend sidebox - displays option to tell a friend about the selected product * * @package templateSystem * @copyright Copyright 2003-2005 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: tell_a_friend.php 2718 2005-12-28 06:42:39Z drbyte $ */ // test if box should display $show_tell_a_friend= false; if (isset($_GET['products_id']) and zen_products_id_valid($_GET['products_id'])) { if (!($_GET['main_page']==FILENAME_TELL_A_FRIEND)) $show_tell_a_friend = true; } if ($show_tell_a_friend == true) { require($template->get_template_dir('tpl_tell_a_friend.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_tell_a_friend.php'); $title = BOX_HEADING_TELL_A_FRIEND; $title_link = false; require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); } ?>

**Do i also need to change includes/templates/template_default/sideboxes/tpl_tell_a_friend.php?

The code for that is as follows:**

<?php /** * Side Box Template * * @package templateSystem * @copyright Copyright 2003-2010 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: tpl_tell_a_friend.php 15882 2010-04-11 16:37:54Z wilt $ */ $content = ""; $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">'; $content .= zen_draw_form('tell_a_friend', zen_href_link(FILENAME_TELL_A_FRIEND, '', $request_type, false), 'get'); $content .= zen_draw_hidden_field('main_page', FILENAME_TELL_A_FRIEND); $content .= zen_draw_input_field('to_email_address', '', 'size="10"') . ' ' . zen_image_submit(BUTTON_IMAGE_TELL_A_FRIEND, BUTTON_TELL_A_FRIEND_ALT) . zen_draw_hidden_field('products_id', $_GET['products_id']) . zen_hide_session_id() . '<br />' . BOX_TELL_A_FRIEND_TEXT; $content .= "</form>"; $content .= '</div>'; ?>

What part of each code do i need to add/change and is that all I have to do to enable sideboxes on the right of my site?

Thank you

Maxy

27 Dec 2010, 10:54 AM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Sidebox - template doesn't have it..

You shouldn't have to edit either of those files. What's your setting in Admin - Configuration - Layout Settings - Column Right Status - Global ?

Have you activated that sidebox to the right column in Admin - Tools - Layout Boxes Controller ?

27 Dec 2010, 1:25 PM
#3
maxy007 avatar

maxy007

Zen Follower

Join Date:
Dec 2010
Posts:
248
Plugin Contributions:
0

Re: Sidebox - template doesn't have it..

Hi Stevesh,
Yes I have activated both oth those in Admin.
Thanks why I'm thinking I'll have to modify the files.

Cheers,

Maxy

27 Dec 2010, 4:03 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Sidebox - template doesn't have it..

You shouldn't need to modify individual sidebox files - I expect that that wouldn't help you anyway. If the admin settings are not working, that means the template has hard-coded the right column off. The file to edit is probably /includes/templates/your_template/common/tpl_main_page.php; there are comments at the top of it that describe how to disable a sidebar, so look for similar things.

27 Dec 2010, 4:04 PM
#5
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Sidebox - template doesn't have it..

If I remember correctly, the Tell a Friend sidebox only displays when you are on the product info page.

27 Dec 2010, 8:18 PM
#6
maxy007 avatar

maxy007

Zen Follower

Join Date:
Dec 2010
Posts:
248
Plugin Contributions:
0

Re: Sidebox - template doesn't have it..

Thanks so much for yourmreplies.

I'm going to use a different template. It's just not worth the grief!!

Cheers,

Maxy