bkellum Posted February 20, 2008 Share Posted February 20, 2008 I am just providing this information to help those who are beating their head at why their secure pages are coming up unsecure. Hey, nothing wrong with that! :thumbsup: I just caution naming it a bug in osC when it really hasn't been proven to be a global issue. Regarding the fix though...If it works, then use it. :rolleyes: Thanks for the post. Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
Jessie75 Posted February 20, 2008 Share Posted February 20, 2008 Hello guys! First a big hug to everyone for helping out us STS beginners! I have been trying out OSc and STS for some time now. I´ve done ok but have a small question. Is it possible to add more template pages? Let me clarify: I´d like to add a FAQ, About Us etc. But when I do this I loose the content and the stuff in my shopping cart though. So how do I go on with this and how do I name the pages? Thanks everyone! :rolleyes: Quote Link to comment Share on other sites More sharing options...
bkellum Posted February 20, 2008 Share Posted February 20, 2008 Hello guys! First a big hug to everyone for helping out us STS beginners! I have been trying out OSc and STS for some time now. I´ve done ok but have a small question. Is it possible to add more template pages? Let me clarify: I´d like to add a FAQ, About Us etc. But when I do this I loose the content and the stuff in my shopping cart though. So how do I go on with this and how do I name the pages? Thanks everyone! :rolleyes: Jessica,Take a look at my "Add New Pages to STS" contribution listed on the STSv4 Power Pack site (a site dedicated to STS add-ons, link is in my signature below). Use the Dec 18, 2007 version. There is another way to do it but it is a little more complicated. Look up Chapter 3.11 in the STS User Manual for STSv4.5.8. Hope this helped, Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
TracyS Posted February 20, 2008 Share Posted February 20, 2008 Hey Tracy, could be one of two things: 1) a problem with dynamenu footer echo 2) a problem with cpath Solution could be to swith from dynamenu to ul categories contribution also by the same author. And use a little javascript to get the menu's working in IE. again I'm just guessing, hope it helps you. Thanks dimi78 - I will double check my cpath and dynamenu footer. I think I just made an edit recently to the cpath coding - so that may be it :thumbsup: (Now to just remember which file I was in at the time - LOL) :blush: PS - I've got nothing against the ul categories contribution and I have checked it out while working on this rebuild - the problem I have is I'm not quite good enough with PHP yet to re-write the "products in dynamenu too" to work for the ul categories contrib. and my boss likes having the products in the menu ;) Quote ~Tracy Link to comment Share on other sites More sharing options...
CharlieSummers Posted February 21, 2008 Share Posted February 21, 2008 My apologies if this is dealt with elsewhere...I've been searching up a storm, and have managed to answer most of my questions between Google and the documentation, but there are two answers I just can't find. 1) Is there a simple way to get the box title? $headertext is replaced with all of the data including the table and worse for me assigns the infoBoxHeading class, and while PHP code will run in the infobox.php.html file I can't find any way to get to the object itself from within the template. I want to do some manipulation of the title (strtoupper() for starters) and assign it my own class before dropping it on the graphic. I surely missed something, since it seems it should be really simple to grab the title string. (The only infobox I've been able to get exactly the way I want is the Categories, and that because I'm using the UL_Categories add-on, and I manually set up the box header. I suppose I could make a bunch of different infobox templates in the boxes/ directory and set each box up as well, but since I plan on doing the same thing to all of them, it seems...wasteful.) 2) I know I missed a big one here, and feel really stupid asking, but I cannot find the infobox template name for the product list box used on the "standard" front page as the "New Products" box. I've tried infobox.new_products.php.html, infobox_product_listing.php.html, infobox.products.php.html...well, you get the idea, but still it's using infobox.php.html which squashes it up pretty good. ;) If I missed the obvious, please feel free to trout-slap me as necessary. Quote Link to comment Share on other sites More sharing options...
rex64 Posted February 21, 2008 Share Posted February 21, 2008 I am still having trouble with all of these for some reason. See post Post #3497 for my code modification. Even when I changed 'cart contents' to 'shopping cart' it still did not update. I can not find number 2 anywhere: 1. Cart Contents (change to "Shopping Cart") Also one of the settings in my images category is duplicated (I think I ran a SQL script 2 times). But I looked everywhere in my SQL database. Any ideas how to get to this? 2. How can I change the processing time... of this: Your Order Has Been Processed! Your order has been successfully processed! Your products will arrive at their destination within 2-5 working days. 3. Email is not working, even tough I think it used to work. How can I fix this/test this? Is there a way to set options for the SMTP? What about SMTP with a password? What files are involved with sending email? Is there a configure file? I found this if it helps. This is from my provider, and I think it will fix my email problem, but I am not sure where to put it: Subject: How to use CT mail servers with a custom PHP script Article #1067 Input these three lines into your coding to specify the server, port, and from address: ini_set("SMTP","mail.yourdomain.com"); ini_set("smtp_port","25"); ini_set("sendmail_from","validUser@yourDomain.com"); Quote Link to comment Share on other sites More sharing options...
Maccapolo Posted February 21, 2008 Share Posted February 21, 2008 Hey there people, I feel I am learing (at snails pace) the bascis of OSC now but I am still having trouble due to my lack of php knowledge. Anyway my problem at the moment is with installing dynamenu with my fresh install of oscommerce-2.2rc2a, I have also installed STSv4.5.8_1_2 and ran a sql statement to remove coutries thats it. I followed the instructions to install Dynamenu_for_osCommerce_v1 uploaded all new files. I then followed Bill Kellum's How to get Dynamenu to work with STSv4x instructions, when I get to #3 add <?php include(DIR_WS_BOXES . 'dm_categories.php'); ?> to the sts_template.html and <?php echo $GLOBALS['dmfooter']; ?> just before the </body> tag. I get the following error: Fatal error: Call to a member function on a non-object in /home/.../catalog/includes/functions/html_output.php on line 78 Line 78 reads: $sts->image($src); // Take image from template folder if exists. as part of: // START STS v4.4: global $sts; $sts->image($src); // Take image from template folder if exists. // END STS v4.4 Someone suggested commenting that out, this generates the following error Warning: Variable passed to each() is not an array or object in /home/.../catalog/includes/boxes/dm_categories.php on line 255LayersMenu Error: setMenuStructureString: empty string. Halted. Line 255 Reads: // Build data for menu while(list($key,$val) = each($list)){ Does anyone know why I can not install Dynamenu? Marco Quote Link to comment Share on other sites More sharing options...
TracyS Posted February 21, 2008 Share Posted February 21, 2008 My apologies if this is dealt with elsewhere...I've been searching up a storm, and have managed to answer most of my questions between Google and the documentation, but there are two answers I just can't find. 1) Is there a simple way to get the box title? $headertext is replaced with all of the data including the table and worse for me assigns the infoBoxHeading class, and while PHP code will run in the infobox.php.html file I can't find any way to get to the object itself from within the template. I want to do some manipulation of the title (strtoupper() for starters) and assign it my own class before dropping it on the graphic. I surely missed something, since it seems it should be really simple to grab the title string. (The only infobox I've been able to get exactly the way I want is the Categories, and that because I'm using the UL_Categories add-on, and I manually set up the box header. I suppose I could make a bunch of different infobox templates in the boxes/ directory and set each box up as well, but since I plan on doing the same thing to all of them, it seems...wasteful.) 2) I know I missed a big one here, and feel really stupid asking, but I cannot find the infobox template name for the product list box used on the "standard" front page as the "New Products" box. I've tried infobox.new_products.php.html, infobox_product_listing.php.html, infobox.products.php.html...well, you get the idea, but still it's using infobox.php.html which squashes it up pretty good. ;) If I missed the obvious, please feel free to trout-slap me as necessary. I believe the infobox you are looking for on question #2 is the catalog/includes/boxes/whats_new.php - so I'm guessing the name of the file would be infobox.whats_new.php.html On question #1 - I don't know if there is a way to do it across the board or not. The files I would check would be: catalog/includes/classes/boxes.php (if it's possible to change one file to do all of the infoboxes, this would most likely be the file) catalog/includes/boxes/...all of the boxes you would like to change (this is if you need to change them individually) catalog/includes/languages/english.php (this is where you set what text you want for each box heading) Hope that helps you some ;) Quote ~Tracy Link to comment Share on other sites More sharing options...
TracyS Posted February 21, 2008 Share Posted February 21, 2008 Hey there people, I feel I am learing (at snails pace) the bascis of OSC now but I am still having trouble due to my lack of php knowledge. Anyway my problem at the moment is with installing dynamenu with my fresh install of oscommerce-2.2rc2a, I have also installed STSv4.5.8_1_2 and ran a sql statement to remove coutries thats it. I followed the instructions to install Dynamenu_for_osCommerce_v1 uploaded all new files. I then followed Bill Kellum's How to get Dynamenu to work with STSv4x instructions, when I get to #3 add <?php include(DIR_WS_BOXES . 'dm_categories.php'); ?> to the sts_template.html and <?php echo $GLOBALS['dmfooter']; ?> just before the </body> tag. I get the following error: Line 78 reads: $sts->image($src); // Take image from template folder if exists. as part of: Someone suggested commenting that out, this generates the following error Line 255 Reads: Does anyone know why I can not install Dynamenu? Marco Go to one of Bill's posts and click on the Power Pack link in his signature. There is a contribution download there that includes STS and Dynamenu. I would start by downloading this contribution and comparing it (through a tool like winmerge) with your files. I had a similar issue when installing and I can't remember what exactly I did to fix it, but I did use Winmerge with that contribution to find the areas I needed to fix :thumbsup: Quote ~Tracy Link to comment Share on other sites More sharing options...
TracyS Posted February 21, 2008 Share Posted February 21, 2008 What do you mean by "change the processing time" ?? Are you wanting to change the text of the message, or somehow change the actual amount if time it takes your website to process the online order between clicking the button and receiving the "Your order has been processed" message? If you are wanting to change the text of the message, it would be in one of the files in catalog/includes/languages/ folder (either english.php file, or go into the /english/ folder and check the files in there for this line of text) :thumbsup: I am still having trouble with all of these for some reason. See post Post #3497 for my code modification. Even when I changed 'cart contents' to 'shopping cart' it still did not update. I can not find number 2 anywhere: 1. Cart Contents (change to "Shopping Cart") Also one of the settings in my images category is duplicated (I think I ran a SQL script 2 times). But I looked everywhere in my SQL database. Any ideas how to get to this? 2. How can I change the processing time... of this: Your Order Has Been Processed! Your order has been successfully processed! Your products will arrive at their destination within 2-5 working days. 3. Email is not working, even tough I think it used to work. How can I fix this/test this? Is there a way to set options for the SMTP? What about SMTP with a password? What files are involved with sending email? Is there a configure file? I found this if it helps. This is from my provider, and I think it will fix my email problem, but I am not sure where to put it: Subject: How to use CT mail servers with a custom PHP script Article #1067 Input these three lines into your coding to specify the server, port, and from address: ini_set("SMTP","mail.yourdomain.com"); ini_set("smtp_port","25"); ini_set("sendmail_from","validUser@yourDomain.com"); Quote ~Tracy Link to comment Share on other sites More sharing options...
Maccapolo Posted February 21, 2008 Share Posted February 21, 2008 Hi Tracy thanks for the swift reply, the problem I have is I started there. I clicked on the link but the only mention of Dynamenu is down the bottom called: Dynamenu & STSv4 which is Bills explanation of how to get Dynamenu installed with STS, there is no Dynamenu files to compare to, I searched in contributions for dynamenu and installed from there. Can you give me some more info please on the files I should compare? Thanks again Marco Go to one of Bill's posts and click on the Power Pack link in his signature. There is a contribution download there that includes STS and Dynamenu. I would start by downloading this contribution and comparing it (through a tool like winmerge) with your files. I had a similar issue when installing and I can't remember what exactly I did to fix it, but I did use Winmerge with that contribution to find the areas I needed to fix :thumbsup: Quote Link to comment Share on other sites More sharing options...
TracyS Posted February 21, 2008 Share Posted February 21, 2008 Hi Tracy thanks for the swift reply, the problem I have is I started there.I clicked on the link but the only mention of Dynamenu is down the bottom called: Dynamenu & STSv4 which is Bills explanation of how to get Dynamenu installed with STS, there is no Dynamenu files to compare to, I searched in contributions for dynamenu and installed from there. Can you give me some more info please on the files I should compare? Thanks again Marco Go here: http://www.oscommerce.com/community/contributions,4456 Click on and download the STS_MEGA_POWER_PACK_BUNDLE files (both sets) and the megapwrpckfix file. Put the new general.php file (from the fix download) where it goes in the Mega Power Pack Bundle download. Then compare your site's files with the file's in the download :thumbsup: Quote ~Tracy Link to comment Share on other sites More sharing options...
TracyS Posted February 21, 2008 Share Posted February 21, 2008 Thanks dimi78 - I will double check my cpath and dynamenu footer. I think I just made an edit recently to the cpath coding - so that may be it :thumbsup: (Now to just remember which file I was in at the time - LOL) :blush: PS - I've got nothing against the ul categories contribution and I have checked it out while working on this rebuild - the problem I have is I'm not quite good enough with PHP yet to re-write the "products in dynamenu too" to work for the ul categories contrib. and my boss likes having the products in the menu ;) Ok - I found the cpath changes that had been made and removed them, didn't make a difference. It has to be in the way the footer is being called, but I'm totally stumped where to begin here. The category and product pages have the menu footer being output after the closing </html> tag. For some reason the rest of the pages all have the menu footer being output before the opening <html> tag ?? I am just completely confused as to what files I should compare to find the difference. Category pages are displayed on catalog/index.php I believe. Product pages are displayed on catalog/product_info.php (and others in my case as I have Master Products installed). The other pages are all displayed on their own files (ie...shopping cart is shown on shopping_cart.php) - but the home page is doing this too - which is governed by the catalog/index.php page right? So how can the same file be outputting the footer after the closing HTML if it's a category page and before the opening HTML if it's the home page?? :huh: I've got to be missing something, and I feel as though it's something simple and I'm gonna be really embarrassed when I am pointed in the right direction - LOL :blush: Quote ~Tracy Link to comment Share on other sites More sharing options...
TracyS Posted February 21, 2008 Share Posted February 21, 2008 Ok - I found the cpath changes that had been made and removed them, didn't make a difference. It has to be in the way the footer is being called, but I'm totally stumped where to begin here. The category and product pages have the menu footer being output after the closing </html> tag. For some reason the rest of the pages all have the menu footer being output before the opening <html> tag ?? I am just completely confused as to what files I should compare to find the difference. Category pages are displayed on catalog/index.php I believe. Product pages are displayed on catalog/product_info.php (and others in my case as I have Master Products installed). The other pages are all displayed on their own files (ie...shopping cart is shown on shopping_cart.php) - but the home page is doing this too - which is governed by the catalog/index.php page right? So how can the same file be outputting the footer after the closing HTML if it's a category page and before the opening HTML if it's the home page?? :huh: I've got to be missing something, and I feel as though it's something simple and I'm gonna be really embarrassed when I am pointed in the right direction - LOL :blush: Hmm - well, I've found that it does NOT happen on the home page - so it is limited to just all of the other pages in the catalog/ directory - LOL The only thing I've found so far that happens ABOVE the opening HTML is the includes/application_top.php and the $breadcrumb Since the only one of those two items that is not in catalog/index.php is the $breadcrumb - I'm guessing it has something to do with that. So now I'm on a hunt to see what file has the php code that runs the $breadcrumb :thumbsup: (Sorry for taking up space over here, but it seems whenever I post my thoughts on this board I end up finding the answers, either on my own or through the help of others here) :thumbsup: Quote ~Tracy Link to comment Share on other sites More sharing options...
TracyS Posted February 21, 2008 Share Posted February 21, 2008 Hmm - well, I've found that it does NOT happen on the home page - so it is limited to just all of the other pages in the catalog/ directory - LOL The only thing I've found so far that happens ABOVE the opening HTML is the includes/application_top.php and the $breadcrumb Since the only one of those two items that is not in catalog/index.php is the $breadcrumb - I'm guessing it has something to do with that. So now I'm on a hunt to see what file has the php code that runs the $breadcrumb :thumbsup: (Sorry for taking up space over here, but it seems whenever I post my thoughts on this board I end up finding the answers, either on my own or through the help of others here) :thumbsup: Ok - removed the $breadcrumb code from privacy.php and it didn't make any difference - so I will be scouring through application_top.php to see if there is anything in there that might be causing this ;) Quote ~Tracy Link to comment Share on other sites More sharing options...
dimi78 Posted February 21, 2008 Share Posted February 21, 2008 Ok - removed the $breadcrumb code from privacy.php and it didn't make any difference - so I will be scouring through application_top.php to see if there is anything in there that might be causing this ;) Did you do a step by step compare with the install files of dynamenu? Quote Link to comment Share on other sites More sharing options...
CharlieSummers Posted February 21, 2008 Share Posted February 21, 2008 I believe the infobox you are looking for on question #2 is the catalog/includes/boxes/whats_new.php - so I'm guessing the name of the file would be infobox.whats_new.php.html Ooh, that's one I missed...but nope, that's not it. And it isn't catalog.whats_new.php.html, either. So far I've tried: catalog.new_products.php.html catalog.product_listing.php.html (actually for category lists, etc.) catalog.whats_new.php.html infobox.new_products.php.html infobox_product_listing.php.html infobox.products.php.html infobox.whats_new.php.html ...with no joy yet. (It has to be there somewhere, though. I keep adding HTML comments so I can see who's being handled by what, and eventually I have to stumble on the right name...) On question #1 - I don't know if there is a way to do it across the board or not. The files I would check would be:catalog/includes/classes/boxes.php (if it's possible to change one file to do all of the infoboxes, this would most likely be the file) Problem with changing the class is, I can't get to the class directly from the template (.php.html) file. I tried a few "simple" data reads and things get ugly. I am definitely uncomfortable altering tableBox->infoBoxHeaderTemplate without spending a whole lot more time getting comfortable with the STS-altered tableBox class. I would have thought something like this would have been easily-accessable...but then, osCommerce tends to be a pretty wild hybrid of HTML, PHP, and CSS, so I'm not surprised it isn't. Heck, you'd think the raw $content field would be accessable, too, but... catalog/includes/boxes/...all of the boxes you would like to change (this is if you need to change them individually) As I said, I could do that, and may have to, but they would all be copies of themselves except for the replacements of hard-coded titles, and that seems silly since the unaltered title has to be sitting around somewhere. catalog/includes/languages/english.php (this is where you set what text you want for each box heading) Yeah, but there's no way I've been able to discover to find out which one we're doing from within the template file. This is the stickler for me...if I had a simple way to know who was calling, I could deal with answering within conditionals. Appreciate the thoughts...if you think of anything else, please share! Quote Link to comment Share on other sites More sharing options...
TracyS Posted February 21, 2008 Share Posted February 21, 2008 I'm wondering if you aren't looking for the catalog/includes/modules/new_products.php file - which I don't know if that's editable via the infobox method. Bill - is there a way to template that file with STS? On the other item, I dunno. I gave all the ideas I had and I've not had anymore yet - :blush: Ooh, that's one I missed...but nope, that's not it. And it isn't catalog.whats_new.php.html, either. So far I've tried: catalog.new_products.php.html catalog.product_listing.php.html (actually for category lists, etc.) catalog.whats_new.php.html infobox.new_products.php.html infobox_product_listing.php.html infobox.products.php.html infobox.whats_new.php.html ...with no joy yet. (It has to be there somewhere, though. I keep adding HTML comments so I can see who's being handled by what, and eventually I have to stumble on the right name...) Problem with changing the class is, I can't get to the class directly from the template (.php.html) file. I tried a few "simple" data reads and things get ugly. I am definitely uncomfortable altering tableBox->infoBoxHeaderTemplate without spending a whole lot more time getting comfortable with the STS-altered tableBox class. I would have thought something like this would have been easily-accessable...but then, osCommerce tends to be a pretty wild hybrid of HTML, PHP, and CSS, so I'm not surprised it isn't. Heck, you'd think the raw $content field would be accessable, too, but... As I said, I could do that, and may have to, but they would all be copies of themselves except for the replacements of hard-coded titles, and that seems silly since the unaltered title has to be sitting around somewhere. Yeah, but there's no way I've been able to discover to find out which one we're doing from within the template file. This is the stickler for me...if I had a simple way to know who was calling, I could deal with answering within conditionals. Appreciate the thoughts...if you think of anything else, please share! Quote ~Tracy Link to comment Share on other sites More sharing options...
TracyS Posted February 21, 2008 Share Posted February 21, 2008 Did you do a step by step compare with the install files of dynamenu? I'm currently working on a comparison with the STS Mega Power Pack files. I've come across a bit of code that is in the catalog/includes/functions/html_output.php file. This is in the STS Mega Power Pack file //// // The HTML href link wrapper function function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { global $request_type, $session_started, $SID; if (!tep_not_null($page)) { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>'); } if ($connection == 'NONSSL') { $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; } elseif ($connection == 'SSL') { if (ENABLE_SSL == true) { $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG; } else { $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; } } else { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>'); } if (tep_not_null($parameters)) { $link .= $page . '?' . tep_output_string($parameters); $separator = '&'; } else { $link .= $page; $separator = '?'; } while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1); // Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) { if (tep_not_null($SID)) { $_sid = $SID; } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) { if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) { $_sid = tep_session_name() . '=' . tep_session_id(); } } } if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) { while (strstr($link, '&&')) $link = str_replace('&&', '&', $link); $link = str_replace('?', '/', $link); $link = str_replace('&', '/', $link); $link = str_replace('=', '/', $link); $separator = '?'; } if (isset($_sid)) { $link .= $separator . tep_output_string($_sid); // Patch 2.2MS2-051113 added tep_ } return $link; } In my files, (which are edited for Ultimate SEO URL's as well) - I only have this: //// // The HTML href link wrapper function function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { global $seo_urls; if (!is_object($seo_urls)) { if (!class_exists('SEO_URL')) { include_once(DIR_WS_CLASSES . 'seo.class.php'); } global $languages_id; $seo_urls = new SEO_URL($languages_id); } return $seo_urls->href_link($page, $parameters, $connection, $add_session_id); } So I'm currently looking for my Ultimate SEO URL's instructions to see if maybe I removed something extra that I should not have when installing that contrib. Will update shortly with what I find :thumbsup: Quote ~Tracy Link to comment Share on other sites More sharing options...
TracyS Posted February 21, 2008 Share Posted February 21, 2008 I'm currently working on a comparison with the STS Mega Power Pack files. I've come across a bit of code that is in the catalog/includes/functions/html_output.php file. ...... Will update shortly with what I find :thumbsup: Nope - that looks good so I'm off to find other differences ;) Quote ~Tracy Link to comment Share on other sites More sharing options...
CharlieSummers Posted February 21, 2008 Share Posted February 21, 2008 I'm wondering if you aren't looking for the catalog/includes/modules/new_products.php file - which I don't know if that's editable via the infobox method. Bill - is there a way to template that file with STS? There almost has to be...it is automagically taking on the attributes of the general infobox.php.html happily enough (it looks like the sidebar boxes, with a seriously screwed-up graphical header/title), so there must be some way to override the puppy. (I hope?) Quote Link to comment Share on other sites More sharing options...
TracyS Posted February 21, 2008 Share Posted February 21, 2008 There almost has to be...it is automagically taking on the attributes of the general infobox.php.html happily enough (it looks like the sidebar boxes, with a seriously screwed-up graphical header/title), so there must be some way to override the puppy. (I hope?) Is there a way you could either give a link or insert a graphic so we could see exactly what it is you are seeing? That might help to pinpoint which file it is you need to be looking at :thumbsup: Quote ~Tracy Link to comment Share on other sites More sharing options...
bkellum Posted February 21, 2008 Share Posted February 21, 2008 My apologies if this is dealt with elsewhere...I've been searching up a storm, and have managed to answer most of my questions between Google and the documentation, but there are two answers I just can't find. 1) Is there a simple way to get the box title? $headertext is replaced with all of the data including the table and worse for me assigns the infoBoxHeading class, and while PHP code will run in the infobox.php.html file I can't find any way to get to the object itself from within the template. I want to do some manipulation of the title (strtoupper() for starters) and assign it my own class before dropping it on the graphic. I surely missed something, since it seems it should be really simple to grab the title string. (The only infobox I've been able to get exactly the way I want is the Categories, and that because I'm using the UL_Categories add-on, and I manually set up the box header. I suppose I could make a bunch of different infobox templates in the boxes/ directory and set each box up as well, but since I plan on doing the same thing to all of them, it seems...wasteful.) 2) I know I missed a big one here, and feel really stupid asking, but I cannot find the infobox template name for the product list box used on the "standard" front page as the "New Products" box. I've tried infobox.new_products.php.html, infobox_product_listing.php.html, infobox.products.php.html...well, you get the idea, but still it's using infobox.php.html which squashes it up pretty good. ;) If I missed the obvious, please feel free to trout-slap me as necessary. I have been very busy putting in long days so I couldn't keep up with the posts. Charlie: 1) Have you tried editing the class="infoBoxHeading" in your stylesheet and then use the infobox.php.html template to template all the infoboxes with this css class? Then, for any infoboxes that you do not want that class to apply to, just make a new infobox template for that particular infobox and assign whatever style you want to it. This would make the amount of templates you need to make down to a minumum. 2)Some sample Box Template names: infobox_new_products.php.html is the template for the "New Products for Month" box. infobox_product_listing.php.html is the template for the "Product List" box. infobox_whats_new.php.html is the template for the "What's New" box. infobox_information.php.html is the template for the "Information" box. catalog_shopping_cart.php.html is the template for the "Shopping Cart" box. Hope this helped, Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
bkellum Posted February 21, 2008 Share Posted February 21, 2008 Hey there people, I feel I am learing (at snails pace) the bascis of OSC now but I am still having trouble due to my lack of php knowledge. Anyway my problem at the moment is with installing dynamenu with my fresh install of oscommerce-2.2rc2a, I have also installed STSv4.5.8_1_2 and ran a sql statement to remove coutries thats it. I followed the instructions to install Dynamenu_for_osCommerce_v1 uploaded all new files. I then followed Bill Kellum's How to get Dynamenu to work with STSv4x instructions, when I get to #3 add <?php include(DIR_WS_BOXES . 'dm_categories.php'); ?> to the sts_template.html and <?php echo $GLOBALS['dmfooter']; ?> just before the </body> tag. I get the following error: Line 78 reads: $sts->image($src); // Take image from template folder if exists. as part of: Someone suggested commenting that out, this generates the following error Line 255 Reads: Does anyone know why I can not install Dynamenu? Marco Marco, Try the following to make sure Dynamenu works with STS: Install STSv4.5.8 Install Dynamenu and be sure to do the following: Add this line of code in includes/modules/sts_inc/sts_column_left.php: require(DIR_WS_BOXES . 'dm_categories.php'); $sts->restart_capture('dmbox', 'box'); // Get Dynamenu Category box Add the $dmbox tag in your template where you want the menu to appear. Add this line of code in includes/application_bottom.php just before the last ?>: // Output the footer for Dynamenu for osCommerce echo $GLOBALS['dmfooter']; Find this line of code in includes/column_left.php: include(DIR_WS_BOXES . 'categories.php'); Add this just after: include(DIR_WS_BOXES . 'dm_categories.php'); That should get you where you need to go. Hope this helped, Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
CharlieSummers Posted February 21, 2008 Share Posted February 21, 2008 I have been very busy putting in long days so I couldn't keep up with the posts. It's ok; you aren't expected to be 24/7 unpaid tech support. I appreciate the time you put in, so you won't ever be rushed by me. 1) Have you tried editing the class="infoBoxHeading" in your stylesheet and then use the infobox.php.html template to template all the infoboxes with this css class? (*sigh*) That won't work. I'd ask you to trust me, but since I don't have an honest face, let me show you the code I'm using for the header of the Categories box: <table border="0" cellpadding="0" cellspacing="0" style="background: url(images/left_bg.gif)" width="200"> <tr> <td><img src="images/left_left.gif" width="21" height="29" border="0" alt=""></td> <td><img src="images/spacer.gif" width="7" height="1" border="0" alt=""></td> <td width="170"><div class="lb">PRODUCT CATEGORIES</div> <div class="lw">PRODUCT CATEGORIES</div></td> <td><img src="images/left_right.gif" width="6" height="29" border="0" alt=""></td> </tr> </table> As you can see, I am printing the title over the background graphic twice, using two completely different CSS styles - I think it's a cool effect, but that's kinda beside the point. Clearly, altering infoBoxHeading isn't going to do me a lick of good in this situation. (And imagine the yuck factor if I replace "PRODUCT CATEGORIES" above with $headertext, which includes its own table row and cell...been there, have tears.) Besides, even if it looked fine, I want to strtoupper() the string - and again, I know, I know, I can replace the declarations, but it shouldn't be necessary (and would screw up any other templates I might have that would prefer word-case). The question reverts back to, "How can I get the box title?" This shouldn't be this tough...should it? (And before you suggest it, I know I can make a seperate template for all of them and hard-code the box title as I did for the Categories box, or other work-arounds. But they all feel kludgy...I mean, surely the unadulterated title is sitting somewhere in the object...isn't it? We be programmers...let the computer do the work!) 2)Some sample Box Template names:infobox_new_products.php.html is the template for the "New Products for Month" box. THAT'S THE ONE! (Sorry, too much excitement. At least now I can fix that one easily.) Quote Link to comment Share on other sites More sharing options...
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.