Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

TolleyM

Pioneers
  • Posts

    49
  • Joined

  • Last visited

Profile Information

  • Real Name
    Mark Tolley

TolleyM's Achievements

  1. hi just realised i have posted this in the wrong section re repost in correct area mark see http://www.oscommerce.com/forums/topic/376215-warning-mysql-num-rows-supplied-argument-is-not-a-valid-mysql-result-resource-in-datasanwwwvhostsgeronimojonescomhttpdocsincludesfunctions/
  2. hi my site has been up and running for a while but just today wanted to use the review funciton to leave a review for an item when i click on the write a reveiw button i get a message at the top of the screen it reads Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /datasan/www/vhosts/geronimojones.com/httpdocs/includes/functions/database.php on line 103 line 103 reads - return mysql_num_rows($db_query); anyone have any ideas
  3. hi yes its for a customer i am building a store for - they purchased a template and i am working with that only guessed it was the checkout_shipping.php as i tried to configure the table rate shipping module but had the same results as with the zones, - then figured the only place the two came together was in the checkout_shipping.php page so then compared mine to standard untemplated page and found it so forget coding, i think with templates it more about being a detective mark
  4. hi every one solved this the problem was actually in the file checkout_shipping.php in the code around line 61 is $total_weight = $cart->show_weight(); $total_count = $cart->count_contents(); both of these lines were set with // in front of them which effectivly removed them took away the // and works fine mark
  5. hi all been investigating more and found out that even if a product for sale has NO weight, the shipping cost is still the first cost in the list when i first set this up the tare weight was set to zero so i started look at tareweight and it appears as if this is the only weight taken into account for the calulation example table reads 1:8,2:10.50,5:15,10:24,99:100.00 with tare weight set to zero -put an item in the shopping baset with a weight of 5kg then the price should be 15 but it only shows as 8 leave this 5kg item in the shopping cart, increase tare weight to 2kg (total 7kg) price should be 24 but is only 10.50 which is in the second weight band leave this 5kg item in the shopping cart, increase tare weight to 3kg (total 8kg) price should be 24 but is only 15 which is in the third weight band so basically the system is only looking at the tare weight for the calc and ignoring the weight of the product item any help much appreciated - can post copy of zone.php if it helps mark
  6. hi all i am trying to set up zone rate shipping i have 3 zones - GB, Europe and US zone set up working fine -just shown zone 1 and 2 below as example however when i enter the calc rates ie Zone Based Rates Enable Zones Method True Tax Class --none-- Sort Order 0 Zone 1 Countries US,CA Zone 1 Shipping Table 3:8.50,7:10.50,99:20.00 Zone 1 Handling Fee 0 Zone 2 Countries GB Zone 2 Shipping Table 3:8.50,7:10.50,99:20.00 when i put items in shopping basket and check out it only ever takes the first shipping rate example 3:8.50,7:10.50,99:20.00 say the item purchased re US was 3kg, then shipping cost should be 8.50 - this works fine then say item purchsed 8 kg then shipping cost shd now be 10.50 but the system is still showing 8.50 regardless of weight of items - when i reach check out the system only ever takes the first shipping rate from the shipping table any ideas whats going wrong anyone mark
  7. hi everyone i am trying to use http://www.oscommerce.com/community/contributions,3100 i like the idea of this as i can back up my db each night and get it emailed to me so its off the server i have installed but each time it runs i get errors - does anyone know why?? - the errors i get are below and happy to post up any other info if needbe basically i just want an add on or scipt that will back up my db each night and mail it to me Errors below Warning: include(includes/configure.php): failed to open stream: No such file or directory in /data/www/vhosts/geronimojones.com/httpdocs/includes/application_top_original.php on line 34 Warning: include(includes/configure.php): failed to open stream: No such file or directory in /data/www/vhosts/geronimojones.com/httpdocs/includes/application_top_original.php on line 34 Warning: include(): Failed opening 'includes/configure.php' for inclusion (include_path='.:') in /data/www/vhosts/geronimojones.com/httpdocs/includes/application_top_original.php on line 34 Warning: require(includes/functions/compatibility.php): failed to open stream: No such file or directory in /data/www/vhosts/geronimojones.com/httpdocs/includes/application_top_original.php on line 47 Warning: require(includes/functions/compatibility.php): failed to open stream: No such file or directory in /data/www/vhosts/geronimojones.com/httpdocs/includes/application_top_original.php on line 47 Fatal error: require(): Failed opening required 'includes/functions/compatibility.php' (include_path='.:') in /data/www/vhosts/geronimojones.com/httpdocs/includes/application_top_original.php on line 47 Line 34 is include('includes/configure.php'); Line 47 is require(DIR_WS_FUNCTIONS . 'compatibility.php');
  8. hi thanks for all your help on here i set up a cron job - my hosting provider calls it scheduled tasks?? and it ran on time i kept getting US Dollar was not updated since it has been updated in the last 24 hours. Euro was not updated since it has been updated in the last 24 hours. Pounds was not updated since it has been updated in the last 24 hours. so did what was suggested in this tread about changing the code $nhours = round($nseconds / 3600) * (($ndays > 1) ? $ndays : 1); // One hour has 3600 seconds $nseconds = $nseconds % 3600; $nminutes = round($nseconds / 60); // One minute has 60 seconds, duh! $nseconds = $nseconds % 60; return $nhours; and it works just great if this is a common problem, does it need changing in the add on anyhow - thanks for all the help and all up and running mark
  9. Thanks have just contacted host to see if i can access cron will let you know how i get on mark
  10. Thanks good point then cron it is for daily update in the instructions it says -------------------------------------------------------------------------- Step 2: Add a cron job. The following syntax may not be correct for your server (be sure to replace username). If not, you will need to contact your host to get the correct syntax. php /home/username/public_html/catalog/admin/auto_update_currencies.php so - how do i actually do this as i have never added a cron job before - it is just uploaded a file?? i have full ftp access to the site and can log on to hosting site control panel mark
  11. hi thanks for your answer - i actually want the script to run everytime a customer is on site what if i put the code in the root index file, would this update currancies everytime the website is reloaded Mark
  12. hi all i just added the auto_update_currencies.php file to system and dont really understand what the cron stuff is i have access to server etc but bit stuck re whats next so on the install guide it say Step 3: (optional) - If you can't get the cron job to run, or don't want to use cron, insert the following at the very bottom of the admin/index.php file: <?php include('auto_update_currencies.php'); ?> i have done this, does this mean the currancies will now update automatically or do i have to do anything else mark
  13. i have a site which has 3 currancies installed GBP (default) USD and EUR i added the code from add on contribution http://addons.oscommerce.com/info/5685 and now i get an error the code from the contribution added to - APPLICATION_TOP.PHP in INCLUDES folder reads // Update Currency Rate # Read currency exchanges rates # Cache file if appropriate ... if (time()-filemtime("eurofxref-daily.xml") > 36000) { $stuff = file("http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml"); $fh = fopen("eurofxref-daily.xml","w"); foreach ($stuff as $line) { fputs($fh,$line); } fclose ($fh); $xld = "loaded afresh (and not cached)"; } else { # .. or read from cache $stuff = file("eurofxref-daily.xml"); $xld = "cached (and not loaded afresh)"; } # $xld may be used in your output to inform you user or admin # Extract exchange rates $exchrate[EUR] = 1.00; foreach ($stuff as $line) { ereg("currency='([[:alpha:]]+)'",$line,$gota); if (ereg("rate='([[:graph:]]+)'",$line,$gotb)) { $exchrate[$gota[1]] = $gotb[1]; } } $GBP_EUR = round(1 * $exchrate[GBP], 8); $GBP_USD = round(1 * $exchrate[uSD], 8); tep_db_query("update currencies set value = ". $GBP_EUR ." where code = 'GBP'"); tep_db_query("update currencies set value = ". $GBP_USD ." where code = 'USD'"); when i installed this and tried, the error i got was Fatal error: Call to undefined function tep_db_query() in /data/www/vhosts/MYWEBSITE.com/httpdocs/includes/application_top.php on line 71 LINE 71 was tep_db_query("update currencies set value = ". $GBP_EUR ." where code = 'GBP'"); any ideas anyone as i could do with site update automatically all the time thanks mark
×
×
  • Create New...