Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Footer Content Modules for V2.3


tgely

Recommended Posts

You have an error in one of the files. Try uploading all of the files again. If that does not fix it, remove all of the module files from catalog/includes/modules/header_footer_contents/, then reload them one at a time, testing the modules admin page after each upload. The upload that breaks the page is the one that has the error.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Thank you Jim

You are right the wrong module was the hfc_store_logo.php and the code is

 

 

<?php

/*

$Id$ Tth Gergely http://oscom.hu

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

Copyright © 2010 osCommerce

Released under the GNU General Public License

*/

 

class hfc_store_logo {

 

var $code = 'hfc_store_logo';

 

var $group = 'header_footer_contents';

 

var $title;

 

var $description;

 

var $sort_order;

 

var $enabled = false;

 

function hfc_store_logo() {

 

$this->title = MODULE_HEADER_FOOTER_CONTENTS_STORE_LOGO_TITLE;

 

$this->description = MODULE_HEADER_FOOTER_CONTENTS_STORE_LOGO_DESCRIPTION;

 

if ( defined('MODULE_HEADER_FOOTER_CONTENTS_STORE_LOGO_STATUS') ) {

 

$this->sort_order = MODULE_HEADER_FOOTER_CONTENTS_STORE_LOGO_SORT_ORDER;

 

$this->enabled = (MODULE_HEADER_FOOTER_CONTENTS_STORE_LOGO_STATUS == 'True');

 

switch (MODULE_HEADER_FOOTER_CONTENTS_STORE_LOGO_CONTENT_PLACEMENT) {

 

case 'Left Header' : $this->group = 'header_contents_left';

 

break;

 

case 'Center Header' : $this->group = 'header_contents_center';

 

break;

 

case 'Right Header' : $this->group = 'header_contents_right';

 

break;

 

case 'Header Line' : $this->group = 'header_line';

 

break;

 

case 'Left Footer' : $this->group = 'footer_contents_left';

 

break;

 

case 'Center Footer' : $this->group = 'footer_contents_center';

 

break;

 

case 'Right Footer' : $this->group = 'footer_contents_right';

 

break;

 

case 'Footer Line' : $this->group = 'footer_line';

 

break;

}

}

}

 

function execute() {

 

global $oscTemplate;

$data =

' <div id="storeLogo">' . '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a></div>';

$oscTemplate->addBlock($data,

$this->group);

}

 

function isEnabled() {

 

return $this->enabled;

}

 

function check() {

 

return defined('MODULE_HEADER_FOOTER_CONTENTS_STORE_LOGO_STATUS');

}

 

function install() {

tep_db_query(

"insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Currencies Module', 'MODULE_HEADER_FOOTER_CONTENTS_STORE_LOGO_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");

tep_db_query(

"insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_HEADER_FOOTER_CONTENTS_STORE_LOGO_CONTENT_PLACEMENT', 'Header Line', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Header\', \'Center Header\', \'Right Header\', \'Header Line\', \'Left Footer\', \'Center Footer\', \'Right Footer\', \'Footer Line\'), ', now())");

tep_db_query(

"insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_HEADER_FOOTER_CONTENTS_STORE_LOGO_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");

}

 

function remove() {

tep_db_query(

"delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");

}

 

function keys() {

 

return array('MODULE_HEADER_FOOTER_CONTENTS_STORE_LOGO_STATUS', 'MODULE_HEADER_FOOTER_CONTENTS_STORE_LOGO_CONTENT_PLACEMENT', 'MODULE_HEADER_FOOTER_CONTENTS_STORE_LOGO_SORT_ORDER');

}

}

?>

 

Can someone help me?

Edited by apolyshow

One amateur made the Arc, 5.000 pro made the Titanic...

Link to comment
Share on other sites

Now i am having a big space in the header and the empty space between all those things and the header is too much,how can we reduce the space of the header or delete it?

And how can i have only one logo cause now with this module i am having two logo's one from the store and one from the module and i really want to keep the second because the space is much more smaller and the look of the store more beautifull...?

