Latest News: (loading..)

Bob Terveuren

  • Content count

  • Joined

  • Last visited

  • Days Won


Bob Terveuren last won the day on January 17 2016

Bob Terveuren had the most liked content!


About Bob Terveuren

Profile Information

  • Real Name
    Bob Terveuren
  • Gender
  1. Burt said: " it's a little difficult as what really needs to happen is the core to be modified to allow addons to do things without changing core" That's my wish as a developer - get the core code like WordPress so that I can come along and write a little code that is going to hook into the core and 'do stuff' - no need to edit any other files, just add your own. I have a secondary wish - adjust the checkout_process file so that there is a call to a payment module before_email() function. This can be used for 'pay way' modules (like PayPal) to intercept the checkout flow and redirect the user to the payment website - gets away from the rubbish code that puts the checkout_process code into the payment module itself (have a look at the PayPal Standard module)
  2. 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
  3. Hi - you could split the description out by space into an array and then restring the first 20 or try using str_word_count something like $words = strip_tags($featured_products['products_description']; $words = str_word_count($words); $desc = array_slice($words,20); $desc = join('',$desc); Then use $desc instead of strip_tags($featured_products['products_description']; in you code
  4. Hi Google the error Unable to determine the page link! (or search on these forums) - MS 2.2 is 'Old Skool' (like me) and there's maybe change in the PHP as it used to throw that error
  5. Hi Ken in admin/includes/application_top.php see if you can do this // set the language if (!tep_session_is_registered(‘language’) || isset($HTTP_GET_VARS[‘language’])) { replace with: // set the language if (!tep_session_is_registered(‘language’) || isset($HTTP_GET_VARS[‘language’]) || empty($language)) {
  6. Hi Looking at the install for your version: %%%Replace With: <tr bgcolor="#ebebff"> <td class="main"><?php echo TEXT_PRODUCTS_PRICE_COST; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_cost', $pInfo->products_cost, ''); ?></td> </tr> <tr bgcolor="#ebebff"> <td class="main"><?php echo TEXT_PRODUCTS_PRICE_NET; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price', $pInfo->products_price, 'onKeyUp="updateGross()"'); ?></td> </tr> try swapping in this %%%Replace With: <tr bgcolor="#ebebff"> <td class="main"><?php echo TEXT_PRODUCTS_PRICE_COST; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_cost', $pInfo->products_cost, 'onKeyUp="updateMargin()"'); ?></td> </tr> <tr bgcolor="#ebebff"> <td class="main"><?php echo TEXT_PRODUCTS_PRICE_NET; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price', $pInfo->products_price, 'onKeyUp="updateGross()"'); ?></td> </tr> i.e. add a call to the updateMargin() function - it looks like it is missing?
  7. 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!
  8. Hi - can you rename it on your local computer as a .txt, upload and then rename on the server to a .bin?
  9. Hi Peper - dirty trick? Moi? :D
  10. 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
  11. 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 Good luck Mr Bond - it's the type of job I hate......
  12. 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); } }
  13. 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
  14. 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'],
  15. 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.