Jump to content

microchef2

Members
  • Content count

    41
  • Joined

  • Last visited

  1. microchef2

    Graphical Borders

    Hi I was wondering if it's possible to wrap the border around the individual products in the listing, rather than wrapping around all products? Please see http://www.azteconline.co.uk/index.php?cPath=32_55 includes/classes/boxes.php // Graphical Borders class productListingBox extends tableBox { function productListingBox($contents) { global $mws_headerText; echo mws_boxHeader ($mws_headerText); $this->table_parameters = 'class="productListing"'; $this->tableBox($contents, true); $mws_headerText = ''; echo mws_boxFooter (); } } // Graphical Borders - end modification includes/mws_functions.php //**product listing**// function mws_boxHeader ($msg='') { $output = ' <table align="center" width="608" height="123" border="0" cellpadding="0" cellspacing="0"> <tr> </tr> <tr> <td> <table align="center" width="608" height="88" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="3"><img src="../images/listings/thumblist_top.jpg" width="608" height="9" alt="" /></td> </tr> <tr> <td background="../images/listings/thumblist_left.jpg"><img src="../images/listings/thumblist_left.jpg" width="6" height="64" alt="" /></td> <td width="595" height="64" valign="top"> <table width="595" border="0" cellpadding="4" cellspacing="0"> <tr> <td valign="top" colspan="2"></td>'; return $output; } function mws_boxFooter ($msg='') { $output = ' <td background="../images/listings/thumblist_right.jpg"><img src="../images/listings/thumblist_right.jpg" width="7" height="64" alt=""></td> </tr> <tr> <td align="center" colspan="3"><img src="../images/listings/thumblist_bottom.jpg" width="608" height="15" alt=""></td> </tr> </table> </tr> </table> '; return $output; } //**product listing**// Thanks!
  2. microchef2

    Make Reviews Optional

    Hi All I've been trying to get (Make Reviews Optional) to work http://addons.oscommerce.com/info/5677 However when i set to active on admin, page loads but it don't work and reviews still appears in product info, even though it is set to inactive Can any one help? There are a few mistakes in the install text provided I will just list them anyway, incase anyone else has this problem! Make changes in admin/categories.php add p.products_reviews_optional in the two $products_query = tep_db_query around line 830 Should be add p.products_reviews_optional, in the two $products_query = tep_db_query around line 830 & Make changes in product_info.php Add p.products_reviews_optional to the $product_info_query = tep_db_query on line 85 Should be Add p.products_reviews_optional, to the $product_info_query = tep_db_query on line 85 Many Thanks
  3. microchef2

    Royal Mail Complete Postal Shipping Module

    I solved the problem, using capitals in class stops the module from working
  4. microchef2

    Royal Mail Complete Postal Shipping Module

    The First and second part of this code is specnext.php located in the directories i previously mentioned. If you just save the code as a php file and load up You can get a better idea of whats going on .
  5. Hi all Ive downloaded this contribution Royal Mail Complete Postal Shipping Module. And sucessfly updated the prices and weights which i will upload as a update, however i have tried to install a new part to this module, which is special delivery next day Ive included the sample code, but i cant seam to install it :angry: , if some one could just spend five minutes taking a look at this to identify any problems :rolleyes: . /includes/modules/shipping/ <?php class SPECNEXT { var $code, $title, $description, $enabled, $num_zones; // class constructor function SPECNEXT() { $this->code = 'SPECNEXT'; $this->title = MODULE_SHIPPING_SPECNEXT_TEXT_TITLE; $this->description = MODULE_SHIPPING_SPECNEXT_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_SPECNEXT_SORT_ORDER; $this->icon = ''; $this->tax_class = MODULE_SHIPPING_SPECNEXT_TAX_CLASS; $this->enabled = ((MODULE_SHIPPING_SPECNEXT_STATUS == 'True') ? true : false); // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED $this->num_zones = 1; } // class methods function quote($method = '') { global $order, $shipping_weight, $shipping_num_boxes; $dest_country = $order->delivery['country']['iso_code_2']; $dest_zone = 0; $error = false; for ($i=1; $i<=$this->num_zones; $i++) { $countries_table = constant('MODULE_SHIPPING_SPECNEXT_COUNTRIES_' . $i); $country_zones = split("[,]", $countries_table); if (in_array($dest_country, $country_zones)) { $dest_zone = $i; break; } } // ADDITINAL INSURANCE CHARGES - EDIT WHEN THEY PUT THEM UP!! $ic = 0; if ($order->info['total'] > 500) $ic = 0; if ($order->info['total'] > 1000) $ic = 0; // END OF ADDITIONAL INSURANCE CHARGES if ($dest_zone == 0) { $error = true; } else { $shipping = -1; $zones_cost = constant('MODULE_SHIPPING_SPECNEXT_COST_' . $dest_zone); $zones_table = split("[:,]" , $zones_cost); $size = sizeof($zones_table); for ($i=0; $i<$size; $i+=2) { if ($shipping_weight <= $zones_table[$i]) { $shipping = $zones_table[$i+1]; $shipping_method = 'Urgent or higher value - Insurance Included Upto £1000'; break; } } if ($shipping == -1) { $shipping_cost = 0; $shipping_method = MODULE_SHIPPING_SPECNEXT_UNDEFINED_RATE; $error = true; } if ($order->info['total'] > 2500) { $error = true; } else { $shipping_cost = ($shipping * $shipping_num_boxes) + $ic + constant('MODULE_SHIPPING_SPECNEXT_HANDLING_' . $dest_zone); } } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_SPECNEXT_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => $shipping_method, 'cost' => $shipping_cost))); 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($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_SPECNEXT_INVALID_ZONE; 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_SPECNEXT_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 Zones Method', 'MODULE_SHIPPING_SPECNEXT_STATUS', 'True', 'Do you want to offer zone 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_SPECNEXT_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_SPECNEXT_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())"); for ($i = 1; $i <= $this->num_zones; $i++) { $default_countries = ''; if ($i == 1) { $default_countries = 'GB'; } tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Zone " . $i ." Countries', 'MODULE_SHIPPING_SPECNEXT_COUNTRIES_" . $i ."', '" . $default_countries . "', 'Comma separated list of two character ISO country codes that are part of Zone " . $i . ".', '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 ('Zone " . $i ." Shipping Table', 'MODULE_SHIPPING_SPECNEXT_COST_" . $i ."', '.1:11.55,.5:13.25,1:15.25,2:18.65, ', 'Shipping rates to Zone " . $i . " destinations based on a group of maximum order weights. Example: 3:8.50,7:10.50,... Weights less than or equal to 3 would cost 8.50 for Zone " . $i . " destinations.', '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 ('Zone " . $i ." Handling Fee', 'MODULE_SHIPPING_SPECNEXT_HANDLING_" . $i."', '0', 'Handling Fee for this shipping 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_SPECNEXT_STATUS', 'MODULE_SHIPPING_SPECNEXT_TAX_CLASS', 'MODULE_SHIPPING_SPECNEXT_SORT_ORDER'); for ($i=1; $i<=$this->num_zones; $i++) { $keys[] = 'MODULE_SHIPPING_SPECNEXT_COUNTRIES_' . $i; $keys[] = 'MODULE_SHIPPING_SPECNEXT_COST_' . $i; $keys[] = 'MODULE_SHIPPING_SPECNEXT_HANDLING_' . $i; } return $keys; } } ?> /includes/lanagues/english/modules/shipping/ <?php /* $Id: zones.php,v 1.3 2002/11/19 01:48:08 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2002 osCommerce Released under the GNU General Public License */ define('MODULE_SHIPPING_SPECNEXT_TEXT_TITLE', 'Royal Mail Special Delivery Next Day'); define('MODULE_SHIPPING_SPECNEXT_TEXT_DESCRIPTION', 'Zone Based Rates'); define('MODULE_SHIPPING_SPECNEXT_TEXT_WAY', ''); define('MODULE_SHIPPING_SPECNEXT_TEXT_UNITS', ''); define('MODULE_SHIPPING_SPECNEXT_INVALID_ZONE', 'Sorry, this shipping option is not available for this order'); define('MODULE_SHIPPING_SPECNEXT_UNDEFINED_RATE', 'The shipping rate cannot be determined at this time'); ?> many thanks
×