One amateur made the Arc, 5.000 pro made the Titanic...

Link to comment
Share on other sites

To get rid of the duplicate header components, find this code in catalog/includes/header.php:

 

<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 id="headerShortcuts">
<?php
 echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link(FILENAME_SHOPPING_CART)) .
   tep_draw_button(HEADER_TITLE_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) .
   tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'person', tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));
 if (tep_session_is_registered('customer_id')) {
echo tep_draw_button(HEADER_TITLE_LOGOFF, null, tep_href_link(FILENAME_LOGOFF, '', 'SSL'));
 }
?>
 </div>
<script type="text/javascript">
 $("#headerShortcuts").buttonset();
</script>
</div>

and replace it with this:

 

<div id="header">
<?php include_once(DIR_WS_INCLUDES . 'sub_header.php'); ?>
</div>

That's starting with the stock osCommerce header, so modify accordingly if you've already added the code for this Addon. Or just start over with the stock file.

 

Most other modules will work, but you may need to modify them to look good. Any of the box modules will work in the left, center, or right header or footer areas. Just copy the module and language files from the boxes directory to the header_footer_contents directory and install. The modules for the Modular Front Page Addon will work in the header or footer line area. Again, just copy the modules into the header_footer_contents directory and install.

 

Regards

Jim

 

Edit: Apparently I can't type today.

Edited by kymation

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Thank you very much JIm for your help and i understand that you can't type today but when you find a litle time take a look in this. This my code and i can't delete those lines because i havw som other thinks inside. Take a look

 

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2010 osCommerce

 

Released under the GNU General Public License

*/

 

if ($messageStack->size('header') > 0) {

echo '<div class="grid_24">' . $messageStack->output('header') . '</div>';

}

?>

 

<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 id="headerShortcuts">

<?php

echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link(FILENAME_SHOPPING_CART)) .

tep_draw_button(HEADER_TITLE_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) .

tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'person', tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));

 

if (tep_session_is_registered('customer_id')) {

echo tep_draw_button(HEADER_TITLE_LOGOFF, null, tep_href_link(FILENAME_LOGOFF, '', 'SSL'));

}

// give the visitors a message that the website will be down at ... time

if ((WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true') && (DOWN_FOR_MAINTENANCE == 'false')) {

$messageStack->add('header', TEXT_BEFORE_DOWN_FOR_MAINTENANCE . PERIOD_BEFORE_DOWN_FOR_MAINTENANCE, 'warning');

}

// this will let the admin know that the website is DOWN FOR MAINTENANCE to the public

if ((DOWN_FOR_MAINTENANCE == 'true') && (EXCLUDE_ADMIN_IP_FOR_MAINTENANCE == getenv('REMOTE_ADDR'))) {

$messageStack->add('header', TEXT_ADMIN_DOWN_FOR_MAINTENANCE, 'warning');

}

if ($messageStack->size('header') > 0) echo $messageStack->output('header');

?>

</div>

 

<script type="text/javascript">

$("#headerShortcuts").buttonset();

</script>

</div>

<?php include_once(DIR_WS_INCLUDES . 'sub_header.php'); ?>

<div class="grid_24 ui-widget infoBoxContainer">

<div class="ui-widget-header infoBoxHeading"><?php echo ' ' . $breadcrumb->trail(' » '); ?></div>

</div>

 

<?php

if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr class="headerError">

<td class="headerError"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message']))); ?></td>

</tr>

</table>

<?php

}

 

if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr class="headerInfo">

<td class="headerInfo"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['info_message']))); ?></td>

</tr>

</table>

<?php

}

?>

<?php require(DIR_WS_INCLUDES . 'slideshow.php'); ?>

One amateur made the Arc, 5.000 pro made the Titanic...

Link to comment
Share on other sites

Jim I made what you said and the all page became a mesh when i add the store logo from the module. Also i must find a way to get out the shortcut buttons cause i have two of them also like the logo...

One amateur made the Arc, 5.000 pro made the Titanic...

