Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

randomone

Archived
  • Posts

    25
  • Joined

  • Last visited

Posts posted by randomone

  1. STS is still not to blame here.

     

    Check your positioning of the new code. See the following link regarding a similar issue in earlier versions of osCommerce:

    http://www.oscommerce.com/forums/index.php?s=&...t&p=1058282

     

    Hope this helped you out,

     

    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. This does not have anything to do with STS.

    It's most likely that you do not have your image in the correct directory and therefore the error message.

     

    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. Just use the box that you want and add it directly to your template page.

     

    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. I've used that code numerous times with no issues.

     

    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. 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. Many questions about this contribution in STS but no good answers... :huh:

     

    I run STS 4.5.8 but have failed to get this to work. All i see on my page is the frey search box with the code inside of it:

     

    <?php echo tep_draw_form('search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') . tep_draw_hidden_field('search_in_description','1') . tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH+10) . 'px"') . ' ' . tep_hide_session_id() .'<input type="submit" name="Submit" value="Search">' . '</form>'; ?>

     

    Any ideas?

     

    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. 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. 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. 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. 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. >_<

     

    In most cases the extracss tag is not needed, just put the link to your stylesheet in the header.

    If you have for example another stylesheet for your infoboxes, you can add it to the extracss like this:

     

    $sts->template['extracss'] .= '<link rel="stylesheet" type="text/css" href="boxestylesheet.css">';

     

    and place <!--$extracss--> in your header.

     

    As you can place php code into your templates, you can place something in extracss dynamically, for example according to user's language or month of the year or whatever you are able to code.

     

    - Rigadin

     

    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.

  16. I commented out

     

    if($products_in_category != 0)

     

    and now all categories are showing. Is that all?? :huh:

     

     

    Yeah that is all. =)

     

     

    Anyone else having intermitent issues with the menu not being displayed? If you check out my website every once in a while the categories simply won't show up, but I'd say about 90% of the time they are perfectly fine.

     

    www.nmoutlet.com

     

    I have not been able to get get it to do this consistantly under any circimstances. The site was running a bit slow so we had our webhost try to 'fix' it. Trying to figure out if the 'fix' caused an issue with the menu system somehow or if anyone else has the same problem.

  17. I'm curious which version you are using? I've tried versions 1.59 and 2.05, and tried with and without the SQL query update, and all them give me a null data error (on clean MS 2.2 and modded) at around line 625 - if I remember it correctly.

     

    I'd have posted here when working on it, but I never found this thread. (or perhaps improperly assumed it was only for version 1.5X)

     

    Anyways, just wondering which version you got working since I have had no luck at all with it so far. Seems like a pretty awesome module though.

  18. I tried that many times before but it didn't work.

    I'm testing another menu similar to this one that seems to be able to show the count.

     

    I've gone through and figured out how to both make it display the count number and remove any categories with zero products in them.

     

    In "catalog/includes/classes/categories.php" search for "function buildBranch($parent_id, $level = 0)" (should be around line 48)

     

    Replace the entire function with:

     

       function buildBranch($parent_id, $level = 0)
      {
     global $request_type;
     if (isset($this->data[$parent_id]))
     {
       foreach ($this->data[$parent_id] as $category_id => $category)
       {
       		$products_in_category = tep_count_products_in_category($category_id);
       		if($products_in_category != 0)
       		{
    
    		 	$category_link = $category_id;
    		 	if (isset($this->data[$category_id]))
    		 	{
    		 	  $result .= $this->parent_start_string;
    		 	}
    		 	else
    		 	{
    		 	  $result .= $this->child_start_string;
    		 	}
    
    			if (SHOW_COUNTS == 'true')
    			{
    				$count = ' (' . $products_in_category . ')';
    			}
    
    			$icon = "null";
    		 	$title = "'" . addslashes($category['name']) . "$count'";
    			// $title = "'" . addslashes($category['name']) . "'";
    			// $url = "'" . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $category_link,$request_type) . "'";
    		 	$url = "'" . tep_href_link(FILENAME_DEFAULT, 'cPath=' . $this->buildBreadcrumb($category_link),$request_type) . "'";
    
    		 	$target = "''";
    		 	$description = "''";
    		 	$result .= "$icon, $title, $url, $target, $description";
    
    		 	if (isset($this->data[$category_id]) && (($this->max_level == '0') || ($this->max_level > $level+1)))
    		 	{
    		   		$result .= ",".$this->buildBranch($category_id, $level+1);
    		 	}
    
    		 	if (isset($this->data[$category_id]))
    		 	{
    		   		$result .= $this->parent_end_string;
    		 	}
    		 	else
    		 	{
    		   		$result .= $this->child_end_string;
    		 	}
    	 	}
       	}
     }
     return $result;
      }

     

     

    That works for me at least. Note that I also update my JSCookMenu file to v2.03, I don't think that should be an issue though.

     

    Got it working with STS, InfoboxSkins, CCGV, and various other modules... finally! :D

  19. I'm still trying to find a way to show product count on the menu. Does anyone know how to do it??

     

    I figured this out the other day. Open up "includes/classes/categories.php" and search for:

     

    //		 $title = "'" . addslashes($category['name']) . "$count'";

     

    remove the // because it comments out the line. And add the // to the line below it. (Should be lines 73 and 74.)

     

    Also, delete the /* and */ on lines 62 and 69. Now it should display them.

     

     

     

    Has anyone else had an issue if you increase the font size? I'm using STS 4.1 and Infobox Skins Manager and if I up the font size (and/or use the above fix to show the numerb of products) I get a box that is larger than all the other boxes. It seems like the arrow images require a certain space between them and the categoryies name and I don't know where to change that value and remove the excess spaces at.

     

    Additionally, I'd like to know how or if its possible to change the color the category you are currently browsing? I'd like have a seperate style for it, but can't seem to get it to work, even if I encase the text in a span with its own style. :(

  20. I also cannot seem to get this working with STS 4.1. :(

     

    If I put the direct PHP code into the HTML template the page looks quite messed up. Displaying the Category Box as 3/4 of my screen wide (seems to be exactly the same size as the left and center colums).

     

    The fly-out is also broken and only works after select a category. Once the page reloads, the fly-out works for only that menu.

     

    If I edit the sts_column_left.php to:

    include(DIR_WS_BOXES . 'dm_categories.php');
    $sts->restart_capture ('test', 'box');

     

    and put the $test# in my STS template (while keeping the echo statement in the template) it fixes the width issue, but the fly-outs still fail to function. When I mouse-over a menu item that should have a sub-category, I also get a JavaScript Error: line 129 char 1. Object not found.

     

     

    I have gotten it working without STS, but I'd like to get it working with it. Has anyone else had any success?

  21. Is there a way to make this work with Region Based Rates?

    http://www.oscommerce.com/community/contri...ion+Based+Rates

     

    I can get it to work if I put United States in a zone, but it fails to work otherwise.

     

    I would like to know how I would go about implementing a second drop box to let them choose a state instead of a country, or even a state appropriate for the selected country.

     

    Seems to be a very great contribution so far. :)

  22. I finally got mine working earlier tonight, it seems that the latest XAMPP was causing my issues. I used the older version which I had installed on my desktop and things seem to be working a lot better now. still have some issues to sort through, but its much better now. :)

     

     

    In repsonse to the post above, I had those issues before as well. If I remember right it was because my skins directory was not set writable. I also got this message if I accidentally set one of the options to use a skin that was not previously set. For some odd reason the skin mapping seemed to like setting some of the values to skin 6 (Ihave no clue why). Since I had not set skin 6 yet it caused me to display several of those same errors.

     

    Hope that helps a bit. :)

  23. Thanks for the help so far, much appreciated.

     

    I decided to try it again today and see what happens. I did a completely clean install of oscommerce-2.2ms2-051113. tested the new site. worked perfectly. Used the sql query to add the extra info to the DB. Tested the site before adding anything else, and it still worked just fine. (no corrupted DB yet at this point). Followed the rest of the instructions and added the skins... BOOM. same error again. :(

     

    It seems to be some how tied to the skins, but I have no clue how or why.

     

    If it helps, I have PhP 5.1.4 and MySQL 5.0.21. Think that could be an issue at all?

  24. I had a nice site working in on my old comp using infobox skins and STS 4.07. I got my new computer and installed the latest XAMPP, which comes with the latest PHP and MySQL. I seemed to have some issues with my old osCommerce, so I downloaded the latest clean installation "oscommerce-2.2ms2-051113".

     

    I've transported my database without any issues, and setup the clean osCommerce and it was working fine. when I install just the Skin Manager I keep getting an error. It loads the index page, and if I click on "What's New" it will display the item just fine. The problem is when I click on any category. I end up getting the following:

     

    1054 - Unknown column 'p.products_id' in 'on clause'
    
    select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '31'
    
    [TEP STOP]

     

    I've tried text searching every file in the directory for a SQL query to match that but have found nothing so far. Anyone else know what might cause something like this?

×
×
  • Create New...