Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.


  • Content count

  • Joined

  • Last visited

  1. randomone

    [Contribution] STS v4

    Thanks for the links. I checked just to see if those were causing the problems, but it doesn't appear to be the case. Bottom of the application_top.php // START STS 4.5.8 require (DIR_WS_CLASSES.'sts.php'); $sts= new sts(); $sts->start_capture(); // END STS 4.5.8 // initialize the message stack for output messages require(DIR_WS_CLASSES . 'message_stack.php'); $messageStack = new messageStack; // set which precautions should be checked define('WARN_INSTALL_EXISTENCE', 'true'); define('WARN_CONFIG_WRITEABLE', 'true'); define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true'); define('WARN_SESSION_AUTO_START', 'true'); define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true'); section of sts_default.php function find_template ($scriptbasename){ // Return an html file to use as template // Check if there is a template for this script // If script name contains "popup" then turn off templates and display the normal output // This is required to prevent display of standard page elements (header, footer, etc) from the template and allow javascript code to run properly // Do not add pages here unless it is from the standard osC and really should be there. If you have a special page that you don't want with template, // Create a module sts_mypagename.php that returns an empty string as template filename, it will automatically switch off STS for this page. if (strstr($scriptbasename, "popup")|| strstr($scriptbasename, "info_shopping_cart")) return ''; // We don't use template for these scripts $check_file = STS_TEMPLATE_DIR .$scriptbasename . ".html"; if (file_exists($check_file)) return $check_file; // No template for this script, returns the default template return STS_DEFAULT_TEMPLATE; } // End function Both seem to have the fixes from earlier versions already installed. I'm curious, could it have something to do my version of php (5.2.10)?
  2. randomone

    [Contribution] STS v4

    I wanted to make sure I wasn't just doing something stupid, so I went ahead and tried the various search boxes on a clean OSC2.2rc2a install. Everying was functioning properly. I then tried it on a OSC2.2rc2a install, with STS 4.5.8 which was installed by copying the RC2 files. Not working. Same error as I got on my own template. "Fatal error: Call to a member function image_button() on a non-object in /srv/http/sts_man/includes/functions/html_output.php on line 129". At this point I decided to make absolutely sure the path/name was correct. I literally copied the name of the image, and its complete directory structure. I tried every structure that made any logical sense. None of them worked at all. I decided to check the file permissions, set them all to make sure the http server could read/write/execute them just to be safe. Then tried checking the name/locations again. Still nothing. I further went on to manually install STS 4.5.8, just to make sure this wasn't some crazy oncflict with RC2 and RC2a. Had the exact same error. Afterwards, decided to undo the changes made to "/includes/functions/html_output.php" ... and the button displayed just fine. I put the changes back in again, and I got the error again. I tried it multiple times just to make sure. Further meddling conluded the following section of code to be the issue. It the code where you find: $image_submit = '<input type="image" src= Add Before: // START STS v4.4: global $sts; $src = $sts->image_button($image,$language); // this is line 129 in my html_output.php if ($src!='') $image_submit = '<input type="image" src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"'; else // END STS v4.4 Commenting out that chunk of code made the submit buttons work properly. Of course, it is not inheriting the button from the template directory anymore, but at least it is not causing a fatal error. My knowledge of PHP is limited, as is my knowledge of OSC's innards, so I have no idea why that line is causing me issues, and why it is causing only me to have issues, and apparently nobody else. Any help figuring out why this is happening is certainly appreciated.
  3. randomone

    [Contribution] STS v4

    Sorry, my above post bugged out and I can't seem to edit it. I'm currently customizing a clean install of OSC 2.2rc2a, with the only module being STS 4.5.8. When adding the Search Bar code to the STS Template there are some issues. Options 1,3,4 and 6 all function perfectly, however 2 and 5 give me the following error: "Fatal error: Call to a member function image_button() on a non-object in /srv/http/osc2/includes/functions/html_output.php on line 129" Any option that uses the default search image button causes that error, and I do not know why. (I haven not tried this on a clean OSC2.2rc2a to see what happens.) As mentioned above, I am wondering if someone will please try a clean store with just STS 4.5.8 installed to let me know if it works for them ok, or if its just me. Sorry for the double post, as I mentioned for some reason it all bugged out when I tried to simply edit my above post.
  4. randomone

    [Contribution] STS v4

    Any idea what would cause a "Fatal error: Call to a member function image_button() on a non-object in /catalog/includes/functions/html_output.php on line 129"? Techinically speaking the output actually had the systems location of the file e.g. /srv/http/test/ ... if that helps any. It only happens if I use the search code with a custom image. The version with a normal submit button works perfectly. Note that I got the issue regardless of how the I used the code, in my custom function, or just copy/paste. Of course for more info my post linked above has the full details The only moidification to OSCommerce 2.2.rc2a is STS 4.5.8, and I copied the files directly into a blank store. I'm hoping someone else can reproduce the issue since I really have no idea what's causing it.
  5. randomone

    [Contribution] STS v4

    Has anyone worked with "Search Box Anywhere" contribution? I'm trying to get a search bar in my header working, and it seems to only work if I don't use a custom image. Post: http://www.oscommerce.com/forums/index.php?sho...t&p=1430792 Thread: http://www.oscommerce.com/forums/index.php?sho...56945&st=60 Contribution Page: http://www.oscommerce.com/community/contributions,3295 Granted the code from that contribution is really old now, and it could be the issue. I was just wondering if anyone knows how to work around it.
  6. randomone

    [Contribution] - Search Box Anywhere

    I'm running STS 4.5.8 as well and also have some issues. So far I did get just a text box + "search" button working. If I try to use an image I get a Fatal error: Call to a member function image_button() on a non-object in /includes/functions/html_output.php on line 129. It's definitely coming from the line that creates the search button. For simplicity, I made a function and later call the function within my page template. I put this function in my header, though I believe it can be anywehere as long as its before the function call. For readability, I also split the echo into multiple lines. <?php function print_search_bar($search_image_src) { if ($search_image_src == '') { echo tep_draw_form('search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'); echo tep_draw_hidden_field('search_in_description','1'); echo tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH+10) . 'px"') . ' '; echo tep_hide_session_id() .'<input type="submit" name="Submit" value="Search">' . '</form>'; } else { // Error always happens if I uncomment either line below // Fatal error: Call to a member function image_button() on a non-object in /catalog/includes/functions/html_output.php on line 129 echo tep_draw_form('search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'); echo tep_draw_hidden_field('search_in_description','1'); echo tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH+10) . 'px"') . ' '; //echo tep_hide_session_id() .tep_image_submit('button_quick_find.gif', BOX_HEADING_ADVSEARCH, 'align="middle"') . '</form>'; //echo tep_image_submit('button_search.gif', BOX_HEADING_ADVSEARCH); } } ?> Note that later in the code I call the function as so: <?php print_search_bar(''); ?> This function works perfectly if you call it as above, however, if you actually put in an image name it explodes with the fatal error. Eventually, I plan to make it actually load the correct image, but as of now it just doesn't work. I don't know if the issue is STS or that this code is just too outdated to work with OSC 2.2rc2a. Note: the second commented line of code was pulled directly from search.php, which means it SHOULD work... you would think... For reference, here is the html_output lines coresponding to the error: //// // The HTML form submit button wrapper function // Outputs a button in the selected language function tep_image_submit($image, $alt = '', $parameters = '') { global $language; // START STS v4.4: global $sts; $src = $sts->image_button($image,$language); // this is the line producing the error if ($src!='') $image_submit = '<input type="image" src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"'; else // END STS v4.4 $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "'; if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters; $image_submit .= '>'; return $image_submit; } If anyone has any ideas on how to update the displaying of the search button image while using osc2.2rc2a + STS 4.5.8, it'd be much appreciated.
  7. randomone

    osC_Categories MS2-2.2

    Has anyone else gotten this to work with oscommerce-2.2rc2a? I installed this with STS 4.5.8, and it whenever I select anything I get an error: Fatal error: Call to a member function add_current_page() on a non-object in /var/www/osc/includes/application_top.php on line 313 The line is right where the paste an if/then clause, though removing the if/then and reverting to the original code pumped out the same error, except lin 312. It just doesn't seem to like the line: $navigation->add_current_page();
  8. randomone

    Dynamic SiteMap

    Seems like I can't simply edit my own posts here. >_< Thought of some more questions and was just going to add them, but it said I didn't have permission. :blink: Anyways, as mentioned above I am using the 3.0 version. Some of the files have the exact same header. There were several instances of "My Account", which pointed to create_account, edit_account, etc. I'm not sure how to correct this issue. I assume, that I would have to manually edit the enlgish files to that they don't all say "My Account" and actually say "Edit Account" or "Create Account", etc. correct? There seems to be an issue with ' in the text strings as well. Take a look at "I've forgotten my password" "Let's see what's new" and "Get them whiel they're hot!". The colored parts of the strings are not actually on the sitemap. It only shows the non-colored parts, making it very hard to tell what they are. sadly. In all cases, it is always where an ' exists in a title string.
  9. randomone

    Dynamic SiteMap

    I just installed the module (v 3.0) and it is working quite well so far. My only question is if it is a good idea to remove some of the standard files from the map. e.g. force anything having to do with account creation / editing to be exlcuded for unregistered members. Also, to remove duplicate entries such as "Site Map" which is already located under "information" because it is in the information box. It seems rather redundant to display it twice. Is it better to leave it? Or is it perfectly fine to exlude them? Also, it doesn't seem to be storing the values timezone or frequency of updates. I set mine up, and next time I opened the admin screen it had the default values again. Otherwise, it seems to be working fine for me.
  10. randomone

    [Contribution] STS v4

    I could use some help working with STS. I got the latest version installed on a clean latest version installation of OSC. I was loking through the docs and got confused with the extracss option. I did a google search and found the following post: http://www.oscommerce.com/forums/lofiversion/i...204381-800.html Someone else asked the same question there, but the answer left me a bit confused. >_< This may sound like a dumb question, but where do I put the code at? I tried in the sts_user_code.php and got nothing. I also tried to use grep to find any similar lines in the php files in the directory with no success. I am trying to do exactly what the post mentions - use a custom stylesheet for the infoboxes. Any help is greatly appreciated.
  11. Hmm, anyone happen to know what changes the installation does to the database? I want to remove the contribution for now to see if it is causing a bug that just showed up. Trying not to lose any recent data though. I'm not sure what file would have the SQL that was run during the first page load to install the module. Anyone know which file I should be looking at? Taking a look at seo.class.php. Seems to be what I am looking for.
  12. Thanks for the link. I know I mentioned that I had checked that mod rewrite was enabled with my host. I did forget to mention that I also asked them what path to use. Using the path they provided, when I click on a product link Il get a 404 error mentioning "product_info.php was not found on this server." Which makes no sense to me, since product info is definitely on the server. The instructions said there was no more conflicts with STS, so I assume it's not that. I was careful in merging my /admin/categories.php as well. I just don't know where else, besides the .htaccess that could be causing this. And if it is the htaccess, why it is doing this. Mine looks exactly the same as the one that came with the distribution (2.1d from Nov. 29), minus begin/end SEO URL's comments. Any help is greatly appreciated as I am really stuck. Everything shows up in the admin panel just fine. and if I turn it off the site runs ok. just can't enable them without the 404 errors popping up.
  13. This sounds like a pretty nice mod, but I have had a lot of trouble with installation. I've tried multiple versions and have not had success yet. My latest installation has been from the nov. 29, 2.1d release. I have verified with my host that the Linux server does support mod rewrite capabilities. I have checked that my PhP version is >= PHP 4.3.0. I get all the information in the Admin panel as I am supposed too. The problem is if I enable Ultimate SEO URL's I get the following: The URL in the window is correct: http://www.nationalmerchandiseoutlet.com/s...ner-p-2264.html Instead of loading the product information I just get a 404 error: Not Found The requested URL /nationalmerchandiseoutlet.com/product_info.php was not found on this server. -------------------------------------------------------------------------------- Apache/1.3.31 Server at nationalmerchandiseoutlet.com Port 80 At first I figured I probably copied/pasted something wrong or otherwise messed up... but I have done this about 5 times now and always get the same result. Any ideas on what causes this, or how to fix it? Any help is greatly appreciated.
  14. I'm using version 5.16, upgraded manually with all the fixes. I seem to be having an issue with shipping calculation though. If I set Enable Download to false, shipping calculates properly, except it charges shipping for gift vouchers. If I turn it on, then I get no shipping charged at all! It skips right past the 'Delivery Information' step in the checkout page. In Checkout shipping there is the line: if (($order->content_type == 'virtual') || ($order->content_type == 'virtual_weight') ) { Am I correct in guessing that CCGV determines 'virtual' items by having a weight of 0.00? I'm curious because our distributor does not give us product weights so all the products have a defaulted weight of 0.00. I am guessing this is why I am having the issue, just wondering if somoene can confirm it.
  15. I am having an issue with the coupons having a shipping cost when they should not. Since they are simply a virtual item, shipping should be free, but for some reason it is not. I am primarily wondering what section of code I have go diving into to figure this out. Or if anyone else has had a similar issue with CCGV.