Link to comment
Share on other sites

 

I saw your new file with the 6 addons and i ve updated my installation. Thanks.

 

On the other matter this is what i am trying to do:

 

1) Totally remove the breadcrumb text - --> done

 

2) Place a search box with a small search button on the far right side of the bar ---> done

 

3) Place only the language flags on the far left side ---> not done

 

I am not using your code for the search box, but this one :

 

 

 

Now, my problem is that i cannot keep into the same line the flags and the small search box without doubling the head navigation bar height.

 

Thats why i hoped your addon would had one more placement.

 

How did you arrange this thinks? I am trying one day but i can;t do it...Please help.

One amateur made the Arc, 5.000 pro made the Titanic...

Link to comment
Share on other sites

I am facing a new problem with the simple menu module. I have install all the preconditions but when i am constructing a new button for a new page i can't delete .

Take a look at the photo

 

simplemenu.png

 

http://imageshack.us...simplemenu.png/

 

And now i want to get reed off the bar that sais Top>>Catalog>>...... cause i am having two menus one from the simple menu and this one and i don't know how to delete this bar...

Edited by apolyshow

One amateur made the Arc, 5.000 pro made the Titanic...

Link to comment
Share on other sites

And another one question. After the main that we are putting for the index page wich class do we have to use for the rest pages?

You know i don't know php programming so forgive me...

One amateur made the Arc, 5.000 pro made the Titanic...

Link to comment
Share on other sites

Another one problem

When i am installing the Search module and tells it to find something in my site like a manufacturer it returns an error . This the message

 

1054 - Unknown column 'p2pef.products_extra_fields_value' in 'where clause'

 

select count(distinct p.products_id) as total from products p left join manufacturers m using(manufacturers_id) , products_description pd, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '2' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and ((pd.products_name like '%sanyo%' or p.products_model like '%sanyo%' or m.manufacturers_name like '%sanyo%' or p2pef.products_extra_fields_value like '%sanyo%' or pd.products_description like '%sanyo%') )

 

[TEP STOP]

 

Can you help me?

One amateur made the Arc, 5.000 pro made the Titanic...

Link to comment
Share on other sites

I am facing a new problem with the simple menu module. I have install all the preconditions but when i am constructing a new button for a new page i can't delete .

Take a look at the photo

 

simplemenu.png

 

http://imageshack.us...simplemenu.png/

 

And now i want to get reed off the bar that sais Top>>Catalog>>...... cause i am having two menus one from the simple menu and this one and i don't know how to delete this bar...

 

Hi,

 

i am working next release. The next menu module will be better.

- delete item (done)

- edited CSS menu width, and position fix (done)

- menu cache (done)

- sort order enhance (in progress)

- menu simulator on admin page (in progress)

 

The next version will be easy but need modify core files.

 

Finished banner cycle module for hfc.

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Ok i find it ,there is an error in line 54 where the name must be store_logo and not storeLogo .

So are there any other modules for this add-on?

 

 

Hi,

 

what was the problem with it?

The stylesheet.css id contains "storeLogo"

#storeLogo {
 float: left;
 margin-top: 5px;
}

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Here comes the language bug again: I got the "Cannot redeclare class languages..." error when the htc_languages.php module is installed. I managed to fix it for my installation by changing line 56 of the module file from

 

		  include(DIR_WS_CLASSES . 'language.php');

to

 

		  include_once(DIR_WS_CLASSES . 'language.php');

Past experience tells me that this will work on some installations and not on others. The determining factors are still unknown.

 

Regards

Jim

 

 

Hi Jim,

 

is "include_once" enough for it? The language class declare some place in application_top and language box. I dont find the bug yet but deterministic factor can be "global lng" or running execute process in twice.

 

Regards,

Gergely

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Changing to include_once() fixed it for me, but other people have previously stated that this did not fix the problem for them. I have no idea why it is working sometimes and not others.

 

Yes, the include() in application_top.php should be enough, but it doesn't seem to work, even if you global() the variable. Another puzzle.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Another one problem

