Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


ohno last won the day on March 28 2020

ohno had the most liked content!

Community Reputation

2 Neutral

About ohno

  • Rank
    Regular Member
  1. To add, some delivery methods have delivery on a Saturday.
  2. Sorry, I don't follow? Probably because I've been staring at this all day!!
  3. Pasted on phone and can't see how to format code on a mobile browser?? Sorry!
  4. I thought I’d sorted this but alas, no <?php class BoDelivery { public function EstimatedDaysWithHoliday($off, $days, $saturday) { require_once FILE_ROOT . '/data_objects/do_settings.php'; $doSettings = new DoSettings(); // Holidays that happen every year in MM-DD format. $holidays_every_year=($doSettings->GetSetting(51)); $date_array= explode(',',$holidays_every_year); $holidays_every_year= array(); foreach ($date_array as $value) { trim($value); if (strtotime($value)=== false ){ //bad date }else{ $holidays_every_year[] = date('m-d',str
  5. Thanks for replying. Of what I can gather, delivery is always 1 day, $off is the cutoff time for delivery that day, eg, after 4pm that delivery will not ship that day, it will ship the next business day. $standard_days is the number of business days for delivery. $saturday is whether delivery can happen on a Saturday (so if a user orders on a Friday & selects Saturday delivery). But Saturdays should NOT count towards delivery progress for other delivery options. $delay adds day(s) as required to the delivery progress. This is how the function is currently being used :- // Est D
  6. I have this block of code that was written by someone years ago :- <?php class BoDelivery { public function EstimatedDays($off, $standard_days, $saturday, $delay) { $today = date("N"); // Weekday - number 1-7 $now = strtotime("now"); // Unix $off_array = explode(":", str_replace(".", ":", $off)); $off_unix = mktime($off_array[0], $off_array[1], "00", date("n"), date("j"), date("Y")); $sending_days_from_now = 0; if ($now > $off_unix) { $sending_
  7. Thanks, fixed that issue now the payment page has a whole load of similar errors! <input <?php if (isset($_smarty_tpl->tpl_vars['cart']->value->mErrors['BillingFirstName'])) {?>class="error"<?php }?> type="text" name="BillingFirstName" tabindex="8" maxlength="25" value="<?php echo $_smarty_tpl->tpl_vars['cart']->value->mVars['BillingFirstName'];?> Stuck on this one TBH!
  8. Not sure how to find what is causing my issue here, I'm running smarty which gives me this error if I switch PHP version to 7.4 (was on 7.3) : - The line the error refers to is this : - <p class="cart_del_info_box_text"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <span class="cart_del_info_box_message"><?php echo $_smarty_tpl->tpl_vars['cart']->value->mDelivery['cartdeliverymessage'];?> How do I go about finding which file has the actual problem? Thanks for any pointers.
  9. This is what he did..... new function.load_search_query.php file <?php function smarty_function_load_search_query($params, $smarty) { $query = new SearchQuery(); $smarty->assign('query', $query->readFromRequest()); } class SearchQuery { public $value = ""; public static function readFromRequest() { $query = new self(); if (isset($_GET["search"]) && is_string($_GET["search"])) { $query->value = $_GET["search"]; } return $query; } } ?> Modified function.load_search.php : - fu
  10. Thanks again hopefully they can sort the issue now.
  11. Thanks, I'll pass this onto a developer who has been doing other work on my site (as I have no clue where the above code would be used!). Thanks for your help, would the above code fix both errors?
  12. Could I simply do : - $this->mSearchString = str_replace ( "[", " ",($_REQUEST['search'])); To prevent an array in the search?
  13. That gives a slightly different error in the log : - ERRNO: 2 TEXT: trim() expects parameter 1 to be string, array given LOCATION: /home/website/public_html/smarty_plugins/function.load_search.php, line 27, at April 20, 2020, 7:00 pm function.load_search.php is above too. Now, I have no clue how to fix it! Any idea's what code I'd need to fix it?
  14. function.load_product.php IS the above code. The tpl was already posted, it's this code : - {load_chat assign="chat"} {if $chat->mChat} <script type="text/javascript" id="763333b0f312f025d780a8f4451bf6f3" src="https://www.siteaddress.com/online-support/script.php?id=763333b0f312f025d780a8f4451bf6f3"></script> {/if} {if !$chat->mChat && $settings->mSettings[13]} <script type="text/javascript" id="aaa07817d7cd2a7dce9e0ffac6286dbb" src="https://www.siteaddress.com/online-support/script.php?id=aaa07817d7cd2a7dce9e0ffac6286dbb"></script> {/if} &
  15. <?php function smarty_function_load_product($params, $smarty) { $product = new Product(); $product->init($params['dir']); $smarty->assign($params['assign'], $product); } class Product { // public fields public $mProduct; //public $mImages; //public $mImageCount; public $mOptions; public $mXsells; // private fields private $mDoSettings; private $mDoCatalogue; function __construct() { require_once FILE_ROOT . '/data_objects/do_settings.php'; $this->mDoSettings = new DoSettings(); requi
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.