Jump to content
Latest News: (loading..)

Bob Terveuren

Members
  • Content count

    496
  • Joined

  • Last visited

  • Days Won

    15

Bob Terveuren last won the day on January 17 2016

Bob Terveuren had the most liked content!

3 Followers

Profile Information

  • Real Name
    Bob Terveuren
  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. $product_query = tep_db_query("SELECT p.products_id FROM products p, products_to_categories p2c WHERE p.products_id = p2c.products_id and p.products_status = '1' and p2c.categories_id = '" . (int)$current_category_id . "'"); if(tep_db_num_rows($product_query) == 1) { $product = tep_db_fetch_array($product_query); tep_redirect(tep_href_link('product_info.php', ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . (int)$product['products_id'])); } Take your original and cut it down a bit more?
  2. Bob Terveuren

    zipcode shipping module

    Hi - OK had that rethink - this one can be tricky to setup and you can often end up with the situation you are seeing if there's a glitch in the admin. When it cannot correctly calculate a value it should display: Postcode Shipping No delivery/shipping available to the selected Postcode. But if you have not set the weights correctly then you can get: Postcode Shipping The delivery/shipping fee cannot be determined at this time $0.00 The trick is to set a big final weight in each zone - something like 10000:10000 - e.g. 4:7,10:10,99:13.50, 10000:10000 If that still does not fix it then here's a code hack that will disable the module if it sees a zero value returned // class constructor function zipship() { global $order; $this->code = 'zipship'; $this->title = MODULE_SHIPPING_ZIPSHIP_TEXT_TITLE; $this->description = MODULE_SHIPPING_ZIPSHIP_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_ZIPSHIP_SORT_ORDER; $this->icon = ''; $this->tax_class = MODULE_SHIPPING_ZIPSHIP_TAX_CLASS; $this->enabled = ((MODULE_SHIPPING_ZIPSHIP_STATUS == 'True') ? true : false); // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED!!! $this->num_zones = 6; if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_ZIPSHIP_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_ZIPSHIP_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->delivery['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } // check for a zero shipping price if ($this->quote()['methods'][0]['cost'] <= 0){ $this->enabled = false; } } // class methods
  3. Bob Terveuren

    zipcode shipping module

    nope - having a rethink........
  4. Bob Terveuren

    Table cost rate estimator

    That would be useful if it was linked to the module setup page in the admin - I have seen sites where the owner has miss-typed the lines like: 1:12,3:925,5:1090,10:1175,15:1260,20:1345,25:1595,31.5:1930,50:2940 resulting in shipping errors. - It is easy to screw those up
  5. Hi - just dropped by and spotted this - thanks for the kind words from people - few disparate thoughts on PayPal follow...... I'm in the middle of coding up a module for a non-oSC cart (that is also PHP/MySQL) trying to use the PayPal REST APi. Two weeks ago I fell over an undocumented problem with that APi and, so far, PayPal have maintained a resolute silence to my requests for advice. (I really suspect that they no longer have anybody in support who knows how their legacy stuff works [legacy means more than three years old???]). In addition I found that they will return a response of 'Completed' even if the payment method is an eCheck (unusual here in the UK but for a US merchant that eCheck should clear before despatch). I've also found a great difference between the Sandbox and Live versions of PayPal - so much so that it entails testing in both taking twice the time and effort to do so (and also ballsing up personal PayPal accounts in the process). I'm currently trying to decide if I should just cut my losses and drop out of the contract - it is that bad trying to work with them. Bluntly? My advice would be to have a good, hard look at why you want to use PayPal. Buy an SSL and use Stripe (certainly if you are USD/UK/CAN/AUD) - they will 'sit' on your money for seven days but do not come with the baggage of PayPal. If not then find a payments processor that provides their own code and supports it! Finally - the 'new' oSC PayPal App was probably written with due regard to the published/documented PayPal info by HPDL and his team - I have learned recently that the documentation is, frankly? Pish (as they say where I grew up). As a payments developer, PayPal customer and PayPal merchant (albeit UK based)? PayPal are failing to defend their previous market lead as a third party, online payments processor - look elsewhere, you may get cheaper rates and you will not have to suffer their 'buyer protection' policy that will feck over merchants continually. Cynical? Moi? Yup!
  6. Bob Terveuren

    View Counter

    Hi - can you rename it on your local computer as a .txt, upload and then rename on the server to a .bin?
  7. Bob Terveuren

    Auto Update Currencies

    Hi Peper - dirty trick? Moi? :D
  8. Only thing I can suggest would be to take the entire create_account form and add autocomplete="off" to each field - if that does not work (not too sure as to the actual problem) then make each field have a default value="" I have no access to a working copy of osC right now so I cannot say how to edit the create_account file
  9. Hi - likely to be an extra closing tag or maybe an unclosed opening tag - (needle in a haystack time). The problem may also in the original page and is only visible after the extra HTML is added - if you grab the HTML for both pages you could identify the extra code added for the second dropdown and see what that shows. If you see nothing then you could try the W3C validator - that is a can of worms as it will report things that aren't really wrong - e.g. on yours double opening <body> tags but that's only because it sees the <noscript> in the <head> and tells itself that there's an opening <body> there too. Try checking the <form> and get it into a single <div> - there's something hooky with the <div></divs> around that point in the page so maybe start there. You can also try something like http://www.aliciaramirez.com/closing-tags-checker/ Good luck Mr Bond - it's the type of job I hate......
  10. Hi - if I use the original sql from the add-on and run your code in 234BS then I have to make a couple of changes - the first is simply because I do not have tep_draw_pull_down_menu_parts so I substitute tep_draw_pull_down_menu That gives me a dropdown menu 'Please select' and a list of printers, choose one, nothing happens (which is what I think you are getting) What I see in function getprintercatoptions() is that there is: if($chkbottomROW[0]>0) { $str .= $printer_category_id.","; } That's always going to fail as the preceding sql query actually only returns an array of: $chkbottomROW[count(printer_category_id)] => 0 - there is no $chkbottomROW[0] anywhere. try making the two changes below in the function function getprintercatoptions($printer_category_id="",$curprintercatid="") { $fieldid = $printer_category_id; if(isset($_REQUEST['parts_cat_'.$printer_category_id])&&($_REQUEST['parts_cat_'.$printer_category_id]!='')) { $printer_category_id = $_REQUEST['parts_cat_'.$printer_category_id]; $str = getprintercatpath($printer_category_id,""); // change thefollowing add alias of count $query1 = tep_db_query("SELECT count(printer_category_id) as count FROM " . TABLE_PRINTER_CATEGORY . " where parent_id = '".$printer_category_id."'"); $chkbottomROW = tep_db_fetch_array($query1); if($str =="") {$str = "0,";} //change here use alias if($chkbottomROW['count'] > 0) { $str .= $printer_category_id.","; } $catarr = explode(",",substr($str,0,-1)); sort($catarr); editprintercat($catarr,$fieldid,$printer_category_id,$curprintercatid); }else{ if($curprintercatid>0) { $str = getprintercatpath($curprintercatid,""); if($str =="") { $str = $curprintercatid.","; }else{ $str .= $curprintercatid.","; } }else{ $str = getprintercatpath($printer_category_id,""); if($str =="") {$str = $printer_category_id.",";} } $catarr = explode(",",substr($str,0,-1)); sort($catarr); editprintercat($catarr,$fieldid,$printer_category_id,$curprintercatid); } }
  11. Hi - could you save the entire web page including the .js files as it appears when you first get there (i.e. the one that doesn't work)? If you can then zip it and attach here. If you can't then have a look in the console of your browser and see if there's any errors - chances are there's none as the onchange sounds like it is not firing - if your on 234BS then you could revamp the js code to use jQuery
  12. Hi If you are using a recent version of osC then the includes/classes/order.php file will not record anything in those fields - e.g. 2.3.4 and 2.3.4BS have these at line 218/221 'cc_type' => '', 'cc_owner' => '', 'cc_number' => '', 'cc_expires' => '', so you'll always get empty data. If you change those lines to this you'll get a record 'cc_type' => $_POST['cc_type'], 'cc_owner' => $_POST['cc_owner'], 'cc_number' => $_POST['cc_number'], 'cc_expires' => $_POST['cc_expires'], However that could land you in a world of pain as storing the cc_number in its entirety is most likely a hanging offence in most of the Western World nowadays so you should obfuscate that in some manner e.g. I think this should get you a card number like 4111XXXXXXXX1234 for storage but best check 'cc_type' => $_POST['cc_type'], 'cc_owner' => $_POST['cc_owner'], 'cc_number' => substr($_POST['cc_number'], 0, 4) . str_repeat('X', (strlen($_POST['cc_number']) - 8)) . substr($_POST['cc_number'], -4); 'cc_expires' => $_POST['cc_expires'],
  13. No - it is not a mismatch - what you are seeing is down to the difference between the catalog/includes/classes/currencies.php file and admin/includes/classes/currencies.php files - as pointed out to you the latter is missing: function get_decimal_places($code) { return $this->currencies[$code]['decimal_places']; } if you add that into admin/includes/classes/currencies.php then the order editor add on should work. You may also have to cast the value at line 29 to an integer: 'decimal_places' => (int)$currencies['decimal_places'], Shipping modules were never designed to be pulled into the admin side of things - when they are then you also need to have all the catalog operations available to them so, in this case the error lies in a combination or order editor and the stock code - not the shipping module. This has always been the case with osCommerce (at least since 2006) - that get_decimal_places is missing from the admin class.
  14. Bob Terveuren

    Product Info CLASS in 2.4

    If you are going to produce these would a $currencies -> display_saving() (i.e. You save £XXX) be possible - if that gets hooked into product_listing & product_info then it attracts attention
  15. Bob Terveuren

    Cron Simulator

    Mr_a - the code may be correct but the error message is telling you that it is being called more than once probably because it looks as though both compatability.php files (admin / catalog) are being called someplace in the code Idealy you'd weed through the code and work out what/where/when/why but that may take sometime - here's a very hacky suggestion that may fix the problem but not screw up anything else.... Actually, having looked at the file at: /home/user/public_html/includes/functions/compatibility.php the 'hacky' stuff is in there but not for that function - go to that file and it will have the code as you posted: function do_magic_quotes_gpc(&$ar) { if (!is_array($ar)) return false; reset($ar); while (list($key, $value) = each($ar)) { if (is_array($ar[$key])) { do_magic_quotes_gpc($ar[$key]); } else { $ar[$key] = addslashes($value); } } reset($ar); } Now wrap that in a if (!function_exists('blah de blah')) {} : if (!function_exists('do_magic_quotes_gpc')) { //---------------------------- function do_magic_quotes_gpc(&$ar) { if (!is_array($ar)) return false; reset($ar); while (list($key, $value) = each($ar)) { if (is_array($ar[$key])) { do_magic_quotes_gpc($ar[$key]); } else { $ar[$key] = addslashes($value); } } reset($ar); } //------------------------------- } If you look further into the file you'll see similar wraps
×