Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Addon} Modular Front Page


kymation

Recommended Posts

The animation is hard-coded into the JavaScript. It's certainly possible to change it, but you'll have to figure that out for yourself.

 

Regards

Jim

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

Link to comment
Share on other sites

  • 3 weeks later...

Hello to all here

 

My question is, after installing on the version 2.3.1 and modifying the index.php the add on Frontpage I get always this messages:

 

Warning: include(includes/languages/german/modules/cfg_modules/cfgm_front_page.php) [function.include]: failed to open stream: No such file or directory in /home/apromo/www/admin/includes/classes/cfg_modules.php on line 28

 

Warning: include(includes/languages/german/modules/cfg_modules/cfgm_front_page.php) [function.include]: failed to open stream: No such file or directory in /home/apromo/www/admin/includes/classes/cfg_modules.php on line 28

 

Warning: include() [function.include]: Failed opening 'includes/languages/german/modules/cfg_modules/cfgm_front_page.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/apromo/www/admin/includes/classes/cfg_modules.php on line 28

 

Warning: Cannot modify header information - headers already sent by (output started at /home/apromo/www/admin/includes/classes/cfg_modules.php:28) in /home/apromo/www/admin/includes/functions/general.php on line 34

 

 

Can you explain my what I am doing wrong?

 

Thank you for your help and best regards

 

Marc

Link to comment
Share on other sites

The first error message states that admin/includes/languages/german/modules/cfg_modules/cfgm_front_page.php is missing. Apparently your Admin is set to use German instead of English. You'll need to copy admin/includes/languages/english/modules/cfg_modules/cfgm_front_page.php to admin/includes/languages/german/modules/cfg_modules/cfgm_front_page.php and then translate the defines.

 

Regards

Jim

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

Link to comment
Share on other sites

So, I made what you explained to me. The message error are gone and I can enter to my admin. But what I do not understand is, what I have to translate? What you mean with "the defines"?

 

Thank you for helping

 

Best regards

 

Marc

Link to comment
Share on other sites

after installing the 10 Modules I get the following Error Messages:

Warning: include(/home/apromo/www/includes/languages/german/modules/front_page/banner_rotator.php) [function.include]: failed to open stream: No such file or directory in/home/apromo/www/admin/modules.php on line 128

 

Warning: include() [function.include]: Failed opening '/home/apromo/www/includes/languages/german/modules/front_page/banner_rotator.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/apromo/www/admin/modules.php on line 128

 

Warning: include(/home/apromo/www/includes/languages/german/modules/front_page/categories_images.php) [function.include]: failed to open stream: No such file or directory in /home/apromo/www/admin/modules.php on line 128

 

Warning: include() [function.include]: Failed opening '/home/apromo/www/includes/languages/german/modules/front_page/categories_images.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/apromo/www/admin/modules.php on line 128

 

Warning: include(/home/apromo/www/includes/languages/german/modules/front_page/customer_greeting.php) [function.include]: failed to open stream: No such file or directory in /home/apromo/www/admin/modules.php on line 128

 

Warning: include() [function.include]: Failed opening '/home/apromo/www/includes/languages/german/modules/front_page/customer_greeting.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/apromo/www/admin/modules.php on line 128

 

Warning: include(/home/apromo/www/includes/languages/german/modules/front_page/featured.php) [function.include]: failed to open stream: No such file or directory in/home/apromo/www/admin/modules.php on line 128

 

Warning: include() [function.include]: Failed opening '/home/apromo/www/includes/languages/german/modules/front_page/featured.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/apromo/www/admin/modules.php on line 128

 

Warning: include(/home/apromo/www/includes/languages/german/modules/front_page/heading_title.php) [function.include]: failed to open stream: No such file or directory in/home/apromo/www/admin/modules.php on line 128

 

Warning: include() [function.include]: Failed opening '/home/apromo/www/includes/languages/german/modules/front_page/heading_title.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/apromo/www/admin/modules.php on line 128

 

Warning: include(/home/apromo/www/includes/languages/german/modules/front_page/new_products.php) [function.include]: failed to open stream: No such file or directory in/home/apromo/www/admin/modules.php on line 128

 

Warning: include() [function.include]: Failed opening '/home/apromo/www/includes/languages/german/modules/front_page/new_products.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/apromo/www/admin/modules.php on line 128

 

Warning: include(/home/apromo/www/includes/languages/german/modules/front_page/scroller.php) [function.include]: failed to open stream: No such file or directory in/home/apromo/www/admin/modules.php on line 128

 

Warning: include() [function.include]: Failed opening '/home/apromo/www/includes/languages/german/modules/front_page/scroller.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/apromo/www/admin/modules.php on line 128

 