When i am installing the Search module and tells it to find something in my site like a manufacturer it returns an error . This the message

 

1054 - Unknown column 'p2pef.products_extra_fields_value' in 'where clause'

 

select count(distinct p.products_id) as total from products p left join manufacturers m using(manufacturers_id) , products_description pd, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '2' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and ((pd.products_name like '%sanyo%' or p.products_model like '%sanyo%' or m.manufacturers_name like '%sanyo%' or p2pef.products_extra_fields_value like '%sanyo%' or pd.products_description like '%sanyo%') )

 

[TEP STOP]

 

 

Can you help me?

 

Any help?

One amateur made the Arc, 5.000 pro made the Titanic...

Link to comment
Share on other sites

 

Any help?

 

There is no products_extra_fields_value field.

Install extra field into your data table and do controll at advanced_search.php.

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

I am facing this kind of problem. Wheni am installing the languages module at the right header and then go to install and another one to the same grid then the second goes to the same line. I want to put it down after and not right next to the first cause at he same line it goes outside of my borders. How can we put the language in the midle or in the right float?

One amateur made the Arc, 5.000 pro made the Titanic...

Link to comment
Share on other sites

I found a small bug with the menu model.

 

If you create a menu elements with dopdown in the end of the menu, just before the "manufactures +".

Then the "Manufactures +" will be doubled and be posted both in the main menu and in the "drop-down" menu.

If you post a menu elemnts wihout dropdown, between the one with the dropdown and the manufaturex +, it works.

Link to comment
Share on other sites

I have added a function to show the main categories in the menu, (as dropdown like manufactures +).

It works, and i can put up installation instructions if any body wants, I just have a problem with multilanguage:

 

This Query is working fine, as you can see I have put cd.language_id='1'

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES  . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id  and cd.language_id='1' order by sort_order, cd.categories_name");

 

But I want a multilangugage function in a query like this.

(with cd.language_id="'.$languages_id.'"

This query isnt working, do anybody know how to get the right language in the query?

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name");

Link to comment
Share on other sites

I found a small bug with the menu model.

 

If you create a menu elements with dopdown in the end of the menu, just before the "manufactures +".

Then the "Manufactures +" will be doubled and be posted both in the main menu and in the "drop-down" menu.

If you post a menu elemnts wihout dropdown, between the one with the dropdown and the manufaturex +, it works.

 

 

Hi mumme,

 

thanks for bug report. I will be improve.

 

regards,

Gergely

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

I have added a function to show the main categories in the menu, (as dropdown like manufactures +).

It works, and i can put up installation instructions if any body wants, I just have a problem with multilanguage:

 

This Query is working fine, as you can see I have put cd.language_id='1'

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES  . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id  and cd.language_id='1' order by sort_order, cd.categories_name");

 

But I want a multilangugage function in a query like this.

(with cd.language_id="'.$languages_id.'"

This query isnt working, do anybody know how to get the right language in the query?

 

$categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id='" . $languages_id ."' order by sort_order, cd.categories_name");

 

 

Look at bm_categories.php

 

Regards,

Gergely

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Hi!

 

This contribution looks great! Thanks, Gergely!

However, I can't find it anywhere to install on my admin screens. I saw someone else posted the same, and I looked again at the same spot, and no module was available for installation.

 

I wonder if I'm missing any of the pre-reqs to run this? I do have the one that is called "contributions". I need that, right?

 

Any other tips?

 

I am working with the latest version from 12/31.

 

Thanks!

Link to comment
Share on other sites

Hi!

 

This contribution looks great! Thanks, Gergely!

However, I can't find it anywhere to install on my admin screens. I saw someone else posted the same, and I looked again at the same spot, and no module was available for installation.

 

I wonder if I'm missing any of the pre-reqs to run this? I do have the one that is called "contributions". I need that, right?

 

Any other tips?

 

I am working with the latest version from 12/31.

 

Thanks!

 

Hi,

 

did you install http://addons.oscommerce.com/info/8186 SCM?

 

Regards,

Gergely

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...