Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

zpupster

Members
  • Posts

    370
  • Joined

  • Last visited

Everything posted by zpupster

  1. maybe i phrased it wrong. Does anyone here on oscommerce, use or has used, shipping UPS and FEDEX addon module that works with Frozen v2341 CE . TY
  2. Hello forum, I am looking for some advice. We are using UPS XML Rates v1.6.1 for osCommerce 2.3.4 for osCommerce Online Merchant v2.3.4.1 CE frozen. We would like to add FedEx as a shipping choice. Could someone using a working shipping module that will work for our situation let us know what to use for our version of OSCommerce. TY
  3. TY Everyone , It is working now. One problem we have, our store has a buybacks form(which is more or less a duplicate of the contact_us.php form). I think I can handle adding to the module and configure it, but you never know. Thanks again for all the support you gave me.
  4. thank you I tried this-- it did not work for me I will try again.
  5. Steve, I am using siteground. Who was your host??I am having difficulty getting the google captcha to work. my contact_us.php page works fine as an outgoing mail as you stated. I can not find a captcha addon for 2341 cE, 24, and siteground does not like honeypot captcha. TY
  6. hello support, We are using: Installed Version: osCommerce Online Merchant v2.3.4.1 CE our welcome emails were getting bounced back. we contacted our host . OK so we installed Honey Pot Captcha https://apps.oscommerce.com/t3rEO&honey-pot contacted support again they responded: What would be the recommended Captcha add on to use so we can get removed from blacklist???????? TY
  7. for me in Sitemap Seo on oscommerce 2341 FrozenCE this needed to be added to english.php catalog\admin\includes\languages\ english.php /***** Begin Sitemap_SEO *****/ define('MODULES_ADMIN_MENU_HEADING_SITEMAP_SEO', 'Sitemap SEO'); define('MODULES_ADMIN_MENU_SITEMAP_SEO_BOX_CONTROL', 'Box Control'); define('MODULES_ADMIN_MENU_SITEMAP_SEO_PAGE_CONTROL', 'Page Control'); define('MODULES_ADMIN_MENU_SITEMAP_SEO_SETTINGS_CONTROL', 'Settings Control'); /***** End Sitemap_SEO *****/ @Jack_mcs
  8. ok, thinking about this. 1) i need to turn off the ups module. this piece of code might do that, any suggestions where to place in the upsxml 1.7 module? if ($check_flag == false) { $this->enabled = false; } } if ($total_weight < 150) { $this->enabled = false; } i would have change direction of inequality sign. i tried many things, replacing this return $this->quotes; with this $this->description tried commenting this out. $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_RFQ_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_RFQ_TEXT_WAY, 'cost' => MODULE_SHIPPING_RFQ_COST))); no errors just breaks. any hints?? Z
  9. hello support, using oscomm 2341 and on host's php 7.1 i have an old shipping module add on --that currently works like this(see pic). it warns that this is a freight order (over 150 lbs) and has to be called in. but ideally, we would like the ups shipping quotes NOT to show, and just have the message to call in the order i am guessing where this is return $this->quotes; I would stop this or replace it with the text includes>languages>english>modules>shipping define('MODULE_SHIPPING_RFQ_TEXT_DESCRIPTION', '<div class="alert-success">Call 1-800-555-5555 -- MUST CALL TO COMPLETE FREIGHT ORDERS.</div>'); Please advise, Z herre is the code: <?php /* $Id: rfq.php,v 1.3 2006/02/13 14:29:56 naegle Exp $ Based upon flat.php / spu.php by M. Halvorsen (http://www.arachnia-web.com) osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License CHANGES: NOV-20-05 - formatted to work with latest checkout procedure - updated the db queries CHANGES: NOV-21-05 - included icon - fixed table configuration CHANGES: FEB-13-06 - Added Disable Zone */ class rfq { var $code, $title, $description, $icon, $enabled; // class constructor function rfq() { global $order, $total_weight; $this->code = 'rfq'; $this->title = MODULE_SHIPPING_RFQ_TEXT_TITLE; $this->description = MODULE_SHIPPING_RFQ_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_RFQ_SORT_ORDER; // $this->icon = 'images/icons/shipping_rfq.gif'; $this->enabled = ((MODULE_SHIPPING_RFQ_STATUS == 'True') ? true : false); if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_RFQ_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_RQF_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; } } if ($total_weight < 150) { $this->enabled = false; } } // class methods function quote($method = '') { global $order; $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_RFQ_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_RFQ_TEXT_WAY, 'cost' => MODULE_SHIPPING_RFQ_COST))); if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->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_RFQ_STATUS'"); $this->_check = tep_db_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 Shipping Quotes', 'MODULE_SHIPPING_RFQ_STATUS', 'True', 'Do you want to offer shipping quotes?', '6', '6', '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, date_added) values ('Quote Fee', 'MODULE_SHIPPING_RFQ_COST', '0.00', 'What is the Quote Fee?', '6', '6', 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 ('Shipping Zone', 'MODULE_SHIPPING_RFQ_ZONE', '0', 'If a zone is selected, DISABLE this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_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_RFQ_SORT_ORDER', '6', 'Sort order of display.', '6', '6', now())"); } function remove() { $keys = ''; $keys_array = $this->keys(); for ($i=0; $i<sizeof($keys_array); $i++) { $keys .= "'" . $keys_array[$i] . "',"; } $keys = substr($keys, 0, -1); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_SHIPPING_RFQ_STATUS', 'MODULE_SHIPPING_RFQ_COST', 'MODULE_SHIPPING_RFQ_SORT_ORDER', 'MODULE_SHIPPING_RFQ_ZONE'); } } ?>
  10. @Jack, will this work on osc2341CE with php 7.1?? Z
  11. thanks Jack, what i posted was how it appeared. I reloaded the instructions page and it is now corrected. TY again Z
  12. hello support, i am using frozen 2341CE, with php 7.1. trying to install oscom-ultimate-seo-urls-36rDo-CPS2y. in the instructions it states to find this in: STEP #4 - Edit admin/categories.php //// // Ultimate SEO URLs v2.2d // The HTML href link wrapper function function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { global $seo_urls; if ( !is_object($seo_urls) ){ if ( !class_exists('SEO_URL') ){ include_once('includes/classes/seo.class.php'); } global $languages_id; $seo_urls = new SEO_URL($languages_id); } return $seo_urls->href_link($page, $parameters, $connection, $add_session_id); } and add after: // Ultimate SEO URLs v2.2d // If the action will affect the cache entries if ( preg_match("/(insert|update|setflag)/i", $action) ) include_once('includes/reset_seo_cache.php'); searching for pieces of the code or searching the whole site for wrapper function I can not find something resembling the code so where do i put the new suggested code??? Z
  13. yes that did it. Thank you PuddleC Z
  14. i changed to cm_i_carousel i used the original code below -- and it works--all except the images will not appear on the index page-- the carousel arrows do. I have used /images/ and /images and images/ and just plain images in place of DIR_WS_IMAGES. I have used single quotes -double quotes and no quotes , parentheses i guess my question what needs to go there?? if ($banner['banners_image'] !== '') { //$wrapper_slides .= tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_html_text']); $wrapper_slides .= tep_image(DIR_WS_IMAGES . $banner['banners_image'], '', 800, 400); $wrapper_slides .= '<div class="carousel-caption"> </div>'; } else { //$wrapper_slides .= tep_image(DIR_WS_IMAGES . 'pixel_silver.gif', 'alt', 544, 172 ); $wrapper_slides .= '<img class="img-responsive" alt="544x172" src="' . $background . '" />'; $wrapper_slides .= '<div class="carousel-caption">' . $banner['banners_html_text'] . '</div>'; }
  15. TY puddleC, I removed that dot before when i replaced it this error returned: Parse error: syntax error, unexpected '$wrapper_slides' (T_VARIABLE) in catalog/includes/modules/content/index/cm_i_carousel.php on line 93
  16. support, i have an old add on from here: we are presently updating our website. using frozen 2341CE and our host php7.1. we like this addon i have eliminated all errors but it is not showing in content modules to be installed. below is the code. Z catalog\includes\modules\content\index\templates\tpl_cm_i_carousel.php <!-- <div id="carousel" class="col-sm->--> <?php /* echo $content_width; */?> <div id="carousel" class="banner-width"> <?php echo $carousel; ?> </div> catalog\includes\languages\english\modules\content\index\cm_i_carousel.php <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2014 osCommerce Released under the GNU General Public License */ //const MODULE_FRONT_PAGE_BANNER_ROTATOR_TITLE = 'Carousel Banners For Home Page'; //const MODULE_FRONT_PAGE_BANNER_ROTATOR_DESCRIPTION = 'Adds a carousel to Home Page with banner images set from Banner Manager.'; define('MODULE_FRONT_PAGE_BANNER_ROTATOR_TITLE ', 'Carousel Banners For Home Page'); define('MODULE_FRONT_PAGE_BANNER_ROTATOR_DESCRIPTION ', 'Adds a carousel to Home Page with banner images set from Banner Manager.'); ?> catalog\includes\modules\content\index\cm_i_carousel.php <?php /* $Id: banner_rotator.php v1.1.2 20110108 Kymation $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ class cm_carousel { var $code; var $group; var $title; var $description; var $sort_order; var $enabled = false; function __construct() { $this->code = get_class($this); $this->group = basename(dirname(__FILE__)); $this->title = MODULE_FRONT_PAGE_BANNER_ROTATOR_TITLE; $this->description = MODULE_FRONT_PAGE_BANNER_ROTATOR_DESCRIPTION; if (defined('MODULE_FRONT_PAGE_BANNER_ROTATOR_STATUS')) { $this->sort_order = MODULE_FRONT_PAGE_BANNER_ROTATOR_SORT_ORDER; $this->enabled = (MODULE_FRONT_PAGE_BANNER_ROTATOR_STATUS == 'True'); } } function execute() { global $PHP_SELF, $oscTemplate, $cPath; $content_width = (int)MODULE_FRONT_PAGE_BANNER_ROTATOR_CONTENT_WIDTH; if ($PHP_SELF == 'index.php' && $cPath == '') { // Set the Javascript to go in the header $footer_scripts = '<script>' . '$(\'#carousel-example-generic.carousel\').carousel({ interval: ' . ( int ) MODULE_FRONT_PAGE_BANNER_ROTATOR_HOLD_TIME . '})' . "\n" .'</script>'; $oscTemplate->addBlock($footer_scripts, 'footer_scripts'); // Set the banner rotator code to display on the front page $banner_query_raw = " select banners_id, banners_url, banners_image, banners_html_text from " . TABLE_BANNERS . " where banners_group = '" . MODULE_FRONT_PAGE_BANNER_ROTATOR_GROUP . "' and status order by banners_id " . MODULE_FRONT_PAGE_BANNER_ROTATOR_BANNER_ORDER . " limit " . MODULE_FRONT_PAGE_BANNER_ROTATOR_MAX_DISPLAY; $banner_query = tep_db_query($banner_query_raw); if (tep_db_num_rows($banner_query) > 0) { $body_text = '<!-- Banner Rotator BOF -->' . "\n"; $body_text .= ' <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">' . "\n"; $indicators = '<!-- Indicators --> <ol class="carousel-indicators">'; $wrapper_slides = '<!-- Wrapper for slides -->' . "\n" . '<div class="carousel-inner">'; $background = $this->createImage(800, 400, 118, 115, 115); $counter = 0; while ($banner = tep_db_fetch_array($banner_query)) { $indicators .= ' <li data-target="#carousel-example-generic" data-slide-to="' . $counter . '"' . ($counter == 0 ? 'class="active"' : '') . '></li>'; $wrapper_slides .= ' <div class="item' . ($counter == 0 ? ' active' : '') . '">'; if ($banner['banners_url'] != '') { $wrapper_slides .= '<a href="' . tep_href_link('redirect.php', 'action=banner&goto=' . $banner['banners_id']) . '">'; } //$wrapper_slides .= tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_html_text']); if ($banner['banners_image'] !== '') { //$wrapper_slides .= tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_html_text']); $wrapper_slides .= tep_image(images/ $banner['banners_image'], '', 800, 400); $wrapper_slides .= '<div class="carousel-caption"> </div>'; } else { //$wrapper_slides .= tep_image(DIR_WS_IMAGES . 'pixel_silver.gif', 'alt', 544, 172 ); $wrapper_slides .= '<img class="img-responsive" alt="544x172" src="' . $background . '" />'; $wrapper_slides .= '<div class="carousel-caption">' . $banner['banners_html_text'] . '</div>'; } if ($banner['banners_url'] != '') { $wrapper_slides .= '</a>'; } $wrapper_slides .= ' </div>' . "\n"; $counter++; } $indicators .= '</ol>'; // close indicator $wrapper_slides .= '</div>'; // wrapper close $controls = ' <!-- Controls --> <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left"></span> </a> <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"> <span class="glyphicon glyphicon-chevron-right"></span> </a>'; // öszefuzés $body_text .= $indicators . $wrapper_slides . $controls; $body_text .= ' </div><p> </p>' . "\n"; $body_text .= ' <div class="clearfix"></div>' . "\n"; $body_text .= '<!-- Banner Rotator EOF -->' . "\n"; $carousel = $body_text; } ob_start(); include('includes/modules/content/' . $this->group . '/templates/tpl_cm_i_carousel.php'); $template = ob_get_clean(); $oscTemplate->addContent($template, $this->group); } } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_FRONT_PAGE_BANNER_ROTATOR_STATUS'); } function install() { tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_CONTENT_WIDTH', '12', 'What width container should the content be shown in?', '6', '1', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Banner Rotator', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_STATUS', 'True', 'Do you want to show the banner rotator?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Hold Time', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_HOLD_TIME', '4000', 'The time each banner is shown. 1000 = 1 second', '6', '0', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Banner Order', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_BANNER_ORDER', 'Desc', 'Order that the Banner Rotator uses to show the banners.', '6', '0', 'tep_cfg_select_option(array(\'Asc\', \'Desc\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Banner Rotator Group', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_GROUP', 'rotator', 'Name of the banner group that the Banner Rotator uses to show the banners.', '6', '0', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Banner Rotator Max Banners', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_MAX_DISPLAY', '6', 'Maximum number of banners that the Banner Rotator will show', '6', '0', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array ( 'MODULE_FRONT_PAGE_BANNER_ROTATOR_CONTENT_WIDTH', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_STATUS', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_SORT_ORDER', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_HOLD_TIME', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_BANNER_ORDER', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_GROUP', 'MODULE_FRONT_PAGE_BANNER_ROTATOR_MAX_DISPLAY' ); } function createImage($width = 800, $height = 400, $red = 255, $green = 0, $blue = 0) { $im = imagecreatetruecolor($width, $height); // sets background to red $color = imagecolorallocate($im, (int)$red, (int)$green, (int)$blue); imagefill($im, 0, 0, $color); //header('Content-type: image/png'); ob_start(); imagepng($im); $contents = ob_get_contents(); ob_end_clean(); imagedestroy($im); $imgData = base64_encode($contents); $src = 'data: image/png;base64,'.$imgData; return $src; } } ?>
  17. ty Jack mcs, must have been a mistake reinstalled works fine. z
  18. Hello support, I am testing oscommerce 2341Ce -frozen using php 7.1 I am looking for UPSXML latest version that works. I tried UPSXML 1.5 and tried trouble shooting the errors but could not succeed. I tried UPS Choice 1.83 with this error: Fatal error: Uncaught Error: Class 'httpClient' not found in ........../includes/modules/shipping/ups.php on line 265 I tried the this fix but no success: if ($http->Connect('www.ups.com', 80)) { To.... if ($http->Connect('ssl://www.ups.com', 443)) Has anyone had success with UPS addon for oscommerce 2341Ce -frozen using php 7.1
  19. Hello support, I am using oscommerce 234 gold edition. looking for an add on that turns categories on and off in the admin. tried 2 and they did not fit to my version of oscommerce. if some kind soul could advise me of a good add on. Craig
  20. Hello Jim, I installed a fresh bsgold 234. i could not get gary's slideshow to work -which is frustrating because i have it working on another site. so i gave yous a try. I am getting duplicate sub categories . my categories_description structure and on the category page shown. I am not sure where it is coming from. craig
  21. it is strange because this has been working well for years. Ultimate_SEO_URLSv22d_14a?? is the latest seo url?
  22. yes they all look like this: http://thesite.com/string-p-1032.html http://thesite.com/string-p-132.html first click on first category like this: http://thesite.com/string-c-22.html?osCsid=2d2f3b411c65b7baf97e9c971b7bd18a and then http://thesite.com/string-c-22.html http://thesite.com/string-c-45.html i do not where it came from or how to track this down, searching my site for string well that would be difficult due to many appearances. is it just putting the word string for empty quotes.??? i will wait for a response but Jack if you do not have an answer then i will probably uninstall and reinstall. what is the preferred version for BSGold? thanks, craig
  23. Hello, i am using oscommerce 234 bootstrap-Gold. with osc234_AddOns\Ultimate_SEO_URLSv22d_14a recently my urls look like this, i do not why the string suddenly appeared in the URL. http://thesite.com/string-p-1032.html my settings are attached
  24. this is what did it: if ($total_weight < 150) { $this->enabled = false; } and of course used the global: $total_weight it took awhile but thank you for putting me on the right track, TY, craig
  25. Jim, my thinking is like this, if i add the global variable like this to class method in the freight request module below: global $order, $shipping_weight, and put a statement in like this: $shipping_weight = ($shipping_weight < 150 ? 150 : $shipping_weight); and this is where i have trouble to turn off request freight module: if ($check_flag == false) { $this->enabled = false; } this is the request freight module that appears all the time, we would like it to appear only if the weight is over 150. <?php /* $Id: rfq.php,v 1.3 2006/02/13 14:29:56 naegle Exp $ Based upon flat.php / spu.php by M. Halvorsen (http://www.arachnia-web.com) osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License CHANGES: NOV-20-05 - formatted to work with latest checkout procedure - updated the db queries CHANGES: NOV-21-05 - included icon - fixed table configuration CHANGES: FEB-13-06 - Added Disable Zone */ class rfq { var $code, $title, $description, $icon, $enabled; // class constructor function rfq() { global $order; $this->code = 'rfq'; $this->title = MODULE_SHIPPING_RFQ_TEXT_TITLE; $this->description = MODULE_SHIPPING_RFQ_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_RFQ_SORT_ORDER; $this->icon = DIR_WS_ICONS . 'shipping_rfq.gif'; $this->enabled = ((MODULE_SHIPPING_RFQ_STATUS == 'True') ? true : false); if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_RFQ_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_RQF_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; } } } // class methods function quote($method = '') { global $order; $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_RFQ_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_RFQ_TEXT_WAY, 'cost' => MODULE_SHIPPING_RFQ_COST))); if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->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_RFQ_STATUS'"); $this->_check = tep_db_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 Shipping Quotes', 'MODULE_SHIPPING_RFQ_STATUS', 'True', 'Do you want to offer shipping quotes?', '6', '6', '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, date_added) values ('Quote Fee', 'MODULE_SHIPPING_RFQ_COST', '0.00', 'What is the Quote Fee?', '6', '6', 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 ('Shipping Zone', 'MODULE_SHIPPING_RFQ_ZONE', '0', 'If a zone is selected, DISABLE this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_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_RFQ_SORT_ORDER', '6', 'Sort order of display.', '6', '6', now())"); } function remove() { $keys = ''; $keys_array = $this->keys(); for ($i=0; $i<sizeof($keys_array); $i++) { $keys .= "'" . $keys_array[$i] . "',"; } $keys = substr($keys, 0, -1); tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_SHIPPING_RFQ_STATUS', 'MODULE_SHIPPING_RFQ_COST', 'MODULE_SHIPPING_RFQ_SORT_ORDER', 'MODULE_SHIPPING_RFQ_ZONE'); } } ?> take a look, if you can advise me that would be great!! ty again, craig
×
×
  • Create New...