Jump to content

ricksteruk2005

Members
  • Content count

    264
  • Joined

  • Last visited

Everything posted by ricksteruk2005

  1. Hi Guys My webhosts decided to upgrade to php 5.3 which caused a whole range of issues. I have managed to solve them all except for the MZMT.php file. I have replaced the Split function with preg_split however I now get a headers can not be sent message Can someone please tell me where im going wrong. Below is my MZMT file <?php /* $Id: mzmt.php,v 1.100 2004-11-09 Josh Dechant Exp $ Copyright (c) 2004 Josh Dechant osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Protions Copyright (c) 2003 osCommerce Released under the GNU General Public License */ class mzmt { var $code, $title, $description, $icon, $enabled, $num_zones, $num_tables, $delivery_geozone, $geozone_mode, $order_total; function mzmt() { global $order; $this->code = 'mzmt'; $this->title = MODULE_SHIPPING_MZMT_TEXT_TITLE; $this->description = MODULE_SHIPPING_MZMT_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_MZMT_SORT_ORDER; $this->tax_class = MODULE_SHIPPING_MZMT_TAX_CLASS; $this->enabled = ((MODULE_SHIPPING_MZMT_STATUS == 'True') ? true : false); $this->num_geozones = MODULE_SHIPPING_MZMT_NUMBER_GEOZONES; $this->num_tables = MODULE_SHIPPING_MZMT_NUMBER_TABLES; if ($this->enabled == true) { $this->enabled = false; for ($n=1; $n<=$this->num_geozones; $n++) { if ( ((int)constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $n . '_ID') > 0) && ((int)constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $n . '_ID') == $this->getGeoZoneID($order->delivery['country']['id'], $order->delivery['zone_id'])) ) { $this->enabled = true; $this->delivery_geozone = $n; break; } elseif ( ((int)constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $n . '_ID') == 0) && ($n == (int)$this->num_geozones) ) { $this->enabled = true; $this->delivery_geozone = $n; break; } } } } // class methods function quote($method = '') { global $order, $shipping_weight, $shipping_num_boxes; $combined_quote_weight = ($shipping_num_boxes * $shipping_weight); $this->quotes = array('id' => $this->code, 'module' => constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TEXT_TITLE') . ' (' . $combined_quote_weight . ' Kgs)', 'methods' => array()); $this->determineTableMethod(constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_MODE')); if ($method) { $j = substr($method, 5); $shipping = $this->determineShipping(preg_split("/[:,]/", constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j))); $this->quotes['methods'][] = array('id' => 'table' . $j, 'title' => constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j . '_TEXT_WAY'). ' (' . $combined_quote_weight . ' Kgs)', 'cost' => $shipping + constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_HANDLING')); } else { for ($j=1; $j<=$this->num_tables; $j++) { if (!tep_not_null(constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j))) continue; $shipping = $this->determineShipping(preg_split("/[:,]/", constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j))); $this->quotes['methods'][] = array('id' => 'table' . $j, 'title' => constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_TABLE_' . $j . '_TEXT_WAY'). ' (' . $combined_quote_weight . ' Kgs)', 'cost' => $shipping + constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_HANDLING')); } } if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } if (tep_not_null(constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_ICON'))) $this->quotes['icon'] = tep_image(DIR_WS_ICONS . constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $this->delivery_geozone . '_ICON'), $this->title); return $this->quotes; } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_MZMT_STATUS'"); $this->_check = mysql_num_rows($check_query); } return $this->_check; } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Enable MultiRegion MultiTable Method', 'MODULE_SHIPPING_MZMT_STATUS', 'True', 'Do you want to offer multi-region multi-table rate shipping?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_MZMT_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_MZMT_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())"); for ($n=1; $n<=$this->num_geozones; $n++) { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('<hr />Geo Zone $n', 'MODULE_SHIPPING_MZMT_GEOZONE_{$n}_ID', '', 'Enable this for the following geo zone.', '6', '0', 'tep_get_zone_class_title', '_cfg_pull_down_geozones(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Geo Zone $n Table Method', 'MODULE_SHIPPING_MZMT_GEOZONE_{$n}_MODE', 'weight', 'The shipping cost is based on the total weight, total price, or total count of the items ordered.', '6', '0', 'tep_cfg_select_option(array(\'weight\', \'price\', \'count\'), ', now())"); for ($j=1; $j<=$this->num_tables; $j++) { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Geo Zone $n Shipping Table $j', 'MODULE_SHIPPING_MZMT_GEOZONE_{$n}_TABLE_{$j}', '', 'Shipping table $j for this geo zone', '6', '0', now())"); } tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Geo Zone $n Handling Fee', 'MODULE_SHIPPING_MZMT_GEOZONE_{$n}_HANDLING', '0', 'Handling Fee for this shipping geo zone', '6', '0', now())"); } } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { $keys = array('MODULE_SHIPPING_MZMT_STATUS', 'MODULE_SHIPPING_MZMT_TAX_CLASS', 'MODULE_SHIPPING_MZMT_SORT_ORDER'); for ($n=1; $n<=$this->num_geozones; $n++) { $keys[] = 'MODULE_SHIPPING_MZMT_GEOZONE_' . $n . '_ID'; $keys[] = 'MODULE_SHIPPING_MZMT_GEOZONE_' . $n . '_MODE'; $keys[] = 'MODULE_SHIPPING_MZMT_GEOZONE_' . $n . '_HANDLING'; for ($j=1; $j<=$this->num_tables; $j++) { $keys[] = 'MODULE_SHIPPING_MZMT_GEOZONE_' . $n . '_TABLE_' . $j; } } return $keys; } function determineTableMethod($geozone_mode) { global $total_count, $shipping_weight; $this->geozone_mode = $geozone_mode; if ($this->geozone_mode == 'price') { $this->order_total = $_SESSION['cart']->show_total(); } elseif ($this->geozone_mode == 'count') { $this->order_total = $total_count; } else { $this->order_total = $shipping_weight; } return true; } function determineShipping($table_cost) { global $shipping_num_boxes; for ($i=0, $n=sizeof($table_cost); $i<$n; $i+=2) { if ($this->order_total >= $table_cost[$i]) { $shipping_factor = $table_cost[$i+1]; } } if (substr_count($shipping_factor, '%') > 0) { $shipping = ((($this->order_total*10)/10)*((str_replace('%', '', $shipping_factor))/100)); } else { $shipping = str_replace('$', '', $shipping_factor); } if ($this->geozone_mode == 'weight') { $shipping = $shipping * $shipping_num_boxes; } return $shipping; } function getGeoZoneID($country_id, $zone_id) { // First, check for a Geo Zone that explicity includes the country & specific zone (useful for splitting countries with zones up) $zone_query = tep_db_query("select gz.geo_zone_id from " . TABLE_GEO_ZONES . " gz left join " . TABLE_ZONES_TO_GEO_ZONES . " ztgz on (gz.geo_zone_id = ztgz.geo_zone_id) where ztgz.zone_country_id = '" . (int)$country_id . "' and ztgz.zone_id = '" . (int)$zone_id . "' and LOWER(gz.geo_zone_name) like 'shp%'"); if (mysql_num_rows($zone_query)) { $zone = mysql_fetch_assoc($zone_query); return $zone['geo_zone_id']; } else { // No luck… Now check for a Geo Zone for the country and "All Zones" of the country. $zone_query = tep_db_query("select gz.geo_zone_id from " . TABLE_GEO_ZONES . " gz left join " . TABLE_ZONES_TO_GEO_ZONES . " ztgz on (gz.geo_zone_id = ztgz.geo_zone_id) where ztgz.zone_country_id = '" . (int)$country_id . "' and (ztgz.zone_id = '0' or ztgz.zone_id is NULL) and LOWER(gz.geo_zone_name) like 'shp%'"); if (mysql_num_rows($zone_query)) { $zone = mysql_fetch_assoc($zone_query); return $zone['geo_zone_id']; } else { return false; } } } } function _cfg_pull_down_geozones($zone_class_id, $key = '') { $name = (($key) ? 'configuration[' . $key . ']' : 'configuration_value' . print 'hello'); $zone_class_array = array(array('id' => '0', 'text' => 'Rest of the World')); $zone_class_query = tep_db_query("select geo_zone_id, geo_zone_name from " . TABLE_GEO_ZONES . " where LOWER(geo_zone_name) like 'shp%' order by geo_zone_name"); while ($zone_class = mysql_fetch_assoc($zone_class_query)) { $zone_class_array[] = array('id' => $zone_class['geo_zone_id'], 'text' => $zone_class['geo_zone_name']); } return tep_draw_pull_down_menu($name, $zone_class_array, $zone_class_id); } ?>
  2. ricksteruk2005

    HSBC secure-epayment module

    Im also having a issue where no hash is being created. I have all the files in the CGI_BIN folder, permissions set to 755, I have also placed the 2 share lib files into the same directory (although the hosts say they are on the server) The paths are set correctly and nothing! I am interested in the downhome mod but I cant find anywhere to download it or even if gary would like to post how he fixed it using Orderhash.php i would be very great full. I have spent months trying to get this working on and off!
  3. ricksteruk2005

    Additional Orders Info

    Sorry PWA IS installed
  4. ricksteruk2005

    Additional Orders Info

    Hi Sorry for the delay, there is no contribution that alters the checkout process its ms2.2rc2 installed?
  5. ricksteruk2005

    Additional Orders Info

    Hi there, Im having a strange issue with this contribution where if i click on "click to see other orders" it is not showing me other orders this customer has made. For some reason the OID is defaulting to 80, for example if i look at a order i have a url like this shop/admin/orders.php?page=1&oID=194 If i click on the link to view other orders i have the following link shop/admin/orders.php?cID=80 One order will be in the name of bloggs and the other in smith so they are not even the same customer?
  6. ricksteruk2005

    ULTIMATE Seo Urls 5 - by FWR Media

    I dont have a option in admin to change this: true Info Add cPath to product URLs? false Info Add category parent to begining of URLs? true Info Filter Short Words 1 Info Output W3C valid URLs (parameter string)? true Info Enable SEO cache to save queries? false Info Enable product cache? false Info Enable categories cache? true Info Enable manufacturers cache? true Info Enable articles cache? true Info Enable topics cache? true Info Enable information cache? true Info Enable link directory cache? true Info Enable automatic redirects? true Info Choose URL Rewrite Type Rewrite Enter special character conversions Info Remove all non-alphanumeric characters? true Info Reset SEO URLs Cache Info If i click on edit on choose url rewrite i dont have any other options?
  7. ricksteruk2005

    ULTIMATE Seo Urls 5 - by FWR Media

    Hi Robert I have used this contribution on loads of sites however on one particular site it is causing me a problem and i dont know why. If you look that this link http://www.jp-tackle.co.uk/product_info.php/mitchell-premium-runner-v2-50-fr-p-11537 you can see the product_info.php appears in the url however on everyother site i have used this contribution this dont happem. Because of this it means that I cant get a lightbox contribtuion to work either (test it on this page and you will see what i mean) Any suggestions?
  8. ricksteruk2005

    PDF Catalog v.1.5

    Hi Guys I appreciate this is a old thread however, lots of people seem to have had the same issue I currently have. I can create the catalogue in admin with no issues but on the customer side, if they select to create their own catalogue the screen just refreshes and nothing seems to happen. I have checked the server and nothing gets created at all. The only option the customer has is to download a entire catalogue (80 odd MB of it) I have php5 and MYSQL 5, All the fixes etc dont seem to work. Any advice from anyone?
  9. Is the PDF catalogue contribution the worst contribution available??

    1. tjzones

      tjzones

      Possibly! never had so much difficulty with a contribution

    2. tjzones

      tjzones

      I found the answer to the issue you had with this contribution. Thought I'd share. Its because you have register globals turned off. If you turn it on, it works like a charm but, to avoid the security risk of register globals on add this code

      if (isset($_REQUEST) ) {

      foreach($_REQUEST as $key => $val) {

      $$key = $val;

      }

      }

      to the beginning of pdf_catalogue_info.php, pdf_download_katalog.php and pdf_catalogue_info2.php....

  10. ricksteruk2005

    Offical Google Checkout module for osCommerce Support Thread

    Hi all I have a bit of a problem with this module, I have it installed and working nearly correctly. I can order somthing and pay via google with no problems, the communication comes back to OSC and the order shows in admin, however if a customer orders more than one item, in orders.php I can only see the first item but the total price shows the cost of the entire order.
  11. ricksteruk2005

    Purchase Orders 1.4.1 problem

    I have also installed the v2.3.3 module however I can not get it to work? everything appears to work fine however the transaction amount is not deducted from the customers credit limit.I have checked the official support thread however that is no longer active or support. Can I ask what changes you had to make to get this module to work correctly?
  12. ricksteruk2005

    All Customers Report

    Jack your a genius, i got that bit working. Now I have another issue, Im trying to also include what people have ordered, Now if im thinking correct it would be with a left join statement but I have no idea how to do this because of matching up the CID and the OID then the products. Can you give me a example of how I would implent this into the code.
  13. ricksteruk2005

    All Customers Report

    Hi Jack, Thanks for the response, however the instructions only indicate that if the information is in the customers table the last log in etc is in Customer_info table, how would i code in the change of table in the SQL query?
  14. ricksteruk2005

    All Customers Report

    I like this contribution, however i need to be able to amend it a little, What I would like to add is date of last log on, date account created and what the customer has ordered in the past. Can someone please guide me as to the SQL command I would use and where I would need to modify it.
  15. ricksteruk2005

    modify

    Sorry wrong place.
  16. ricksteruk2005

    Recover Cart Sales

    Hi Guys, Im having a issue with RCS where the address the emails are sent from dont exsist, its simply putting in store@myservername, of course this means i dont get any replys from my would be customers. Does anyone know where the sender address gets populated from or a way of hard codeing in the correct email address?
  17. ricksteruk2005

    Header Tags SEO

    I have what the issue was Jack, and in case anyone else has the same issue it is to do with SEO URLS by FWR MEDIA, you need to ensure you change rewrite type in admin to "rewrite" from standard.
  18. ricksteruk2005

    Header Tags SEO

    no i have tried that one as well (infact it is currently using the included product_info
  19. ricksteruk2005

    Header Tags SEO

    Well, In page control the only boxes i have ticked for product_info is product and root. When i click on fill tags I have tried the top 2 options description over ride and keywords, both on and off. and clicked on fill tags etc The result for the test is Title length warning: (Suggested range is 60 to 120 characters) explain for English The Title for RGT Terminator barbless Carp hooks, Size 8 may be too short. It is 42 characters long. for English The Title for RGT Terminator Barbless Carp hooks, Size 10 may be too short. It is 43 characters long. The Title for RGT Terminator Carp Hooks, Barbless size 6 may be too short. It is 42 characters long. I have used this contribution on many sites, but this is the first time I have come accross this problem, I have even replicated the settings from another site where everything is working correctly
  20. ricksteruk2005

    Header Tags SEO

    Hi Jack I have the latest version of Header Tags installed (well i have uninstalled and reinstalled about 12 times now. I can not get it to work correctly on the product pages http://r-g-t.co.uk/product_info.php/termin...hooks-size-p-29 I have read through this thread and I have done many things suggested but i still cant it to work In admin if i go in to a product I can see the correct header tags in there, ie item name etc but I can not get this information to show on the product pages. All it is doing is entering the default stuff rather than the keywords i set when i add a product, also the title bar and the <now Viewing bit at the bottom show default information. Any suggestions?
  21. ricksteruk2005

    ULTIMATE Seo Urls 5 - by FWR Media

    I have found if i turn off the W3C Valid URLS this works (just incase someone else is having the same problem)
  22. ricksteruk2005

    ULTIMATE Seo Urls 5 - by FWR Media

    ok, any suggestions on what might be causing that. I dont have many contribs installed, SEO heade tags from Jack, magic zoom ultra pics google xml site maps Thats about all really?
  23. ricksteruk2005

    ULTIMATE Seo Urls 5 - by FWR Media

    I there, I have installed the latest version. I have everything working a treat until it comes to the buy now button. For some reason this is still not working. I have turned debugging on for you to take a look if you can help i would be greatful http://www.forplaycostumesuk.com/furry-fri...;products_id=34
  24. ricksteruk2005

    PDF Catalog v.1.5

    try adding this to your root .htaccess file php_value memory_limit 100M
  25. ricksteruk2005

    SEO Assistant

    mm i am getting this error when i try to check page rank Warning: file(http://www.google.com/search?client=navclient-auto&ch=6-1610651549&ie=UTF-8&oe=UTF-8&features=Rank&q=info:www.sweetheartsandtarts.com) [function.file]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /xxxx/cxxxxxx/Dxxxxx/xxxx/admin/includes/functions/seo_assistant.php on line 111 Warning: implode() [function.implode]: Bad arguments. in /xxxx/cxxxxxx/Dxxxxx/xxxx/admin/includes/functions/seo_assistant.php on line 112 any ideas, im using the latest version
×