tgely Posted October 3, 2011 Posted October 3, 2011 I am ready but need documentation notes. Do you write it? This JS maybe conflict if use other modules the same JS code. Quote 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.
♥kymation Posted October 3, 2011 Author Posted October 3, 2011 I cleaned up the documentation. It didn't need much. I'm not worried about the JavaScript. It can be called with different parameters by another rotator. I haven't tested this, but it should work. If necessary, the other instance could use another copy of the JavaScript in a different folder. Regards Jim Quote See my profile for a list of my addons and ways to get support.
Guest Posted October 11, 2011 Posted October 11, 2011 Hi, Is it possible to add a second banner box? The firs one is running fine. I allready tried copying the bm_banner.php files to bm_cert.php and rename the "banner" strings to "cert", but without luck. Installation via admin works fine, but the shop becomes invisible. What shoud I do to get another banner box? Regards, Gerrit Quote
♥kymation Posted October 11, 2011 Author Posted October 11, 2011 Try the instructions for creating a new box from an existing box. Regards Jim Quote See my profile for a list of my addons and ways to get support.
chromos Posted October 26, 2011 Posted October 26, 2011 hey guys i try to use your addon ..but it's not working ...i mean i upload the files in the right places like it's said in manual ..i go to admin i instal the box ....i set the box to right column i put a order number , title link empty i click save and when i go back ti my store ....the main / index page won't load at all just the site banner and the background nothing else ..when i disable the box ...site load normally ! so what it's wrong ? and yes i upload 1 img size 137 pixels with banner manager but i don't see any link with banner box addon ? Hi guys, any solution found for this problem? I've been struggling for about 5 hours to get a 2nd bannerbox underneath the bm_banner and get the exact same problem as stated above. Everything went ok, i recreated a new bm_bpost.php file from the original bm_banner.php, changed my language files english and dutch, installed the module and whe activated the site just wont load. I've tried 2 different contributions all with the same result, module = true site wont load but gives an error page, module = false and everything works just fine. Help would be much appreciated here. The only difference is that i bought a premium template but I don't think it should matter when adding an extra box. Here's the link to my site, www.fixitantwerp.be The original code: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2011 osCommerce Released under the GNU General Public License */ class bm_banner { var $code = 'bm_banner'; var $group = 'boxes'; var $title; var $description; var $sort_order; var $enabled = false; function bm_banner() { $this->title = MODULE_BOXES_BANNER_COLUMN_TITLE; $this->description = MODULE_BOXES_BANNER_COLUMN_DESCRIPTION; $this->box_title = MODULE_BOXES_BANNER_COLUMN_BOX_TITLE; if ( defined('MODULE_BOXES_BANNER_COLUMN_STATUS') ) { $this->sort_order = MODULE_BOXES_BANNER_COLUMN_SORT_ORDER; $this->enabled = (MODULE_BOXES_BANNER_COLUMN_STATUS == 'True'); $this->group = ((MODULE_BOXES_BANNER_COLUMN_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right'); } } function execute() { global $oscTemplate; $data = ''; $execute = false; if($banner3 = tep_banner_exists('dynamic', 'banner3')){ $data .= '<div class="infoBoxWrapper">'.tep_display_banner('static', $banner3).'</div>'; $execute = true; } if($execute){ $oscTemplate->addBlock($data, $this->group); } } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_BOXES_BANNER_COLUMN_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 Banner Column Module', 'MODULE_BOXES_BANNER_COLUMN_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_BOXES_BANNER_COLUMN_CONTENT_PLACEMENT', 'Left Column', 'The module should be loaded in the footer block only', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', 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_BOXES_BANNER_COLUMN_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_BOXES_BANNER_COLUMN_STATUS', 'MODULE_BOXES_BANNER_COLUMN_CONTENT_PLACEMENT', 'MODULE_BOXES_BANNER_COLUMN_SORT_ORDER'); } } ?> The one I recreated for the 2nd Box: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2011 osCommerce Released under the GNU General Public License */ class bm_bpost { var $code = 'bm_bpost'; var $group = 'boxes'; var $title; var $description; var $sort_order; var $enabled = false; function bm_bpost() { $this->title = MODULE_BOXES_BPOST_COLUMN_TITLE; $this->description = MODULE_BOXES_BPOST_COLUMN_DESCRIPTION; $this->box_title = MODULE_BOXES_BPOST_COLUMN_BOX_TITLE; if ( defined('MODULE_BOXES_BPOST_COLUMN_STATUS') ) { $this->sort_order = MODULE_BOXES_BPOST_COLUMN_SORT_ORDER; $this->enabled = (MODULE_BOXES_BPOST_COLUMN_STATUS == 'True'); $this->group = ((MODULE_BOXES_BPOST_COLUMN_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right'); } } function execute() { global $oscTemplate; $data = ''; $execute = false; if($bpost = tep_BPOST_exists('dynamic', 'bpost')){ $data .= '<div class="infoBoxWrapper">'.tep_display_BPOST('static', $bpost).'</div>'; $execute = true; } if($execute){ $oscTemplate->addBlock($data, $this->group); } } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_BOXES_BPOST_COLUMN_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 BPOST Column Module', 'MODULE_BOXES_BPOST_COLUMN_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_BOXES_BPOST_COLUMN_CONTENT_PLACEMENT', 'Left Column', 'The module should be loaded in the footer block only', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', 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_BOXES_BPOST_COLUMN_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_BOXES_BPOST_COLUMN_STATUS', 'MODULE_BOXES_BPOST_COLUMN_CONTENT_PLACEMENT', 'MODULE_BOXES_BPOST_COLUMN_SORT_ORDER'); } } ?> Thanks in advance, Erwin Quote
♥kymation Posted October 26, 2011 Author Posted October 26, 2011 tep_BPOST_exists should be tep_banner_exists. Replace All works better if you select Case Sensitive. Regards Jim Quote See my profile for a list of my addons and ways to get support.
chromos Posted October 26, 2011 Posted October 26, 2011 Jim, you're my hero. ;-) Works fine now... Regrads, Erwin Quote
♥kymation Posted October 30, 2011 Author Posted October 30, 2011 I've uploaded the new box code with the rotator option to the Addons area. All of the credit goes to Gergely for adding the rotator code, and for fixing the insidious language bug. Instructions are provided if you need to upgrade from the previous version. Regards Jim Quote See my profile for a list of my addons and ways to get support.
RCHobbyAddict Posted October 31, 2011 Posted October 31, 2011 Installed as per your instructions - ERROR Fatal error: Cannot redeclare class language in /home/content/g/e/o/georgefasal/html/FASAL/business/includes/classes/language.php on line 16 Hello, This error occurs when you already have a class with this name declared in anywhere else on your website. Any other addon using the same class name. You can try replicating this error by just writing the whole class part in the same file itself. Quote
colageneral Posted November 4, 2011 Posted November 4, 2011 Hi Guys Can anyone help... I installed the banner box, everything works fine when I set ROTATE BANNERS to FALSE... however, when I set it to TRUE no banners show up in the box (the box remains empty)... What am i doing wrong??? Quote
♥kymation Posted November 4, 2011 Author Posted November 4, 2011 You're not; the box is broken. I need to figure out how to fix this bug. Back here when I get it tamed.... Regards Jim Quote See my profile for a list of my addons and ways to get support.
colageneral Posted November 4, 2011 Posted November 4, 2011 You're not; the box is broken. I need to figure out how to fix this bug. Back here when I get it tamed.... Regards Jim Thanks Jim... Quote
tgely Posted November 4, 2011 Posted November 4, 2011 You're not; the box is broken. I need to figure out how to fix this bug. Back here when I get it tamed.... Regards Jim Hi Jim, why dont you use my edited box? :-) (look at my previous posts. There is a link) Quote 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.
♥kymation Posted November 4, 2011 Author Posted November 4, 2011 I did. Your version also has a problem when used with Theme Switcher. I'm still looking for a good solution. Regards Jim Quote See my profile for a list of my addons and ways to get support.
Guest Posted November 29, 2011 Posted November 29, 2011 Hello Jim, Thank you for you work. I have a question. I installed it to a web shop with only one language and works great. I tried to install it in another web shop with 2 languages. It works for english but for the second language it says the following on top : Warning: constant() [function.constant]: Couldn't find constant MODULE_BOXES_BANNER_TITLE_SWEDISH in /home/.../public_html/catalog/includes/modules/boxes/bm_banner.php on line 42 Can you please help? Of course I added the bm_banner.php in catalog/includes/languages/swedish/modules/boxes/ Best Regards and Thank you in advance for your time. Stefanos Quote
♥kymation Posted November 29, 2011 Author Posted November 29, 2011 This is probably caused by the way your language is installed. Try replacing this code in catalog/includes/modules/boxes/bm_banner.php (two places): $this->languages_array[$this_language['id']] = $this_language['name']; with this: $this->languages_array[$this_language['id']] = $this_language['directory']; Regards Jim Quote See my profile for a list of my addons and ways to get support.
Guest Posted November 30, 2011 Posted November 30, 2011 Jim, made the changes as adviced but still the same Warning: constant() [function.constant]: Couldn't find constant MODULE_BOXES_BANNER_TITLE_SWEDISH in /home/.../public_html/catalog/includes/modules/boxes/bm_banner.php on line 42 Quote
♥kymation Posted November 30, 2011 Author Posted November 30, 2011 Did you uninstall and reinstall the module? Regards JIm Quote See my profile for a list of my addons and ways to get support.
Guest Posted November 30, 2011 Posted November 30, 2011 Oh I forgot. Did it and works like a charm. Thank you for your help. Best Regards, Stefanos Quote
Excaliber1976 Posted January 8, 2012 Posted January 8, 2012 Hi there, I installed everything as written in the manual. I get this error when i set an banner rotation: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MAX_DISPLAY_BANNER_ROTATOR' at line 16 select banners_id, banners_url, banners_image, banners_html_text, status from banners where banners_group = 'box_module' and language_id = '4' and status = 1 order by BANNER_ORDER limit MAX_DISPLAY_BANNER_ROTATOR [TEP STOP] Can you help/advise me pls. Thanx, Excaliber Quote
♥kymation Posted January 8, 2012 Author Posted January 8, 2012 That code doesn't exist in the banner box. Are you certain you've installed this addon? Regards Jim Quote See my profile for a list of my addons and ways to get support.
Guest Posted January 19, 2012 Posted January 19, 2012 Hi! I installed this successfully. The title link was working to link to an outside page. All of a sudden, I hear it's not working anymore, as it's trying to go to catalog/http... <outside page> Any idea why this could be? Thanks! Quote
♥kymation Posted January 19, 2012 Author Posted January 19, 2012 If it was working before, it's something that you changed. Have you made changes to your configure.php? Have you moved to a different server? Regards Jim Quote See my profile for a list of my addons and ways to get support.
Guest Posted January 19, 2012 Posted January 19, 2012 I have neither changed configure or moved the site. :wacko: The only that could have affected it was on the CSS file (I know it wasn't likely), but I reverted that. I want it to go to outsidepage.com but it goes to mypage.com/catalog/outsidepage.com (mypage.com/catalog is my page.) I am fine not having that title, esp since I'll make it into a banner, but *when you have time*, if you have another idea of why this could be happening, let me know. I like to be in control of my site and I need to figure out why something would stop working. THANKS! Quote
♥kymation Posted January 19, 2012 Author Posted January 19, 2012 The title link works only for internal links. You would need to modify the code to make it work for external links. Regards Jim Quote See my profile for a list of my addons and ways to get support.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.