dculley Posted May 9, 2015 Share Posted May 9, 2015 I need to add my SSL Seal to the BS site. How do you add it when there is no column left or right PHP file in includes folder? In the past I add the script code under the last ?>. Dean Link to comment Share on other sites More sharing options...
Hotclutch Posted May 9, 2015 Share Posted May 9, 2015 One option would be to create a box and place your seal HTML in there, then activate the box from Admin like all the other left / right column boxes. The simplest box to work off from would probably be bm_card_acceptance.php. in catalog/includes/modules/boxes/ and card_acceptance.php in catalog/includes/modules/boxes/templates Link to comment Share on other sites More sharing options...
dculley Posted May 10, 2015 Author Share Posted May 10, 2015 @@Hotclutch Hi Ashley Thanks for reaching out. I'm not a programer but I don't mind trying. At least it has stopped giving me errors. But it is not installing. I have been at this for hours. I'm hopping that someone or you can help me fix the code. I would like the scrip at the bottom to be in the code and not after ?> But I do not know enough on how to get it there. I've tried so many things. Here is my scrip. Any help will be greatly appreciated. <?php/* $Id$ osCommerce, Open Source E-Commerce Solutions } ob_start(); include(DIR_WS_MODULES . 'boxes/templates/ssl_seal.php'); $data = ob_get_clean(); $oscTemplate->addBlock($data, $this->group); } } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_BOXES_SSL_SEAL_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 SSL SEAL Module', 'MODULE_BOXES_SSL_SEAL_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_SSL_SEAL_CONTENT_PLACEMENT', 'Right Column', 'Should the module be loaded in the left or right column?', '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_SSL_SEAL_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_SSL_SEAL_STATUS', 'MODULE_BOXES_SSL_SEAL_CONTENT_PLACEMENT', 'MODULE_BOXES_SSL_SEAL_SORT_ORDER'); } }?><span id="siteseal"><script type="text/javascript" src="https://seal.godaddy.com/getSeal?sealID=OByEiWcv4tBnMNVaZjSd8xw7ViG18Ut1pYoyMqoZz7plOT4Ntbn4oBiA1mAB''>https://seal.godaddy.com/getSeal?sealID=OByEiWcv4tBnMNVaZjSd8xw7ViG18Ut1pYoyMqoZz7plOT4Ntbn4oBiA1mAB'>https://seal.godaddy.com/getSeal?sealID=OByEiWcv4tBnMNVaZjSd8xw7ViG18Ut1pYoyMqoZz7plOT4Ntbn4oBiA1mAB"></script></span> Thanks for any help Dean Link to comment Share on other sites More sharing options...
♥kymation Posted May 10, 2015 Share Posted May 10, 2015 Is the part after the ?> part of that file? If it is, get rid of that last line. When pasting code here, use the code tag: click on the <> in the toolbar on top of this box. Then we can tell what's part of your code without asking. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Hotclutch Posted May 10, 2015 Share Posted May 10, 2015 I tested this code for a box on my test store. You only need to change the image to reflect your seal. Your host or the seal company should be able to help with the HTML for that. catalog\includes\modules\boxes\bm_site_seal.php <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ class bm_site_seal { var $code = 'bm_site_seal'; var $group = 'boxes'; var $title; var $description; var $sort_order; var $enabled = false; function bm_site_seal() { $this->title = MODULE_BOXES_SITE_SEAL_TITLE; $this->description = MODULE_BOXES_SITE_SEAL_DESCRIPTION; if ( defined('MODULE_BOXES_SITE_SEAL_STATUS') ) { $this->sort_order = MODULE_BOXES_SITE_SEAL_SORT_ORDER; $this->enabled = (MODULE_BOXES_SITE_SEAL_STATUS == 'True'); $this->group = ((MODULE_BOXES_SITE_SEAL_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right'); } } function execute() { global $oscTemplate; ob_start(); include(DIR_WS_MODULES . 'boxes/templates/site_seal.php'); $data = ob_get_clean(); $oscTemplate->addBlock($data, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_BOXES_SITE_SEAL_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 Site Seal Module', 'MODULE_BOXES_SITE_SEAL_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_SITE_SEAL_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '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_SITE_SEAL_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_SITE_SEAL_STATUS', 'MODULE_BOXES_SITE_SEAL_CONTENT_PLACEMENT', 'MODULE_BOXES_SITE_SEAL_SORT_ORDER'); } } catalog\includes\modules\boxes\templates\site_seal.php <div class="panel panel-default"> <div class="panel-heading"><?php echo MODULE_BOXES_SITE_SEAL_BOX_TITLE; ?></div> <div class="panel-body"> <img src="/images/card_acceptance/american_express.png" alt="American Express" width="65" height="40" /> </div> </div> catalog\includes\languages\english\modules\boxes\bm_site_seal.php <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ define('MODULE_BOXES_SITE_SEAL_BOX_TITLE', 'Site Seal'); define('MODULE_BOXES_SITE_SEAL_DESCRIPTION', 'Show site seal'); ?> Link to comment Share on other sites More sharing options...
Hotclutch Posted May 10, 2015 Share Posted May 10, 2015 Add this to the definition file: define('MODULE_BOXES_SITE_SEAL_TITLE', 'Site Seal'); Link to comment Share on other sites More sharing options...
dculley Posted May 10, 2015 Author Share Posted May 10, 2015 @@kymation@@Hotclutch Jim & Ashley Thank you both for reaching out. Jim I have wondered for a long time how to inter code in this filed. I will remember the <>. Ashley, Thank you for the files on site seal. I will see if I can get my seal to work with it. You could till I knew nothing about the code but tried to make it work. Thanks again, Dean Link to comment Share on other sites More sharing options...
burt Posted May 10, 2015 Share Posted May 10, 2015 The simplest option... Add this to the bottom of the TEMPLATE file of whichever box you think it should go underneath.. <span id="siteseal"><script type="text/javascript" src="https://seal.godaddy.../script></span> Link to comment Share on other sites More sharing options...
♥kymation Posted May 10, 2015 Share Posted May 10, 2015 @@burt That's a horrible hack. What happens when the shopowner rearranges the boxes a year from now, after they've forgotten about your hack? @@dculley Don't use this hack. Ever. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
burt Posted May 10, 2015 Share Posted May 10, 2015 Poster wanted easy, he got easy. Too many people on here try to make things complicated.. Let's give shop owners a little bit of credit, and not dumb them down completely. Link to comment Share on other sites More sharing options...
♥kymation Posted May 10, 2015 Share Posted May 10, 2015 I've seen too many "easy" fixes that ended up causing hours of headaches later. Sorry, personal peeve of mine. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
burt Posted May 10, 2015 Share Posted May 10, 2015 Trying to reply on a kindle fire is twisting my melons </aside> Why not hard-code the script call as a hook, it is precisely what the hook system is designed for. This would give the simplicity of my solution with the hand holding that you believe shop owners need.. perfect! Link to comment Share on other sites More sharing options...
dculley Posted May 10, 2015 Author Share Posted May 10, 2015 @@Hotclutch @@kymation Ashley. Your code worked. :) As if you had doubts. All I had to do is replace the line in catalog\includes\modules\boxes\templates\site_seal.php that you had for American Express to the one I needed. Thank you so much. I would have spent many hours and not got it right. Jim. Thank you too. As always a big help to us non programers. Best regards, Dean Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.