Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / 1.57b how to change the search header?

1.57b how to change the search header?

Views: 989

Results 1 to 4 of 4
19 Dec 2020, 10:54 PM
#1
flappingfish avatar

flappingfish

Zen Follower

Join Date:
Nov 2020
Posts:
318
Plugin Contributions:
3

1.57b how to change the search header?

crazygamer.uk I am still trying to get down to the bottom of the issues on my site and something i had sorted has just reappeared and now i cannot get the search bar to resize at all.

moment you load the page you will see the issue straight away, i went to my template and altered the tpl_search_header.php to adjust the sizes to no avail.

<?php
/**
 * Side Box Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 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_search_header.php 4142 2006-08-15 04:32:54Z drbyte $
 */
$content = '';
$content .= zen_draw_form('quick_find_header', zen_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', $request_type, false), 'get');
$content .= zen_draw_hidden_field('main_page', FILENAME_ADVANCED_SEARCH_RESULT);
$content .= zen_draw_hidden_field('search_in_description', '1') . zen_hide_session_id();

$content .= zen_draw_input_field('keyword', '', 'size="6" maxlength="30" style="width: 100px" placeholder="' . HEADER_SEARCH_DEFAULT_TEXT . '" aria-label="' . HEADER_SEARCH_DEFAULT_TEXT . '" ');

$content .= ' ';

if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes') {
    $content .= zen_image_submit(BUTTON_IMAGE_SEARCH, HEADER_SEARCH_BUTTON);
} else {
    $content .= '<input type="submit" value="' . HEADER_SEARCH_BUTTON . '" style="width: 60px" />';
}

$content .= '</form>';

is the full .php file and the line i edited is below, the line i edited didn't have the style="width: 100px" in but i noticed this was present in other versions of the same file from the standardized template versions included with zencart 1.57b so i tried adding that too, im getting no php errors ect.

$content .= zen_draw_input_field('keyword', '', 'size="6" maxlength="30" style="width: 100px" placeholder="' .

All I did to get this to return was re add USD as a currency in a vain attempt to resolve a "$ is not defined" error. I then had to work out how to get it to correctly display the prices going through the various expected stages of prices showing as "0" and then in dollars when clearly the admin panel settings show it should be in gbp. I eventually got to the checkout page and im still getting a SQL_NONCE_ERROR code when i try to submit a card payment to square:wacko:

19 Dec 2020, 11:32 PM
#2
flappingfish avatar

flappingfish

Zen Follower

Join Date:
Nov 2020
Posts:
318
Plugin Contributions:
3

Re: 1.57b how to change the search header?

just wanted to add i've followed the guides with no success. If anyone looks at that code and it all seems fine could there be any other files that could be overriding this that being a noob i'd have forgot to check/not known about? im using template tableau 2 which has a few mods already installed, numinix attribute filter, disk cache, css js loader

20 Dec 2020, 1:37 AM
#3
drbyte avatar

drbyte

Sensei

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

Re: 1.57b how to change the search header?

There's a whole lotta forced-size/shape CSS rules set up for that box in your template's CSS files. Forced positioning, forced widths, and more.
Nothing in the Zen Cart documentation will override what your template's CSS is forcing on you.

20 Dec 2020, 2:43 AM
#4
flappingfish avatar

flappingfish

Zen Follower

Join Date:
Nov 2020
Posts:
318
Plugin Contributions:
3

Re: 1.57b how to change the search header?

This template is so tempramental its being looked at for updating by numinix as they didnt realise it was slightly "dysfunctional" installed direct to latest zen. I seem to fix a few minor issues and then find another one has self developed. It's driving me mad...
Sites functional enough to process an order but it only takes one click to land on a page that is loading wrong or find something that looks fine but doesn't function.