Warning: include(/home/apromo/www/includes/languages/german/modules/front_page/specials.php) [function.include]: failed to open stream: No such file or directory in/home/apromo/www/admin/modules.php on line 128

 

Warning: include() [function.include]: Failed opening '/home/apromo/www/includes/languages/german/modules/front_page/specials.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/apromo/www/admin/modules.php on line 128

 

Warning: include(/home/apromo/www/includes/languages/german/modules/front_page/text_main.php) [function.include]: failed to open stream: No such file or directory in/home/apromo/www/admin/modules.php on line 128

 

Warning: include() [function.include]: Failed opening '/home/apromo/www/includes/languages/german/modules/front_page/text_main.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/apromo/www/admin/modules.php on line 128

 

Warning: include(/home/apromo/www/includes/languages/german/modules/front_page/upcoming_products.php) [function.include]: failed to open stream: No such file or directory in /home/apromo/www/admin/modules.php on line 128

 

Warning: include() [function.include]: Failed opening '/home/apromo/www/includes/languages/german/modules/front_page/upcoming_products.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/apromo/www/admin/modules.php on line 128

Module Reihenfolge Aktion MODULE_FRONT_PAGE_BANNER_ROTATOR_TITLE 1 icon_info.gif MODULE_FRONT_PAGE_CATEGORIES_IMAGES_TITLE 1 icon_info.gif MODULE_FRONT_PAGE_CUSTOMER_GREETING_TITLE 0 icon_info.gif MODULE_FRONT_PAGE_FEATURED_TITLE 1 icon_info.gif MODULE_FRONT_PAGE_HEADING_TITLE_TITLE 0 icon_info.gif MODULE_FRONT_PAGE_NEW_PRODUCTS_TITLE 0 icon_info.gif MODULE_FRONT_PAGE_SCROLLER_TITLE 1 icon_info.gif MODULE_FRONT_PAGE_SPECIALS_TITLE 1 icon_info.gif MODULE_FRONT_PAGE_TEXT_MAIN_TITLE 1 icon_info.gif MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_TITLE 1 icon_arrow_right.gif Modul Verzeichnis: /home/apromo/www/includes/modules/front_page/

 

Do you have any ideas?

 

Thank you and awaiting

 

Best regards

 

Marc

Link to comment
Share on other sites

Open admin/includes/languages/german/modules/cfg_modules/cfgm_front_page.php in your text/code editor. There's only one define in this one:

 

  define( 'MODULE_CFG_MODULE_FRONT_PAGE_TITLE', 'Front Page' );

 

You need to translate the text Front Page into German. For more on defines see the PHP Manual.

 

Regards

Jim

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

Link to comment
Share on other sites

Your other errors are the same: You need to copy all of the files from catalog/includes/languages/english/modules/front_page/ to catalog/includes/languages/german/modules/front_page/ and translate them. See my previous comment on translation.

 

When you have this done, please contribute the translations back to us so others can benefit from your work.

 

Regards

Jim

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

Link to comment
Share on other sites

So finaly the German translation is made and now the only error message that's appear is on the english and german version:

Notice: Undefined variable: upcoming_prods_content in /home/apromo/www/includes/modules/front_page/upcoming_products.php on line 80

 

What I am doing wrong? And why I can not see the Banner rotator on my side?

 

Thank you and best regards

 

Marc

 

PS: Here the files with german translation

 

banner_rotator.php

categories_images.php

customer_greeting.php

featured.php

heading_title.php

new_products.php

scroller.php

specials.php

text_main.php

upcoming_products.php

Link to comment
Share on other sites

That's a bug. Apparently it only happens when you don't have any upcoming products. To fix it, find this code in catalog/includes/modules/front_page.php:

 

 
   }

    // Add the contents as a module
    $oscTemplate->addBlock($upcoming_prods_content, $this->group);

 

and replace it with this:

 

 
	 // Add the contents as a module
    $oscTemplate->addBlock($upcoming_prods_content, $this->group);

     }

 

Thanks for finding this bug. I'll fix it in the next release.

 

Regarding the Banner Rotator, how many banners do you have set up for the Rotator to use? Is it more than the minimum number set in the module settings?

 

Thanks for the translations. I'll add those to the next release as well.

 

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.

 

But this file front_page.php in catalog/includes/modules/front_page.php i can not find. I made a mistake?

 

I am not sure, but I have only one banner in the admin section (wrong?).

 

 

 

Here is the translation also for portugues:

 

upcoming_products.php

text_main.php

specials.php

scroller.php

new_products.php

heading_title.php

