K0rd3rbackStyl3 Posted August 4, 2006 Posted August 4, 2006 I wanted to add two new info boxes displaying pictures. 1 of them is a paypal verified box with the logo and another thats a ssl encrypted box with logo (will upload to ssl later) I made a file called paypalv.php: <?php <?php /* $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <!-- information //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_PAYPALV); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => tep_image(DIR_WS_IMAGES . paypalv.jpg') ); // new infoBox($info_box_contents); ?> then I added this in the includes/languages/english.php define('BOX_HEADING_PAYPALV', 'Paypal Verified'); now when I get to catalog/includes/column_left.php This is what the file looks like: <?php /* $Id: column_left.php,v 1.1.1.1 2004/03/04 23:40:37 ccwjr Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ $column_query = tep_db_query('select display_in_column as cfgcol, infobox_file_name as cfgtitle, infobox_display as cfgvalue, infobox_define as cfgkey, box_heading, box_template, box_heading_font_color from ' . TABLE_INFOBOX_CONFIGURATION . ' where template_id = ' . TEMPLATE_ID . ' and infobox_display = "yes" and display_in_column = "left" order by location'); while ($column = tep_db_fetch_array($column_query)) { if ( file_exists(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/boxes/' . $column['cfgtitle'])) { define($column['cfgkey'],$column['box_heading']); $infobox_define = $column['box_heading']; $infobox_template = $column['box_template']; $font_color = $column['box_heading_font_color']; $infobox_class = $column['box_template']; //cache control side box detect if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'categories4.php') ) { echo tep_cache_categories_box4(); } else if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'manufacturers.php') ) { echo tep_cache_manufacturers_box(); } else { require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/boxes/' . $column['cfgtitle']); } // end cache control code }else{ define($column['cfgkey'],$column['box_heading']); $infobox_define = $column['box_heading']; $infobox_template = $column['box_template']; $font_color = $column['box_heading_font_color']; $infobox_class = $column['box_template']; require(DIR_WS_BOXES . $column['cfgtitle']); } } ?> where should I put require(DIR_WS_BOXES . paypalv.php'); I'm using a template by the way.. Thanks for any help you can provide.
matrix2223 Posted August 4, 2006 Posted August 4, 2006 basically you can add it where you want at the bottom in the middle just look at the code and make sure you aint cuttin something off. Make sure you add the new filenames in the includes/filenames.php O forgot to tell you, dont use require use include. Require tell the code that it has to be there and include means it doesnt have to be there. You also may have to put an else if statement in there as well for the nonsecure items issue with ssl.
K0rd3rbackStyl3 Posted August 4, 2006 Author Posted August 4, 2006 you know.. i just realized when i opened filenames.php that I dont know what i exactly have to put... define(FILENAME...?
matrix2223 Posted August 4, 2006 Posted August 4, 2006 define('FILENAME_PAYPALV', 'paypalv.php'); you can add this at the bottom so its easy to find later
K0rd3rbackStyl3 Posted August 4, 2006 Author Posted August 4, 2006 It doesnt load my page correctly... :( it stops at the header and doesnt load anything else this is what i have for column_left_php <?php /* $Id: column_left.php,v 1.1.1.1 2004/03/04 23:40:37 ccwjr Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ $column_query = tep_db_query('select display_in_column as cfgcol, infobox_file_name as cfgtitle, infobox_display as cfgvalue, infobox_define as cfgkey, box_heading, box_template, box_heading_font_color from ' . TABLE_INFOBOX_CONFIGURATION . ' where template_id = ' . TEMPLATE_ID . ' and infobox_display = "yes" and display_in_column = "left" order by location'); while ($column = tep_db_fetch_array($column_query)) { if ( file_exists(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/boxes/' . $column['cfgtitle'])) { define($column['cfgkey'],$column['box_heading']); $infobox_define = $column['box_heading']; $infobox_template = $column['box_template']; $font_color = $column['box_heading_font_color']; $infobox_class = $column['box_template']; //cache control side box detect if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'categories4.php') ) { echo tep_cache_categories_box4(); } else if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'manufacturers.php') ) { echo tep_cache_manufacturers_box(); } else { require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/boxes/' . $column['cfgtitle']); } // end cache control code }else{ define($column['cfgkey'],$column['box_heading']); $infobox_define = $column['box_heading']; $infobox_template = $column['box_template']; $font_color = $column['box_heading_font_color']; $infobox_class = $column['box_template']; require(DIR_WS_BOXES . $column['cfgtitle']); } } require(DIR_WS_BOXES . paypalv.php'); ?>
matrix2223 Posted August 4, 2006 Posted August 4, 2006 try this $infobox_class = $column['box_template']; require(DIR_WS_BOXES . $column['cfgtitle']); require(DIR_WS_BOXES . paypalv.php'); } } ?>
K0rd3rbackStyl3 Posted August 4, 2006 Author Posted August 4, 2006 nope.. no go still only loads header.. heres what the column_left.php looks like: <?php /* $Id: column_left.php,v 1.1.1.1 2004/03/04 23:40:37 ccwjr Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ $column_query = tep_db_query('select display_in_column as cfgcol, infobox_file_name as cfgtitle, infobox_display as cfgvalue, infobox_define as cfgkey, box_heading, box_template, box_heading_font_color from ' . TABLE_INFOBOX_CONFIGURATION . ' where template_id = ' . TEMPLATE_ID . ' and infobox_display = "yes" and display_in_column = "left" order by location'); while ($column = tep_db_fetch_array($column_query)) { if ( file_exists(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/boxes/' . $column['cfgtitle'])) { define($column['cfgkey'],$column['box_heading']); $infobox_define = $column['box_heading']; $infobox_template = $column['box_template']; $font_color = $column['box_heading_font_color']; $infobox_class = $column['box_template']; //cache control side box detect if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'categories4.php') ) { echo tep_cache_categories_box4(); } else if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'manufacturers.php') ) { echo tep_cache_manufacturers_box(); } else { require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/boxes/' . $column['cfgtitle']); } // end cache control code }else{ define($column['cfgkey'],$column['box_heading']); $infobox_define = $column['box_heading']; $infobox_template = $column['box_template']; $font_color = $column['box_heading_font_color']; $infobox_class = $column['box_template']; require(DIR_WS_BOXES . $column['cfgtitle']); $infobox_class = $column['box_template']; require(DIR_WS_BOXES . $column['cfgtitle']); require(DIR_WS_BOXES . paypalv.php'); } } ?> ?>
matrix2223 Posted August 4, 2006 Posted August 4, 2006 what template files do you have for the column left it may be a html file
K0rd3rbackStyl3 Posted August 4, 2006 Author Posted August 4, 2006 you know what i did notice though was... if i didnt edit the columns_left.php at all and i added it using the infobox admin, it comes up.. but doesnt match the template layout.. take a look www.planet-animation.com/catalog/
K0rd3rbackStyl3 Posted August 4, 2006 Author Posted August 4, 2006 i have boxes.tpl.php extra_html_output.php footer.php header.php main_page.tpl.php stylesheet.css then 3 directories mainpage_modules images boxes all all their usual files
matrix2223 Posted August 4, 2006 Posted August 4, 2006 Ok look in your boxes.tpl.php, main_page.tpl.php, mainpage_modules, and boxes. Look for any other boxes that is in the left column and just copy the process for the new box and then you should have the new one show.
K0rd3rbackStyl3 Posted August 4, 2006 Author Posted August 4, 2006 all of them are specific toward their own purpose, and with my lack of php knowledge i wouldnt know what to edit, but there sure is a lot of script.... did you happen to see my other post, 3 back... if i dont add anything to column left and add it using infobox admin it appears just not along with the template www.planet-animation.com/catalog/
K0rd3rbackStyl3 Posted August 4, 2006 Author Posted August 4, 2006 ok i think i almost got it.. i didnt edit column_left.php BUT i did copy another simple module and all i have to do is figure out where to direct my pictures..
matrix2223 Posted August 4, 2006 Posted August 4, 2006 Kool when you are completed ensure that your ssl works and that you dont get the "U have secure and unsecure items"
K0rd3rbackStyl3 Posted August 4, 2006 Author Posted August 4, 2006 well i didn't install in the ssl directory. I didnt buy it until after the install, do you know how i could transfer everything in the ssl directoy after im done with everything without causing any conflicts, i doubt just dumping the whole catalog in the ssl folder will work. Thanks for your help! :)
K0rd3rbackStyl3 Posted August 4, 2006 Author Posted August 4, 2006 Ok i took my script from a box that had a picture of paypal and credit cards (a 'we accept..' info box) heres the script edited with the picture i want paypalv.JPG <?php /* Card Infobox, v 1.0 2002/12/04 by Kevin Park osCommerce http://www.oscommerce.com/ Copyright (c) 2000,2001 osCommerce Released under the GNU General Public License http://www.movion.com go to any packages and see custom shop demo ------------------------------------------------------------------------------------------------------- If you find my work usefull you can send me some money ... https://www.paypal.com/xclick/business=elari%40free.fr&item_name=elari&no_note=1&tax=0¤cy_code=EUR If you need a custom install for Oscommerce, contact me.... ------------------------------------------------------------------------------------------------------- */ ?> <!-- Card Info Box //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => '<font color="' . $font_color . '">' . BOX_HEADING_PAYPALV . '</font>' ); new SideinfoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', // 'text' => tep_image(DIR_WS_IMAGES . '/cards/cards.gif') . //elari chanegd to provide a link to your payment acount 'text' => tep_image(DIR_WS_IMAGES . 'cards/paypalv.JPG' , BOX_INFORMATION_CARD . MODULE_PAYMENT_PAYPAL_ID). '<br>' . tep_image(DIR_WS_IMAGES . 'cards/cards2.gif', BOX_INFORMATION_CARD . MODULE_PAYMENT_PAYPAL_ID) . '</a><br>' ); new SideinfoBox($info_box_contents); ?> </td> <tr> <th scope="row"><img src="templates/5324/images/infoBox_foot.jpg" width="158" height="27"></th> </tr> <!-- card_eof //--> However I can't stinkin get that card2.gif out by somehow ruining the php file and preventing my webpage from loading once it loads to this info box (wont load pass paypal verified infobox). Can you show me what the code should look like, i think i'm deleting and interrupting other codes. Thanks again! :)
matrix2223 Posted August 4, 2006 Posted August 4, 2006 try this $info_box_contents = array(); $info_box_contents[] = array('align' => 'center', 'text' => '<P><IMG HEIGHT=120 WIDTH=115 img src =" images/card2.gif"></P> <br> <a href="https://www.paypal.com/us/verified/pal=XXXXXXXXXXX%2ecom" target="_blank"><img src="images/verification_seal.gif" border="0" alt="Official PayPal Seal"></A><br><b>Don\'t have a PayPal Account<br><a href="http://www.paypal.com" target="blank"><font color="blue">Click Here </font></a><br>To get a Free PayPal Account.'); new infoBox($info_box_contents); the XXXX's is the email address for the javascript to go to the verification page of paypal if you look under my profile you will see this in the column right on my site
K0rd3rbackStyl3 Posted August 4, 2006 Author Posted August 4, 2006 thanks! I got it working.. YAY!! i really appreciate your help... 2 more things if i can..? 1. how can i marquee my bestsellers box like www.greatlakesanime.com (right side) not sure of the html code, where to put it, and how to include images.. 2. how can i change the color of the boxes in the middle, for example, www.planet-animation.com if you click on account at the top, it comes up with 3 boxes in the middle which have red shades that are kind of bright.. i know its in the stylesheet.css but not sure what its under.. thanks again!! :)
K0rd3rbackStyl3 Posted August 4, 2006 Author Posted August 4, 2006 nvm i figured out number two... anyone got info on 1?
Guest Posted August 4, 2006 Posted August 4, 2006 nvm i figured out number two... anyone got info on 1? http://www.oscommerce.com/community/contributions,2881
Recommended Posts
Archived
This topic is now archived and is closed to further replies.