wayne miller Posted August 19, 2011 Posted August 19, 2011 Hmm seems I was a bit premature. My problems are now 1 I want to get a button that says search on it 2 My search box is now next to my text shortcuts 3 My text shortcuts are black and I cant see them, how do I change them to white? Ive sorted number 2 out by spcing things using margins :-) I dont know wether this is the correct way but it works for me :-) <div id="header" class="grid_24"> <div id="storeLogo"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></div> <div style="margin-top:10px;"> <?php echo '<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_SHOPPING_CART) . '" alt="" >' .($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : '') . HEADER_TITLE_CART_CONTENTS . '</a>'. ' '.'»'.' '. '<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" alt="" >' . HEADER_TITLE_CHECKOUT . '</a>' .' '.'»'.' '. '<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '" alt="" >' . HEADER_TITLE_MY_ACCOUNT . '</a>'; if (tep_session_is_registered('customer_id')) { echo ' '.'»'.' '.'<a class="headerShortcutLink" href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '" alt="" >' . HEADER_TITLE_LOGOFF . '</a>'; } ?> <div style="margin-top:5px;"> <?php echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'); echo tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: 200px"') . ' ' . tep_hide_session_id() . tep_draw_hidden_field('search_in_description', '1') . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH); ?> </form> </div> That just leaves me with : 1 I want to get a button that says search on it 2 My text shortcuts are black and I cant see them, how do I change them to white? Can anybody help?
mrLaBoeuf Posted September 1, 2011 Posted September 1, 2011 Wish I came here 24 hours ago, thanks you for the code!
sydjeii Posted October 15, 2011 Posted October 15, 2011 i tried this code <?php echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'); echo '<strong>Search Site:</strong> ' . tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: 100px"') . ' ' . tep_hide_session_id() . tep_draw_hidden_field('search_in_description', '1') . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH); ?> </form> and it worked but i have another problem..the button doesnt align with the field..any suggestion guys? -=PINOY AKO=-
multimixer Posted October 15, 2011 Posted October 15, 2011 You need to apply "vertical-align:middle;" to the button image either via css or as inline style My community profile | Template system for osCommerce - New: Responsive | Feedback channel
fan4chevy Posted February 25, 2012 Posted February 25, 2012 For installing a search field in the header and be able to easily move it in various positions, I did it as a layer. Some may not like layers but it has worked for me in all browsers for years. <div id="Layer1" style="position:absolute; width:256px; height:32px; z-index:1; left: 734px; top: 24px;"><?php echo tep_draw_form('search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') . tep_draw_hidden_field('search_in_description','1') . tep_draw_input_field('keywords', '', 'size="10" maxlength="75" style="width: ' . (125) . 'px"') . ' ' . tep_hide_session_id() .'<input type="submit" name="Submit" value="Search">' . '</form>'; ?></div> I put this in the header div.
fan4chevy Posted February 25, 2012 Posted February 25, 2012 hey missery I think you might like another way better! In the new cart 2.3.1 it doesn't work as well because when you resize the browser the search box does not move with the page causing it to be off! So let me know if you are interested in having the search box fixed to move with the cart. I have the method and will probably put it in addons.
fan4chevy Posted February 27, 2012 Posted February 27, 2012 I just created a quick and easy addon for 2.3 that adds a search box field in your header area. This can also add it to the breadcrumb bar. I am sure it will work the same for 2.2 as well. This contrib will not change any existing scripts but rather simply adds simple fields in header.php and stylesheet.css. Search Box In Header 2.3 Hope this helps, Charles fan4chevy
Guest Posted February 27, 2012 Posted February 27, 2012 hey missery I think you might like another way better! In the new cart 2.3.1 it doesn't work as well because when you resize the browser the search box does not move with the page causing it to be off! So let me know if you are interested in having the search box fixed to move with the cart. I have the method and will probably put it in addons. i am using 2.2 rc2a, i have installed it and all seems ok , cheers for this..
Recommended Posts
Archived
This topic is now archived and is closed to further replies.