featured.php

customer_greeting.php

categories_images.php

banner_rotator.php

 

In the german translation I made a small mistake ( my home language :devil: )

 

Here the right files:

 

customer_greeting.php

featured.php

 

Best regards and thank you

 

marc

Link to comment
Share on other sites

I tried and still have the same error messages.

By the way, I can see no difference between:

 

 

}

 

// Add the contents as a module

$oscTemplate->addBlock($upcoming_prods_content, $this->group);

 

and

 

----------------------------------------------------------------------------------

// Add the contents as a module

$oscTemplate->addBlock($upcoming_prods_content, $this->group);

 

 

}

-----------------------------------------------------------------------------------

 

So what I am doing wrong?

 

 

 

Best regards

 

Marc

 

Link to comment
Share on other sites

If i do so, then I have this message:

 

Parse error: syntax error, unexpected ';', expecting T_FUNCTION in /home/apromo/www/includes/modules/front_page/upcoming_products.php on line 143

 

 

 

Best regards

 

Marc

Link to comment
Share on other sites

This is my upcoming_products.php:

 

 

<?php

/*

$Id: upcoming_products.php v1.0.4 20120129 Kymation $

Most of the execute() code is from the stock osCommerce Upcoming Products module

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2010 osCommerce

 

Released under the GNU General Public License

*/

 

