NodsDorf Posted April 5, 2010 Share Posted April 5, 2010 Hi all, I'm looking for information on how to add a new box to the column_left.php is there any documentation available to read? --I've tried just copying the information box and changing it but run into some errors. Additionally since this store uses STS I'll need to also create a variable for STS to recognize the call. Thank you. Link to comment Share on other sites More sharing options...
rpdesign Posted April 5, 2010 Share Posted April 5, 2010 Hopefully this contrib will help. infoBox Admin it allows you to add infoboxes as well as organizing their order. I'm not sure if this add-on works with the STS add-on you mentioned above, but it couldn't hurt to try. Provided you make a backup of your shop of course Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
NodsDorf Posted April 5, 2010 Author Share Posted April 5, 2010 Hopefully this contrib will help. infoBox Admin it allows you to add infoboxes as well as organizing their order. I'm not sure if this add-on works with the STS add-on you mentioned above, but it couldn't hurt to try. Provided you make a backup of your shop of course I think I've used this in the past on another store. What I need to do is just build my own box I don't really care about admin functionality. I seem to think a few years ago I read up on how to do this on oscommerce.com but I can't seem to find it now. Once I get the box made and working I can then tackle the STS integration. Link to comment Share on other sites More sharing options...
NodsDorf Posted April 5, 2010 Author Share Posted April 5, 2010 I'm still having issues. I keep getting this error Parse error: syntax error, unexpected T_NEW in /home/columb22/public_html/catalog/includes/boxes/product_search.php on line 25 I followed the directions on the Oscommerce Info site located here: http://www.oscommerc...g_Area/Boxes/66 My product_search.php is located in the catalog/includes/boxes The code is exactly (Line 25 is new infoBox($info_box_contents); ) <?php /* $Id: information.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <!-- Product Search //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_PRODUCT_SEARCH); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_SEARCH) . '">' . BOX_INFORMATION_PRODUCT_SEARCH . '</a>') new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> I also added the code to the column_left.php that says require(DIR_WS_BOXES . 'product_search.php'); Also declared the filenames, and the english.php info. Any ideas on what I'm missing? Link to comment Share on other sites More sharing options...
rpdesign Posted April 5, 2010 Share Posted April 5, 2010 hmmm seems i made a proper info box and made a contrib on my home computer, but i have to look at my own install to see what i did, but i seem to remember that i took advise from the knowledge base and did you backup your current site? maybe commenting out the new like this // new infobox instead of new on the line 25 and the other new note: i'm just a novice just like you so backup everything!!! Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
rpdesign Posted April 5, 2010 Share Posted April 5, 2010 don't comment out the new here is my catalog.php infobox file <?php /* $Id: catalog.php 1739 2007-12-20 00:52:16Z hpdl $ 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_CATALOG); new infoBoxHeading($info_box_contents, false, false); $info_box_contents = array(); $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_CATALOG) . '">' . tep_image(DIR_WS_IMAGES . 'catalog_ani.gif' , 'Christmas Celebration', SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'); new infoBox($info_box_contents); ?> </td> </tr> <!-- information_eof //--> hope this helps Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
NodsDorf Posted April 5, 2010 Author Share Posted April 5, 2010 don't comment out the new here is my catalog.php infobox file hope this helps Thank you, this is exactly what I have above I think. Something is causing the error when trying to add a new infobox. I know T_STRING errors are usually caused by not using a \ to escape a ' in code, but I'm not familiar with the Unexpected T_New error. Link to comment Share on other sites More sharing options...
NodsDorf Posted April 5, 2010 Author Share Posted April 5, 2010 Thank you, for the info I was also interested in adding a image to this box your code will help me achieve that! Just need to overcome this error. Link to comment Share on other sites More sharing options...
rpdesign Posted April 5, 2010 Share Posted April 5, 2010 hello again try setting the permisions to 644 as most hosting companies will not run scripts with a 777 permisions :'( :lol: if you want to see how my catalog infobox works go to:my website also look into all filename.php files and make sure you added the right define statements there Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
NodsDorf Posted April 5, 2010 Author Share Posted April 5, 2010 Thanks, yes all my files are 644. I did basically what you did just copied the box information.php and added the proper filenames and english names. Something else is in play here I'm just not sure what it is yet. Link to comment Share on other sites More sharing options...
rpdesign Posted April 5, 2010 Share Posted April 5, 2010 i guess i'm a night owl, but take a look at my catalog infobox add- on it might help you. You can find it herecatalog infoboxor below in my signature. Hope this gives you a better idea of where to place your files :lol: By the way doesn't oscommerce come with a search box? Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
rpdesign Posted April 5, 2010 Share Posted April 5, 2010 ok here is a stupid question. :-" How many product_search.php files do you have? And where are they located. You should have one in catalog/includes/yourlanguage/. One in catalog/includes/boxes. And finaly one in catalog. All of them work together to make an infobox along with the filenames.php files and english.php and blah blah blah :lol: Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
NodsDorf Posted April 5, 2010 Author Share Posted April 5, 2010 re-posted below Link to comment Share on other sites More sharing options...
NodsDorf Posted April 5, 2010 Author Share Posted April 5, 2010 I have a custom search on the site I'm working on. Here The Product Search which is currently located in our Information Box needs to be in its own box with the graphic we use in the upper right hand corner of our header. The Product search is a completely different way to find products due to the industry that I'm working with, and the thousands of similar products. Link to comment Share on other sites More sharing options...
rpdesign Posted April 5, 2010 Share Posted April 5, 2010 ok i've found the info page in the knowledge base that you were looking for. Please try this link this might also help you Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
rpdesign Posted April 5, 2010 Share Posted April 5, 2010 ok i'm compleatly impressed with your layout and sight :o mine is just so generic :P Will look at your sight to see what is going on, by the way your search function works fine. Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
rpdesign Posted April 5, 2010 Share Posted April 5, 2010 Have you tried something similar to this // catalog box text in includes/boxes/catalog.php define('BOX_HEADING_CATALOG', 'Request A Free Catalog'); only in your case it should be // product search box text in includes/boxes/product_search.php define ('BOX_HEADING_PRODUCT_SEARCH', 'Your search infobox heading here'); this is located in catalog/includes/languages/english.php I hope this helps. Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
rpdesign Posted April 5, 2010 Share Posted April 5, 2010 ok i can kick myself :lol: i should have looked more closely at your code above. find this line in your catalog/includes/boxes/product_search.php file you uploaded in your previous post. $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_SEARCH) . '">' . BOX_INFORMATION_PRODUCT_SEARCH . '</a>') i'm not sure if your supposed to have the . BOX_INFORMATION_PRODUCT_SEARCH . Try replacing that section with . tep_image(DIR_WS_IMAGES . 'catalog_ani.gif' , 'Christmas Celebration', SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . substituting 'catalog_ani.gif ' with your image for the search and your alt text in place of 'Christmas Celebration' Ok please tell me if this works, with your column_left.php define code best of luck Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
NodsDorf Posted April 6, 2010 Author Share Posted April 6, 2010 Thank you for all your help. I finally got it to work with your suggestions and trial and error. Thank you! Link to comment Share on other sites More sharing options...
rpdesign Posted April 8, 2010 Share Posted April 8, 2010 Thank you for all your help. I finally got it to work with your suggestions and trial and error. Thank you! not a problem. I think the custom search page you created would be a nice add-on Always backup your files! You will be glad you didMy add-ons :SSPP Seperate Shipping Per Product v2.5| SupportGift vouchers for SPPC 4.22 v2.1 | Support |Catalog Infobox v1.0 | Sorry no support for Catalog Infobox |HTML Mail v2.0 | Support |Upcoming Add ons:Addon Manager | Separate Pricing Per Product Qty |Coupon Populate | EZ-PDF Catalog Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.