Latest News: (loading..)

Jeremy at oddly enough

Members
  • Content count

    789
  • Joined

  • Last visited

1 Follower

About Jeremy at oddly enough

Profile Information

  1. It is if you have ftp access to the server, which you should have. Ask your host. Jeremy
  2. With some effort, you can pull all the data you need from the database, and output it as you see fit. You could set up a button in the admin/orders page to print an address label, just like an invoice if you like. I just have the invoice page echo the shipping address in a larger font at the bottom of the page, and I cut it off to tape to the box. If I reach a point where this is more of a hassle than a bonus, I'll work out a new method that works for me. That's the beauty of the open source and these forums isn't it? Jeremy
  3. Here's how you can check the server settings yourself: Use notepad (or other text editor) create an ASCII text file with this line: <?php phpinfo() ?> Save that file as test.php Must be a text file with .php extension - NOT test.php.txt >Upload test.php (as ASCII file) - to the server Run test.php from the browser e.g. www.domain.com/test.php This will display all the php settings.
  4. This post by terry describes the process used to duplicate a shipping module. http://forums.oscommerce.com/index.php?sho...ndpost&p=553644 This is just the sort of process I followed to make the two pages posted above. Jeremy
  5. You can try the state based rates contrib. I use two versions to provide ground and air rates for 11 regions in north america. http://www.oscommerce.com/community/contri...ion+based+rates Jeremy It says state based, but your regional can be any regional grouping you choose.
  6. Yes, I've done this, it works well! You need to simply modify the original download a bit to duplicate its function with a different name, and change the names of the tables it looks for. It is installed once unmodded, and once after you've done a find and replace to change from regions to air regions this way, with ground and air functioning the same manner. Here is the code for both the regions.php, and airregions.php to show you the minor changes you'll need to make: <?php /* $Id: regions.php, v 1.0 2002/12/15 14:29:56 Jorge Exp $ Based upon zones.php by wilt, written for: osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License ----------------------------------------------------------------------------- REGIONS - Rates Based on State or Regions (group of States) module for osC 2.2-CVS (new checkout) This module allows you create shipping regions by dividing states of the USA (or other country) in different groups. Each group will then have it's own shipping price which you can based on price or weight. This module is perfect when for those of you need to charge different when shipping to different parts of the country. Features 1..Regions can be composed of US States or of any other country 2..Order weight or price can be used to calculate shipping price. 3..Any number of regions 4..Handling fee can be added. Jorge Set the number of regions you need with $this->regions = xx; Please note that any country / state that is not in one of the groups will not be able to checkout if this the only shipping you provide. However it will display a nice message saying so. Written by Jorge (billythekid_2000@hotmail.com) */ class regions { var $code, $title, $description, $enabled, $regions; // class constructor function regions() { $this->code = 'regions'; $this->title = MODULE_SHIPPING_REGIONS_TEXT_TITLE; $this->description = MODULE_SHIPPING_REGIONS_TEXT_DESCRIPTION; $this->icon = ''; $this->enabled = MODULE_SHIPPING_REGIONS_STATUS; // CUSTOMIZE THIS SETTING FOR THE NUMBER OF States NEEDED $this->regions = 11; } // class methods function quote($method = '') { global $order, $shipping_weight, $cart, $total_count; if (MODULE_SHIPPING_REGIONS_MODE == 'price') { $order_total_price = $cart->show_total(); } if (MODULE_SHIPPING_REGIONS_MODE == 'weight') { $order_total_price = $shipping_weight; } if (MODULE_SHIPPING_REGIONS_MODE == 'per_item') { $order_total_price = $total_count; } $dest_state = $order->delivery['state']; $dest_country = $order->delivery['country']['title']; $dest_region = 0; $error = false; for ($i=1; $i<=$this->regions; $i++) { $regions_table = constant('MODULE_SHIPPING_REGIONS' . $i); $country_states_or_countries = split("[,]", $regions_table); if (in_array($dest_state, $country_states_or_countries)) { $dest_region = $i; break; } } if ($dest_region == 0) { for ($i=1; $i<=$this->regions; $i++) { $regions_table = constant('MODULE_SHIPPING_REGIONS' . $i); $country_states_or_countries = split("[,]", $regions_table); if (in_array($dest_country, $country_states_or_countries)) { $dest_region = $i; break; } } } if ($dest_region == 0) { $error = true; } else { $shipping = -1; $region_cost = constant('MODULE_SHIPPING_REGIONS_COST' . $i); $regions_table = split("[:,]" , $region_cost); if ((MODULE_SHIPPING_REGIONS_MODE == 'price') || (MODULE_SHIPPING_REGIONS_MODE == 'weight')) { for ($i=0; $i<sizeof($regions_table); $i+=2) { if ($order_total_price <= $regions_table[$i]) { $shipping = $regions_table[$i+1]; $shipping_method = MODULE_SHIPPING_REGIONS_TEXT_WAY . ' ' . "$dest_state, $dest_country" . ' ' . MODULE_SHIPPING_REGIONS_TEXT_UNITS; break; } } } if (MODULE_SHIPPING_REGIONS_MODE == 'per_item') { $shipping = $regions_table[1] * $order_total_price; $shipping_method = MODULE_SHIPPING_REGIONS_ITEM . ' ' . $total_count . ' ' . MODULE_SHIPPING_REGIONS_ITEMS . ' ' . "$dest_state, $dest_country" . ' ' . MODULE_SHIPPING_REGIONS_TEXT_UNITS; } if ($shipping == -1) { $shipping_cost = 0; $shipping_method = MODULE_SHIPPING_REGIONS_UNDEFINED_RATE; } else { $shipping_cost = ($shipping + MODULE_SHIPPING_REGIONS_HANDLING + SHIPPING_HANDLING); } } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_REGIONS_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => $shipping_method, 'cost' => $shipping_cost))); if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_REGIONS_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_REGIONS_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, date_added) VALUES ('Enable US Regions Method', 'MODULE_SHIPPING_REGIONS_STATUS', '1', 'Do you want to offer Regions rate shipping?', '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 ('Handling Fee', 'MODULE_SHIPPING_REGIONS_HANDLING', '0', 'Handling Fee for this shipping method', '6', '0', 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 ('Mode', 'MODULE_SHIPPING_REGIONS_MODE', 'weight', 'Is the shipping table based on total Weight or Total amount of order.', '6', '0', 'tep_cfg_select_option(array(\'weight\', \'price\', \'per_item\'), ', now())"); for ($i = 1; $i <= $this->regions; $i++) { $default_countries = ''; if ($i == 1) { $default_states_or_countries = 'California'; $default_prices = '30:8.95,75:10.95,150:16.95,400:21.95,10000:25.95'; } if ($i == 2) { $default_states_or_countries = 'Alabama,Arizona,Arkansas,California,Colorado,Connecticut,Delaware,District of Columbia,Florida,Georgia,Idaho,Illinois,Indiana,Iowa,Kansas,Kentucky,Louisiana,M aine,Maryland,Massachusetts,Michigan,Minnesota,Mississippi,Missouri,Montana'; $default_prices = '30:10.95,75:12.95,150:18.95,400:23.95,10000:27.95'; } if ($i == 3) { $default_states_or_countries = 'Nebraska,Nevada,New Hampshire,New Jersey,New Mexico,New York,North Carolina,North Dakota,Ohio,Oklahoma,Oregon,Pennsylvania,Rhode Island,South Carolina,South Dakota,Texas,Utah,Vermont,Virginia,Washington,West Virginia,Wisconsin,Wyoming'; $default_prices = '30:10.95,75:12.95,150:18.95,400:23.95,10000:27.95'; } tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Region " . $i ." States/Countries', 'MODULE_SHIPPING_REGIONS" . $i ."', '" . $default_states_or_countries . "', 'Comma separated list of States and/or Countries', '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 ('Region " . $i ." Shipping Table', 'MODULE_SHIPPING_REGIONS_COST" . $i ."', '" . $default_prices . "' , 'Example: 3:8.50,7:10.50.....(weight/price)<b>:</b>(shipping cost)', '6', '0', 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 (" . $keys . ")"); } function keys() { $keys = array('MODULE_SHIPPING_REGIONS_STATUS', 'MODULE_SHIPPING_REGIONS_HANDLING', 'MODULE_SHIPPING_REGIONS_MODE'); for ($i=1; $i<=$this->regions; $i++) { $keys[] = 'MODULE_SHIPPING_REGIONS' . $i; $keys[] = 'MODULE_SHIPPING_REGIONS_COST' . $i; } return $keys; } } ?> <?php /* $Id: airregions.php, v 1.0 2002/12/15 14:29:56 Jorge Exp $ Based upon zones.php by wilt, written for: osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License ----------------------------------------------------------------------------- REGIONS - Rates Based on State or Regions (group of States) module for osC 2.2-CVS (new checkout) This module allows you create shipping airregions by dividing states of the USA (or other country) in different groups. Each group will then have it's own shipping price which you can based on price or weight. This module is perfect when for those of you need to charge different when shipping to different parts of the country. Features 1..Regions can be composed of US States or of any other country 2..Order weight or price can be used to calculate shipping price. 3..Any number of airregions 4..Handling fee can be added. Jorge Set the number of airregions you need with $this->airregions = xx; Please note that any country / state that is not in one of the groups will not be able to checkout if this the only shipping you provide. However it will display a nice message saying so. Written by Jorge (billythekid_2000@hotmail.com) */ class airregions { var $code, $title, $description, $enabled, $airregions; // class constructor function airregions() { $this->code = 'airregions'; $this->title = MODULE_SHIPPING_AIRREGIONS_TEXT_TITLE; $this->description = MODULE_SHIPPING_AIRREGIONS_TEXT_DESCRIPTION; $this->icon = ''; $this->enabled = MODULE_SHIPPING_AIRREGIONS_STATUS; // CUSTOMIZE THIS SETTING FOR THE NUMBER OF States NEEDED $this->airregions = 11; } // class methods function quote($method = '') { global $order, $shipping_weight, $cart, $total_count; if (MODULE_SHIPPING_AIRREGIONS_MODE == 'price') { $order_total_price = $cart->show_total(); } if (MODULE_SHIPPING_AIRREGIONS_MODE == 'weight') { $order_total_price = $shipping_weight; } if (MODULE_SHIPPING_AIRREGIONS_MODE == 'per_item') { $order_total_price = $total_count; } $dest_state = $order->delivery['state']; $dest_country = $order->delivery['country']['title']; $dest_region = 0; $error = false; for ($i=1; $i<=$this->airregions; $i++) { $airregions_table = constant('MODULE_SHIPPING_AIRREGIONS' . $i); $country_states_or_countries = split("[,]", $airregions_table); if (in_array($dest_state, $country_states_or_countries)) { $dest_region = $i; break; } } if ($dest_region == 0) { for ($i=1; $i<=$this->airregions; $i++) { $airregions_table = constant('MODULE_SHIPPING_AIRREGIONS' . $i); $country_states_or_countries = split("[,]", $airregions_table); if (in_array($dest_country, $country_states_or_countries)) { $dest_region = $i; break; } } } if ($dest_region == 0) { $error = true; } else { $shipping = -1; $region_cost = constant('MODULE_SHIPPING_AIRREGIONS_COST' . $i); $airregions_table = split("[:,]" , $region_cost); if ((MODULE_SHIPPING_AIRREGIONS_MODE == 'price') || (MODULE_SHIPPING_AIRREGIONS_MODE == 'weight')) { for ($i=0; $i<sizeof($airregions_table); $i+=2) { if ($order_total_price <= $airregions_table[$i]) { $shipping = $airregions_table[$i+1]; $shipping_method = MODULE_SHIPPING_AIRREGIONS_TEXT_WAY . ' ' . "$dest_state, $dest_country" . ' ' . MODULE_SHIPPING_AIRREGIONS_TEXT_UNITS; break; } } } if (MODULE_SHIPPING_AIRREGIONS_MODE == 'per_item') { $shipping = $airregions_table[1] * $order_total_price; $shipping_method = MODULE_SHIPPING_AIRREGIONS_ITEM . ' ' . $total_count . ' ' . MODULE_SHIPPING_AIRREGIONS_ITEMS . ' ' . "$dest_state, $dest_country" . ' ' . MODULE_SHIPPING_AIRREGIONS_TEXT_UNITS; } if ($shipping == -1) { $shipping_cost = 0; $shipping_method = MODULE_SHIPPING_AIRREGIONS_UNDEFINED_RATE; } else { $shipping_cost = ($shipping + MODULE_SHIPPING_AIRREGIONS_HANDLING + SHIPPING_HANDLING); } } $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_AIRREGIONS_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => $shipping_method, 'cost' => $shipping_cost))); if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_AIRREGIONS_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_AIRREGIONS_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, date_added) VALUES ('Enable US Regions Method', 'MODULE_SHIPPING_AIRREGIONS_STATUS', '1', 'Do you want to offer Regions rate shipping?', '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 ('Handling Fee', 'MODULE_SHIPPING_AIRREGIONS_HANDLING', '0', 'Handling Fee for this shipping method', '6', '0', 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 ('Mode', 'MODULE_SHIPPING_AIRREGIONS_MODE', 'weight', 'Is the shipping table based on total Weight or Total amount of order.', '6', '0', 'tep_cfg_select_option(array(\'weight\', \'price\', \'per_item\'), ', now())"); for ($i = 1; $i <= $this->airregions; $i++) { $default_countries = ''; if ($i == 1) { $default_states_or_countries = 'California'; $default_prices = '30:8.95,75:10.95,150:16.95,400:21.95,10000:25.95'; } if ($i == 2) { $default_states_or_countries = 'Alabama,Arizona,Arkansas,California,Colorado,Connecticut,Delaware,District of Columbia,Florida,Georgia,Idaho,Illinois,Indiana,Iowa,Kansas,Kentucky,Louisiana,M aine,Maryland,Massachusetts,Michigan,Minnesota,Mississippi,Missouri,Montana'; $default_prices = '30:10.95,75:12.95,150:18.95,400:23.95,10000:27.95'; } if ($i == 3) { $default_states_or_countries = 'Nebraska,Nevada,New Hampshire,New Jersey,New Mexico,New York,North Carolina,North Dakota,Ohio,Oklahoma,Oregon,Pennsylvania,Rhode Island,South Carolina,South Dakota,Texas,Utah,Vermont,Virginia,Washington,West Virginia,Wisconsin,Wyoming'; $default_prices = '30:10.95,75:12.95,150:18.95,400:23.95,10000:27.95'; } tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Region " . $i ." States/Countries', 'MODULE_SHIPPING_AIRREGIONS" . $i ."', '" . $default_states_or_countries . "', 'Comma separated list of States and/or Countries', '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 ('Region " . $i ." Shipping Table', 'MODULE_SHIPPING_AIRREGIONS_COST" . $i ."', '" . $default_prices . "' , 'Example: 3:8.50,7:10.50.....(weight/price)<b>:</b>(shipping cost)', '6', '0', 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 (" . $keys . ")"); } function keys() { $keys = array('MODULE_SHIPPING_AIRREGIONS_STATUS', 'MODULE_SHIPPING_AIRREGIONS_HANDLING', 'MODULE_SHIPPING_AIRREGIONS_MODE'); for ($i=1; $i<=$this->airregions; $i++) { $keys[] = 'MODULE_SHIPPING_AIRREGIONS' . $i; $keys[] = 'MODULE_SHIPPING_AIRREGIONS_COST' . $i; } return $keys; } } ?> Hope this helps, Jeremy
  7. I use two versions of the region based rates, one unmodified for ground, one slightly altered (so that I could use it at the same time as the other) for air rates. They work pretty well for me! Jeremy http://www.oscommerce.com/community/contributions,818/
  8. Your customer failed to press the return button to get back to your site. The solutions are to use the paypal IPN contrib, set the auto return in your paypal account, or recover cart contrib. Actually there are other things to try if you search enough, but those two are the most common suggestions. HTH, Jeremy
  9. I tried this, it works, but in my logoff, I had to add php tags like this: <?php tep_session_destroy(); >?
  10. Hello, thanks Richard for this much needed fix for osc. I've installed your contribution, and it works pretty well for me, except that I'm having the problem logging off that Alex described on the first page of this thread. I attempt to log off, and the cart empties, but continuing on from logoff.php leads to the index where I'm greeted by name, still have the option to log off. Also I can proceed to account info. just as if I hadn't tried to log off. If I log in again, the cart contents from before are restored. If I open a new window, the site gives the correct unlogged greeting. I've checked the code for unregister in catalog/includes/functions/sessions.php to confirm that it is correct, and it is. Any suggestions would be appreciated, thanks, Jeremy www.oddlyenoughmosaics.com
  11. From what I read in CP's pdf guide, you can select a range of days, rather than exact dates, I'm unsure if you can turn that right off though. You do that in your shipper profile on their site, and you could add a bunch of time to your turnaround if need be to push the date or days back a bit. Jeremy
  12. It would not have helped you in any way, so it doesn't matter!
  13. What she? is saying is that you're ignoring the advice you're being given. The best solution for you would seem to be to make a form that the prospect can fil out to let you know what he wants. You reply with a quote, and if accepted you send the prospect though your site to make the purchase. Alternately, you could have the prospect go through the site, and in the checkout modify the cheque/money order to be a value of zero, and change the text to request quote. I know you can change the text in the admin, you might be able to set the value there too. If not you'll have to find the line in the code where it fetches the value to be displayed, and change it from the variable to zero. My question is if the person has gone all the way through to the checkout, they ought to know what price they're going to pay by then, why do they need a quote? I did read something earlier about being able to go through the checkout without logging in, which seemed a concern for you, try a search for information on that. And no you can't see the post she erased, nor do you want to, she was probably mean, thought the better of it and deleted what she wrote, and composed the one she posted. :twisted: Good Luck, Jeremy :)
  14. Here's a question, what about winners of multiple auctions and combined shipping for those auctions? Also I think someone may have touched on this, but we tend to upsell a lot of our auction winners by pointing out how they can maximize the shipping dollars they spend by getting more, shoot we even cap their shipping cost at a low point and pay the difference ourselves, so can you let auction winners of hidden products loose on your store to add to their cart before checking out. I know they'll see the item they bid on, perhaps ata different price than they're going to pay and we figure if it's a bit less godd for them, we have a new customer, and if its more, good for us, they found a new supplier ;) ! Thanks, Jeremy