class upcoming_products {

var $code = 'upcoming_products';

var $group = 'front_page';

var $title;

var $description;

var $sort_order;

var $enabled = false;

 

function upcoming_products() {

$this->title = MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_TITLE;

$this->description = MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_DESCRIPTION;

 

if (defined('MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_STATUS')) {

$this->sort_order = MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_SORT_ORDER;

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

}

}

 

function execute() {

global $oscTemplate, $language, $languages_id, $currencies, $PHP_SELF, $cPath;

 

if ($PHP_SELF == 'index.php' && $cPath == '') {

// Get the module contents to display on the front page

$upcoming_query_raw = "

select

p.products_id,

pd.products_name,

products_date_available as date_expected

from

" . TABLE_PRODUCTS . " p

join " . TABLE_PRODUCTS_DESCRIPTION . " pd

on pd.products_id = p.products_id

where

to_days(products_date_available) >= to_days(now())

and pd.language_id = '" . ( int ) $languages_id . "'

order by

" . MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_FIELD . "

" . MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_SORT . "

limit " . MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_MAX_DISPLAY;

 

$upcoming_query = tep_db_query($upcoming_query_raw);

if (tep_db_num_rows($upcoming_query) > 0) {

$upcoming_prods_content = '<!-- Upcoming Products BOF -->' . PHP_EOL;

 

if( constant( 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_TITLE_' . strtoupper( $language ) ) != '') {

$upcoming_prods_content .= ' <h2>' . constant( 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_TITLE_' . strtoupper( $language ) ) . '</h2>';

}

$upcoming_prods_content .= '<span style="float: right;">' . TABLE_HEADING_DATE_EXPECTED . '</span>' . PHP_EOL;

$upcoming_prods_content .= ' <div class="contentText">' . PHP_EOL;

 

// Start the table to display the product data

$upcoming_prods_content .= ' <table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListTable">' . PHP_EOL;

 

while ($upcoming_products = tep_db_fetch_array( $upcoming_query ) ) {

$upcoming_prods_content .= ' <tr>' . PHP_EOL;

$upcoming_prods_content .= ' <td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $upcoming_products['products_id']) . '">' . $upcoming_products['products_name'] . '</a></td>' . PHP_EOL;

$upcoming_prods_content .= ' <td align="right">' . tep_date_short($upcoming_products['date_expected']) . '</td>' . PHP_EOL;

$upcoming_prods_content .= ' </tr>' . PHP_EOL;

}

// Close the table

$upcoming_prods_content .= ' </table>' . PHP_EOL;

$upcoming_prods_content .= ' </div>' . PHP_EOL;

$upcoming_prods_content .= '<!-- Upcoming Products EOF -->' . PHP_EOL;

 

 

 

// Add the contents as a module

$oscTemplate->addBlock($upcoming_prods_content, $this->group);

 

}

}

 

function isEnabled() {

return $this->enabled;

}

 

function check() {

return defined('MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_STATUS');

}

 

function install() {

include_once( DIR_WS_CLASSES . 'language.php' );

$bm_banner_language_class = new language;

$languages = $bm_banner_language_class->catalog_languages;

 

foreach( $languages as $this_language ) {

$this->languages_array[$this_language['id']] = $this_language['directory'];

}

 

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_FRONT_PAGE_UPCOMING_PRODUCTS_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', 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 ('Enable Upcoming Products', 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_STATUS', 'True', 'Do you want to show the Upcoming Products box on the front page?', '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('Expected Sort Field', 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_FIELD', 'date_expected', 'The column to sort by in the expected products box.', '6', '3', 'tep_cfg_select_option(array(\'products_name\', \'date_expected\'), ', 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 ('Expected Sort Order', 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_SORT', 'desc', 'This is the sort order used in the expected products box.', '6', '4', 'tep_cfg_select_option(array(\'asc\', \'desc\'), ', now())");

tep_db_query( "insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Products Expected', 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_MAX_DISPLAY', '10', 'Maximum number of products expected to display', '6', '5', now())");

 

foreach( $this->languages_array as $language_name ) {

tep_db_query( "insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ( '" . ucwords( $language_name ) . " Title', 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_TITLE_" . strtoupper( $language_name ) . "', 'Title', 'Enter the title that you want on your box in " . $language_name . "', '6', '14', now())" );

}

}

 

function remove() {

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

}

 

function keys() {

include_once( DIR_WS_CLASSES . 'language.php' );

$bm_banner_language_class = new language;

$languages = $bm_banner_language_class->catalog_languages;

 

foreach( $languages as $this_language ) {

$this->languages_array[$this_language['id']] = $this_language['directory'];

}

 

$keys = array ();

 

$keys[] = 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_STATUS';

$keys[] = 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_SORT_ORDER';

$keys[] = 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_FIELD';

$keys[] = 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_SORT';

$keys[] = 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_MAX_DISPLAY';

 

foreach( $this->languages_array as $language_name ) {

$keys[] = 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_TITLE_' . strtoupper( $language_name );

}

 

return $keys;

}

}

 

?>

Link to comment
Share on other sites

Hello?

 

Can you explain me why I get now this error message, after made the change as you told me?

 

Parse error: syntax error, unexpected ';', expecting T_FUNCTION in /home/apromo/www/includes/modules/front_page/upcoming_products.php on line 143

 

Thank you for helping

 

 

Best regards

 

Marc

Link to comment
Share on other sites

Hello Jim

 

I made what you wrote to me:

 

and replace it with this:

 

 

 

// Add the contents as a module

$oscTemplate->addBlock($upcoming_prods_content, $this->group);

 

}

 

 

 

Here is nothing in the top.

 

Anyway I put it back and I still have the error message:

 

 

Notice: Undefined variable: upcoming_prods_content in /home/apromo/www/includes/modules/front_page/upcoming_products.php on line 81

 

 

Here again this file. It would be very kind of you if you could let me know what is wrong.

 

 

Thank you in advance and best regards

 

Marc

---------------------------------------------------------------------------------------------------------------------------------------------

<?php

/*

$Id: upcoming_products.php v1.0.4 20120129 Kymation $

Most of the execute() code is from the stock osCommerce Upcoming Products module

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2010 osCommerce

 

Released under the GNU General Public License

*/

 

class upcoming_products {

var $code = 'upcoming_products';

var $group = 'front_page';

var $title;

var $description;

var $sort_order;

var $enabled = false;

 

function upcoming_products() {

$this->title = MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_TITLE;

$this->description = MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_DESCRIPTION;

 

if (defined('MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_STATUS')) {

$this->sort_order = MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_SORT_ORDER;

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

}

}

 

function execute() {

global $oscTemplate, $language, $languages_id, $currencies, $PHP_SELF, $cPath;

 

if ($PHP_SELF == 'index.php' && $cPath == '') {

// Get the module contents to display on the front page

$upcoming_query_raw = "

select

p.products_id,

pd.products_name,

products_date_available as date_expected

from

" . TABLE_PRODUCTS . " p

join " . TABLE_PRODUCTS_DESCRIPTION . " pd

on pd.products_id = p.products_id

where

to_days(products_date_available) >= to_days(now())

and pd.language_id = '" . ( int ) $languages_id . "'

order by

" . MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_FIELD . "

" . MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_SORT . "

limit " . MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_MAX_DISPLAY;

 

$upcoming_query = tep_db_query($upcoming_query_raw);

if (tep_db_num_rows($upcoming_query) > 0) {

$upcoming_prods_content = '<!-- Upcoming Products BOF -->' . PHP_EOL;

 

if( constant( 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_TITLE_' . strtoupper( $language ) ) != '') {

$upcoming_prods_content .= ' <h2>' . constant( 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_TITLE_' . strtoupper( $language ) ) . '</h2>';

}

$upcoming_prods_content .= '<span style="float: right;">' . TABLE_HEADING_DATE_EXPECTED . '</span>' . PHP_EOL;

$upcoming_prods_content .= ' <div class="contentText">' . PHP_EOL;

 

// Start the table to display the product data

$upcoming_prods_content .= ' <table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListTable">' . PHP_EOL;

 

while ($upcoming_products = tep_db_fetch_array( $upcoming_query ) ) {

$upcoming_prods_content .= ' <tr>' . PHP_EOL;

$upcoming_prods_content .= ' <td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $upcoming_products['products_id']) . '">' . $upcoming_products['products_name'] . '</a></td>' . PHP_EOL;

$upcoming_prods_content .= ' <td align="right">' . tep_date_short($upcoming_products['date_expected']) . '</td>' . PHP_EOL;

$upcoming_prods_content .= ' </tr>' . PHP_EOL;

}

// Close the table

$upcoming_prods_content .= ' </table>' . PHP_EOL;

$upcoming_prods_content .= ' </div>' . PHP_EOL;

$upcoming_prods_content .= '<!-- Upcoming Products EOF -->' . PHP_EOL;

 

}

 

// Add the contents as a module

$oscTemplate->addBlock($upcoming_prods_content, $this->group);

 

}

}

 

function isEnabled() {

return $this->enabled;

}

 

function check() {

return defined('MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_STATUS');

}

 

function install() {

include_once( DIR_WS_CLASSES . 'language.php' );

$bm_banner_language_class = new language;

$languages = $bm_banner_language_class->catalog_languages;

 

foreach( $languages as $this_language ) {

$this->languages_array[$this_language['id']] = $this_language['directory'];

}

 

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_FRONT_PAGE_UPCOMING_PRODUCTS_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', 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 ('Enable Upcoming Products', 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_STATUS', 'True', 'Do you want to show the Upcoming Products box on the front page?', '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('Expected Sort Field', 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_FIELD', 'date_expected', 'The column to sort by in the expected products box.', '6', '3', 'tep_cfg_select_option(array(\'products_name\', \'date_expected\'), ', 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 ('Expected Sort Order', 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_SORT', 'desc', 'This is the sort order used in the expected products box.', '6', '4', 'tep_cfg_select_option(array(\'asc\', \'desc\'), ', now())");

tep_db_query( "insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Products Expected', 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_MAX_DISPLAY', '10', 'Maximum number of products expected to display', '6', '5', now())");

 

foreach( $this->languages_array as $language_name ) {

tep_db_query( "insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ( '" . ucwords( $language_name ) . " Title', 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_TITLE_" . strtoupper( $language_name ) . "', 'Title', 'Enter the title that you want on your box in " . $language_name . "', '6', '14', now())" );

}

}

 

function remove() {

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

}

 

function keys() {

include_once( DIR_WS_CLASSES . 'language.php' );

$bm_banner_language_class = new language;

$languages = $bm_banner_language_class->catalog_languages;

 

foreach( $languages as $this_language ) {

$this->languages_array[$this_language['id']] = $this_language['directory'];

}

 

$keys = array ();

 

$keys[] = 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_STATUS';

$keys[] = 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_SORT_ORDER';

$keys[] = 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_FIELD';

$keys[] = 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_SORT';

$keys[] = 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_MAX_DISPLAY';

 

foreach( $this->languages_array as $language_name ) {

$keys[] = 'MODULE_FRONT_PAGE_UPCOMING_PRODUCTS_TITLE_' . strtoupper( $language_name );

}

 

return $keys;

}

}

 

?>

Edited by cramli
Link to comment
Share on other sites

About the banner, I asked you what I am doing wrong, so I will ask you again:

I have only one banner in the admin section .

 

 

Is this ok?

Best regards and thank you for spending your time

 

Marc

Link to comment
Share on other sites

Here's the modified file. Take a look and see where you went wrong.

 

The banner rotator will display only one banner, although it is designed for two or more. Check your spelling for the Banner Rotator Group in the module settings and the banner group in the Banner Manager settings. They must be identical.

 

Regards

Jim.

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

Link to comment
Share on other sites

Now in the Banner Manager page (admin) I get this Error Message:

 

Warning: imagepng() [function.imagepng]: Unable to open 'images/graphs/banner_infobox-1.png' for writing: Permission denied in /home/apromo/www/admin/includes/classes/phplot.php on line 482

 

What is that?

 

Again thank you for helping me.

 

Best regards

 

Marc

Link to comment
Share on other sites

That means that the images/graphs/ directory needs to have permissions set to be writable. This is a basic osCommerce issue; nothing to do with this Addon.

 

Regards

Jim

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...