Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

hubcat

Pioneers
  • Posts

    379
  • Joined

  • Last visited

Posts posted by hubcat

  1. Hi There,

     

    I've been successfully using additional images v1 with ms2.2 for years now. I just upgraded from ms2.2 to rc2a and from mySQL 4 t5o mySQL 5. I couldn't upgrade to additional images v2 because I've completely restructured the product_info page and I couldn't get it to deconflict. v1 works fine from my customers perspective, but on the admin side, I can no longer upload new additional images. Here's the error messages I get when trying to add a second image (first one through normal OSC interface works fine, problem is when using the v1 "add image" button). Has anyone seen this before? I've posted the code snippets corresponding to the error messages at the bottom, but I realize it could actually be somewhere else. Any/all replys are appreciated - I've been working on this for many hours now, but my php and sql skills are both very limited.

     

    Thanks in advance!

    Adrienne

     

    Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/mysite/admin/categories.php on line 440

     

    Warning: reset() [function.reset]: Passed variable is not an array or object in /home/mysite/admin/includes/functions/database.php on line 55

     

    Warning: Variable passed to each() is not an array or object in /home/mysite/admin/includes/functions/database.php on line 58

     

    Warning: reset() [function.reset]: Passed variable is not an array or object in /home/mysite/admin/includes/functions/database.php on line 62

     

    Warning: Variable passed to each() is not an array or object in /home/mysite/admin/includes/functions/database.php on line 63

    1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') values)' at line 1

    insert into additional_images) values)

     

    categories.php line 440 code:

         case 'add_images':
           $products_id = $HTTP_GET_VARS['pID'];
           $add_images_error = true;
           if ($popup_images = new upload('popup_images', DIR_FS_CATALOG_IMAGES)) {
             $add_images_error = false;
             $sql_data_array = array('products_id' => tep_db_prepare_input($products_id),
                                     'images_description' => tep_db_prepare_input($HTTP_POST_VARS['images_description']),
                                     'popup_images' => tep_db_prepare_input($popup_images->filename));
             $sql_data_array = array_merge($sql_data_array, $add_data_array);
           }
           if ($add_images_error == false) {
             tep_db_perform(TABLE_ADDITIONAL_IMAGES, $sql_data_array);
           } else {
             $messageStack->add_session(ERROR_ADDITIONAL_IMAGE_IS_EMPTY, 'error');
           }
           tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id));
           break;
    

     

    database.php code:

     function tep_db_perform($table, $data, $action = 'insert', $parameters = '', $link = 'db_link') {
       reset($data);
       if ($action == 'insert') {
         $query = 'insert into ' . $table . ' (';
         while (list($columns, ) = each($data)) {
           $query .= $columns . ', ';
         }
         $query = substr($query, 0, -2) . ') values (';
         reset($data);
         while (list(, $value) = each($data)) {
           switch ((string)$value) {
             case 'now()':
               $query .= 'now(), ';
               break;
             case 'null':
               $query .= 'null, ';
               break;
             default:
               $query .= '\'' . tep_db_input($value) . '\', ';
               break;
           }
    

  2. Hi, I'm just now upgrading from 2.2 MS2 to 2.2 RC2a. I currently have QBI 2_10 working on MS2 with all the appropriate database adds.

     

    Do you happen to know if QBI 2_10 will still work on RC2a? What features this new version has over the old QBI? And most important, if I upgrade to this will it conflict at all with the years of data that has already been imported into QB?

     

    Any clarification so I can make a good choice going forward would be greatly appreciated.

     

    Thanks,

    Adrienne

  3. I had a problem running the Cron job. The confirmation email I receive says:

    Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory.

     

    But my register_globals are set on in php.ini file. I have other contribution which requires register_global to be on working as well. So can someone help me with this dilemma? Otherwise, the contribution can't really tell buyers which items are best sellers.

     

    This was posted a year ago and I'm wondering if you ever got it fixed. This is what my hosts tech guys had to say:

     

    "It appears that the script you are calling (cron_update_bestsellers.php) is querying the systems default php settings rather than the php.ini within the same account/directory.

     

    I was able to run this by altering the system default for your VPS, however depending on the nature of any of your other scripts, this may cause them to behave in a manner not intended. Ideally, the script should be reading from the php.ini or the .htaccess file located in the same location, however I was not able to coax it to do so."

     

    So now I know what the problem is, but I have no idea how to fix it. This year-old post is the only one I could find on this topic.

     

    Thanks,

    Adrienne

  4. Greetings! :-)

     

    Like everyone else, I'm trying to do something specific. I need to continue to use multiple_dropdowns not sequenced drop downs, but I'm having issues with customers forgetting to set their preferences, so they buy whatever is the first item in the list and then return it - doubling my shipping costs.

     

    So... I'd like to add the "Please Select Option" tag line to the beginning of the multiple drop down boxes.

     

    I was able to hack in a change that mostly works and looks like this:

     

    ORIGINAL:
    	  $out.='<tr><td align="right" class=main><b>'.$attributes[$o]['oname'].":</b></td><td class=main>".tep_draw_pull_down_menu('id['.$attributes[$o]['oid'].']',array_values($attributes[$o]['ovals']),$attributes[$o]['default'], "onchange=\"stkmsg(this.form);\"")."</td></tr>\n";
    
    
    CHANGE:
    	  $out.='<tr><td align="right" class=main><b>'.$attributes[$o]['oname'].":</b></td><td class=main>".tep_draw_pull_down_menu('id['.$attributes[$o]['oid'].']',array_merge(array(array('id'=>0, 'text'=>'Please Select a '.$attributes[$o]['oname'])), $attributes[$o]['ovals']),$attributes[$o]['default'], "onchange=\"stkmsg(this.form);\"")."</td></tr>\n";

     

    Unfortunately, now the default first line creates an Out of Stock message, so that it looks like the entire product is out of stock.

     

     

    Here is the full code for the menu creation:

     

    string: HTML to display dropdown lists for attributes that stock is tracked for

     

    */
    function _draw_stocked_attributes() {
      global $languages_id;
    
      $out='';
    
      $attributes = $this->_build_attributes_array(true, false);
      if (sizeof($attributes)>0) {
    	for($o=0; $o<sizeof($attributes); $o++) {
    	  $s=sizeof($attributes[$o]['ovals']);
    	  for ($a=0; $a<$s; $a++) {
    		$attribute_stock_query = tep_db_query("select products_stock_quantity from " . TABLE_PRODUCTS_STOCK . " where products_id = '" . (int)$this->products_id . "' AND products_stock_attributes REGEXP '(^|,)" . (int)$attributes[$o]['oid'] . "-" . (int)$attributes[$o]['ovals'][$a]['id'] . "(,|$)' AND products_stock_quantity > 0");
    		$out_of_stock=(tep_db_num_rows($attribute_stock_query)==0);
    		if ($out_of_stock && ($this->show_out_of_stock == 'True')) {
    		  switch ($this->mark_out_of_stock) {
    			case 'Left':   $attributes[$o]['ovals'][$a]['text']=TEXT_OUT_OF_STOCK.' - '.$attributes[$o]['ovals'][$a]['text'];
    						   break;
    			case 'Right':  $attributes[$o]['ovals'][$a]['text'].=' - '.TEXT_OUT_OF_STOCK;
    						   break;
    		  }
    		}
    		elseif ($out_of_stock && ($this->show_out_of_stock != 'True')) {
    		  unset($attributes[$o]['ovals'][$a]);
    		}
    	  }
    	  $out.='<tr><td align="right" class=main><b>'.$attributes[$o]['oname'].":</b></td><td class=main>".tep_draw_pull_down_menu('id['.$attributes[$o]['oid'].']',array_values($attributes[$o]['ovals']),$attributes[$o]['default'], "onchange=\"stkmsg(this.form);\"")."</td></tr>\n";
    	}		
    	$out.=$this->_draw_out_of_stock_message_js($attributes);
    
    	return $out;
      }
    }

     

    So... I think I need to wrap some sort of if statement around that last line.

     

    In pseudo code:

    if (a product has been selected and not the text line)

    $out.=$this->_draw_out_of_stock_message_js($attributes);

     

    I could provide the draw_out_of_stock_message_js code if needed. It could probably be done there as well, but this post is already so long...

  5. I'm working with OSC2.2ms2. I have almost 20 contributions added and had to pay someone to fix some bugs that I couldn't workout myself. The entire checkout system is custom for my specific needs, and not even a contribution.

     

    So... my store is completely stable at the moment, is there a compelling reason to upgrade to OSC3.0? In truth, I can't think of one, but I'm open to opinions.

     

    Thanks,

    Adrienne

  6. PLEASE HELP

     

    I've been using 4.2 for nearly 2 years. It has had the same error ever since I installed it.

     

    If someone purchases 3 different items, the first one is deducted from stock and the second two are not. Always just the first one is deducted, never any past the first.

     

    I tried to fix this way back when but couldn't get any help and never got it working. But the store was only getting 1 or 2 orders a week, so I would adjust manually. Now the store gets about 15 orders a week, and I just don't have time to adjust manually. I've gotten bitten a few times as well.

     

    So, I just upgraded to 4.3 hoping it had been fixed in the meantime, and no luck. I have the exact same problem. For my configuration, absolutely nothing changed from 4.2 to 4.3 except the admin reports section.

     

    For reference, most of my items have 2 stock-tracked attributes and 1 non-stock attribute.

     

    Any suggestions?? I've spent hours on this, and I'm desperate! :'(

  7. Not Found

    The requested URL /store/admin/FILENAME_STATS_LOW_STOCK was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

     

    Ok, I just deleted that line, and everything worked fine. Go to admin -> includes -> boxes -> reports.php

    and change:

     

    '<a href="' . tep_href_link(FILENAME_STATS_LOW_STOCK_ATTRIB, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_STATS_LOW_STOCK_ATTRIB . '</a><br>'.

    '<a href="' . tep_href_link(FILENAME_STATS_LOW_STOCK, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_STOCK_LEVEL . '</a>');

     

    to:

     

    '<a href="' . tep_href_link(FILENAME_STATS_LOW_STOCK_ATTRIB, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_STATS_LOW_STOCK_ATTRIB . '</a>');

     

    That seemed to work for me.

    Good luck,

    Adrienne

  8. So this has worked hopefully, could anyone now tell me if I have to do anything else or will this now appear on Google base

     

    Thanks for all the help it’s really appreciated.

     

    Darren

    www.kingunderground.com

     

    Darren,

     

    Yes, there's one more thing you should do - go back to your google account and check under the My Account -> My Items -> Bulk Feed (or something similar) setting. It will show you the date of the last bulk upload, so you can verify that it really did upload correctly AND it will tell you if there was a problem. If google likes it, your items will show up automatically on base. If they don't, they will give you a message on that screen. Then you're done.

     

    Adrienne

     

    PS - Still looking for an answer on how to mod the code to show only the lowest level category for Product_Type. Any suggestions??

  9. Warning: ftp_connect() [function.ftp-connect]: php_network_getaddresses: gethostbyname failed in C:\Inetpub\vhosts\kingunderground.com\httpdocs\catalog\admin\froogle.php on line 278

    FTP open connection failed to FROOGLE_FTP_SERVER

     

    It looks like your problem is that you've named the ftp server FROOGLE_FTP_SERVER in the upfront section. If you're trying to post to google, their bulk upload server is named uploads.google.com

     

    Log on to your google account and it will show you your server name (should be uploads.google.com, but maybe they have more than one), your login id and you can check or change your login password. All those variables must be set in the googlefeeder.php file.

     

    Adrienne

  10. Hi,

     

    This is a fabulous contribution, and it's working perfectly. Many thanks to those involved in making it available.

     

    I'm trying to change the category output to show just the lowest level category. So instead of a output like this:

     

    Top Category, Sub Category 1, Sub Category 2

    Top Category

    Top Category, Sub Category 1

     

    I just want it to show this:

    Sub Category 2

    Top Category

    Sub Category 1

     

    In my case, that is much more descriptive of what I'm selling than the full list.

     

    The problem is that I'm a total php novice. I can recognize that this is the code that is generating the data, but I can't figure out what to change to output just the last category.

     

    Any suggestions?

     

    function findCat($curID, $catTempPar, $catTempDes, $catIndex)
    {
    if( (isset($catTempPar[$curID])) && ($catTempPar[$curID] != 0) )
    {
    if(isset($catIndex[$catTempPar[$curID]]))
    {
    $temp=$catIndex[$catTempPar[$curID]];
    }
    else
    {
    $catIndex = findCat($catTempPar[$curID], $catTempPar, $catTempDes, $catIndex);
    $temp = $catIndex[$catTempPar[$curID]];
    }
    }
    if( (isset($catTempPar[$curID])) && (isset($catTempDes[$curID])) && ($catTempPar[$curID] == 0) )
    {
    $catIndex[$curID] = $catTempDes[$curID];
    }
    else
    {
    $catIndex[$curID] = $temp . ", " . $catTempDes[$curID];
    }
    return $catIndex;
    
    }
    
    $catIndex = array();
    $catTempDes = array();
    $catTempPar = array();
    $processCat = mysql_query( $catInfo )or die( $FunctionName . ": SQL error " . mysql_error() . "| catInfo = " . htmlentities($catInfo) );
    while ( $catRow = mysql_fetch_object( $processCat ) )
    {
    $catKey = $catRow->curCatID;
    $catName = $catRow->catName;
    $catParID = $catRow->parentCatID;
    if($catName != "")
    {
    $catTempDes[$catKey]=$catName;
    $catTempPar[$catKey]=$catParID;
    }
    }
    
    foreach($catTempDes as $curID=>$des) //don't need the $des
    {
    $catIndex = findCat($curID, $catTempPar, $catTempDes, $catIndex);
    }
    

     

    Thanks a bunch!

    Adrienne

  11. Hey all,

     

    I have installed QT Pro Version 4.3 - and I have a strange problem.. The countdown of the stock only works sometimes.. I can't see when it works and when it not works.. Have some of you had that problem, that it only works sometimes?

     

    /Olzen

     

    I am running an older version of QT Pro and it has this problem. I've been adjusting stock manually, but finally got to the point where I'm getting so many orders it's no longer feasible, so came to see if there was a fix. In my case, it tracks stock accurately when someone buys any number of a single item. However, if they buy 2 or 3 different items, only the first one is subtracted from inventory. The rest stay in inventory.

     

    For reference, most of my items have 2 stock-tracked attributes and 1 non stock-tracked attribute. I never seem to do well at searching these forums, so if this has been answered already, would someone mind pointing me in the right place, I can't seem to find it.

     

    Thanks!

    Adrienne

  12. Hi,

     

    ah yes, it seems we have a configuration control problem here. The supertracker class was rewritten in one of the earlier versions and no longer needed the sesskey field in the database, so it was removed.

     

    Unfortunately, the security update posted by createvideo was based on an earlier version of supertracker, and so is trying to use this field.

     

    As a temporary fix you could add the sesskey field to the database, but I think we need to organise a new release that fixes this issue properly.

     

    Mark

     

    Hi Mark,

     

    Can you explain where (well, how really) the sesskey field should be added to the database? Also, is this a problem with v3.2b if we add the security update?

     

    Thanks,

    Adrienne

  13. Hi,

     

    Thank you for a fabulous contribution!

     

    I have 2 questions. My previous default was to have all products sorted by name a to z. When I installed this contribution, my default listing (if the sort by dropdown is not used) is by name z to a. Is there a way to get it back to a to z?

     

    Second, if I have Admin ---> Product Listing ---> Display Manufacturer set to display, the fields are next to each other which takes up too much room and reaks havoc on the layout. I'd like to add a <br> to have them show one on top of the other, but I can't seem to figure out how to do that. This is less important, because I don't mind having Display Manufacturer turned off, but it would be nice to know how to do it.

     

    Any help is appreciated! :rolleyes:

    Adrienne

  14. You need to log in to your Authorize.net account directly - the decline is coming from them, not OSC. There is a default setting to automatically decline cards from foreign banks, which you have to uncheck. I believe it is under the "Settings" tab, but if not, it's relatively easy to find. I've done it, and my best customer thus far has been from Canada.

     

    I haven't been in business very long, and haven't had any trouble with fraud / chargebacks. So I can't say much about that.

     

    Good luck,

    Adrienne

  15. Ok, I'm back after several pages of silence. :-)

     

    I got all the product attributes always showing in the same order in the cart and in the wishlist, and it turns out that was not what was causing my issue where if someone logged out and then back in, their items wouldn't get deleted from the wishlist. Although, it all looks nicer now with the attributes in the same order. :-) I've got like 20 contributions, so I'm sure this is a problem on my specific system. Oh well, I rolled it into production with the known bug. First time I've done that, but got tired of messing with it.

     

    Anyway, I wrote up the new wishlist_help.php file for my site, but I need to clean it up a bit for general use. I don't use column_right, and added some site-specific pictures that I will need to take out. I'll post it in the next few days.

     

    Adrienne

  16. Carlos,

     

    THAT'S IT!! Thanks for the tip. All of my products have 3 attributes, always listed in the same order. For some reason, when I log out, and then log back in, the database lists all of the attributes, but not necessarily in the original order. If it comes up in the original order, the wishlist "Item in Cart" notice and deletion after purchase functions work properly. But if the order has been switched, they don't work.

     

    Jeff is now looking into how to force it so that the attributes are always shown in the same order. We'll post if he can figure it out. Please do the same if you do.

     

    Thanks,

    Adrienne

  17. I can't duplicate this. You shouldn't need to close the browser down, if you logoff, it will destroy the wishID session and your cartID session too. When you add things to your cart, are you adding from the wishlist? Are you adding the product from the product pages to the cart and maybe its the wrong attributes matched up in the wishlist? I dunno what it could be, but everything works fine for me.

     

    -Dennis

     

     

    I'm essentially doing the exact same steps as above, without adding new products to the wishlist. Here's the path:

     

    Go to product page -> Add item to Wishlist -> Repeat for several items -> Logout

    Login -> Go to Wishlist -> Add items to Cart (no Item in Cart msg appears) -> Go to Cart -> Checkout -> Go to Wishlist - all items (including purchased items) are still listed.

     

    Not sure why it works OK if I add them and then immediately checkout without logging out, but it seems like most users would save the items for later, so the path I'm having trouble with is the more likely path a customer would follow.

     

    I'll keep trying, but if you think of something, please let me know.

     

    Adrienne

  18. Dennis,

     

    OK, I've narrowed down the problem (though still no fix). If I do what you described above - log in to an account, add items to wishlist, put some in cart, checkout - it works perfectly, just as it did for you.

     

    But I put items in my wishlist and then log out - so they're in the DB now. Then I log back in (opened a new browser window so there wouldn't be any odd memory issues). Upon relog in, my wishlist is there and shows everything. Now I add things to the cart. The "Item in Cart" message does not show up (actually it did show up once on 1 out of 3 products), and when I check out, the items are still in my wishlist.

     

    I'm using the session fix you provided a few posts back. Can you try testing logging in and out and then adding stuff to the cart so I know if it's just me or if you are having the same issue? Thanks!!

     

    Adrienne

  19. Ok, one problem solved. It turns out I had another contribution that had already defined "TEXT_NAME", which just so happed to be set as "Your Name". DOH! So I changed the variable to "TEXT_WISHLIST_NAME" in both Wishlist.php files, and now it works fine. Ah, the challenges of heavily modified stores!

     

    Anyway, this was not a problem with your code. Sorry for the false alarm.

     

    Still testing the second problem...

     

    Adrienne

  20. Hmm, that should of worked i thought LOL, ok let me test this myself and I will post what i find.

     

    //UPDATE

     

    Hmm, this worked for me. What exactly is the problem? Here is what I did. Logged into a test account (my test site), added three things to my wishlist, then from the wishlist added two things to the cart. The items showed, "Item in Cart" then I checked out. It removed the two products I added to the wishlist from the session and the db. I even checked diff attributes with one product and that worked too.

     

    -Dennis

     

    Ok, let me try it again. There is always the chance that it is conflicting with another contribution from my checkout system. What happened the first time was that I added things to checkout, lost the "Item in Cart" message that worked fine before, checked out and still had the items in my wishlist until I logged out and logged back in. But as I said - I have made some changes to the checkout, so perhaps it's on my end.

     

    Will post an update after more testing...

     

    Adrienne

  21. Dennis,

     

    No problem - Jeff is my husband, he does most of the coding, but it's my shop and I do the design/layout and everything else. He signed up for an account here, and I just started piggy backing on it rather than creating a new one. :-)

     

    That code didn't work. The Wishlist was already set to Clear, not to remove - so there was no change to that first line. This code did accidently remove the "Item in Cart" message from the Wishlist.php page, but it didn't fix the session problem. I'd like to help you with some ideas that might fix this, but I'm at a loss (and so is Jeff, I asked him first. :-)

     

    Thanks for the help,

    Adrienne

×
×
  • Create New...