Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

TerryK

Archived
  • Posts

    1,337
  • Joined

  • Last visited

Profile Information

  • Real Name
    Terry Kluytmans
  • Location
    BC Canada
  • Website

TerryK's Achievements

  1. Check my sig for the 'Add radio buttons at checkout' link - it does exactly what you're looking for. HTH, Terry
  2. Gary, Can you post the code here for the new shipping table you created, as well as the corresponding language file code? Maybe then we can see what's wrong. Terry
  3. /catalog/admin/includes/languages/english/orders.php HTH, Terry
  4. How do you want to ship your items? If you plan on using UPS or FedEx, there are modules that will link up to them for live shipping calculations. Canada Post also offers a live connection for shipping calculations. In my case, though I'm located in Canada, my store prices are in US dollars, and the reps I spoke with at Canada Post didn't seem to think there was any mechanism that would allow for currency conversion. So instead, I created a whole bundle of table-based shipping modules, each based on a limited shipping zone within Canada, in the US and internationally. I then printed off all the Canada Post rate guides to calculate at least approximate shipping to each area and filled mine all in manually. (That really wasn't as bad as it sounds, though did take a bit of time to begin with...) HTH, Terry
  5. - /catalog/includes/languages/english/modules/shipping/zones.php define('MODULE_SHIPPING_ZONES_TEXT_DESCRIPTION', 'Zone Based Rates'); Change to whatever you want it to say. - /catalog/includes/languages/english/modules/payment/ (then whichever payment file you want to change) For cc.php, for example, look for: ?define('MODULE_PAYMENT_CC_TEXT_TITLE', 'Credit Card'); and change to whatever you want it to say. HTH, Terry
  6. Look at table-based shipping in the Admin -> Modules -> Shipping section. If it isn't already installed, click the 'Install' button. Once you've installed it, click the 'Edit' button. There you will see a number of options, including: Enable Table Method Click on 'True' Shipping Table Enter the prices as you've specified above. i.e. 100:7.50,500:15.00,9999:25.00 If you assume orders will be greater than ?9,999, you could change that accordingly. Table Method Click on 'Price' Handling Fee If you add a handling fee to your orders, enter the amount of the handling fee here. Tax Class If you have set up sales tax for your store, the option should be available for selection here. Use it if you need to also tax your shipping costs. Shipping Zone If you have set up shipping zones, you can select the zones this shipping method should apply to here. Sort Order If this is your only method of shipping, set it to 1. If you have other shipping methods that you'd like to be offered to the customer in a higher order, change it accordingly. HTH, Terry
  7. If their payment was submitted under the cc.php payment method, it would not have been processed, nor would the payment have been sent anywhere for processing. The credit card number, depending on how you've set up your store, is either: 1. Sitting in your database for retrieval; or 2. Split in two with part of the number being sent to the store owner via Email, and the other half showing on the customer order. (The latter is an option which you would have specified when setting up the cc.php payment module.) When I used a payment processor, it took a few days for the account to be set up so I could accept credit card payments. I don't know whether it's still the same as it's been a long time since I had a payment gateway handle that part of the order process for me. Maybe someone here will have some suggestions for you on how to finalize the order. HTH, Terry
  8. To go along with this, you might also need to ensure that Credit Card is listed as sort order #1 in your Admin -> Modules -> Payment Modules section. Terry
  9. I've done this on my site, but am not positive that this is how I accomplished it. (I'm using BeyondCompare to see the difference between the default checkout_payment.php file and mine, so this looks like the right spot.) MAKE A BACKUP COPY OF YOUR /CATALOG/CHECKOUT_PAYMENT.PHP FILE BEFORE TRYING THIS! In /catalog/checkout_payment.php, look for: <?php ? ?if (sizeof($selection) > 1) { ? ? ?echo tep_draw_radio_field('payment', $selection[$i]['id']); ? ?} else { ? ? ?echo tep_draw_hidden_field('payment', $selection[$i]['id']); ? ?} ?> Change to: <?php ? ?if (sizeof($selection) > 1) { ? ? ?if ($i == 0) { ? ? ? ? $checked = true; ? ? ?} else { ? ? ? ? $checked = false; ? ? ?} ? ? ?echo tep_draw_radio_field('payment', $selection[$i]['id'], $checked); ? ?} else { ? ? ?echo tep_draw_hidden_field('payment', $selection[$i]['id']); ? ?} ?> See if that works for you... HTH, Terry (a clever DUDETTE if it works) :)
  10. Heather, Do you have IM (MSN or Skype)? If so PM your Email address/user ID to me, and I'll see if I can help you that way. Terry
  11. Glad you got it solved, April! Now I don't have to go compare php files... :) Terry
  12. April, Can you post the code for that complete file here? I'm guessing that something else has gone wrong in your code so it's not calling the tax properly. While you may have made a quick fix to solve your problem, it may cause other issues down the road. (Might not either, but couldn't hurt to check...) Terry
  13. Not sure if this is the answer or not, but try going to your Admin screen to Locations/Taxes -> Tax Rates. I presume you have a rate set up there. If so, click on it, then click on the Edit button in the right-hand column and fill in the description (if it's blank). If it's NOT blank, then I'm not sure why it's not displaying for you... HTH, Terry
  14. Sorry, Sukh -- I have no idea. (A programmer I am definitely NOT!) Terry
  15. I'm using duplicated versions of table.php to handle my shipping methods, so the code is likely not the same as on province.php. (I did start out using province.php, but wanted better shipping descriptions than what it could offer, so switched to multiple table.php files instead.) In any event, here's my code from /catalog/includes/classes/shipping.php, which I presume is what you want: <?php /* $Id: shipping.php,v 1.23 2003/06/29 11:22:05 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ class shipping { var $modules; // class constructor function shipping($module = '') { global $language, $PHP_SELF; if (defined('MODULE_SHIPPING_INSTALLED') && tep_not_null(MODULE_SHIPPING_INSTALLED)) { $this->modules = explode(';', MODULE_SHIPPING_INSTALLED); $include_modules = array(); if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $this->modules)) ) { $include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1))); } else { reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); $include_modules[] = array('class' => $class, 'file' => $value); } } for ($i=0, $n=sizeof($include_modules); $i<$n; $i++) { include(DIR_WS_LANGUAGES . $language . '/modules/shipping/' . $include_modules[$i]['file']); include(DIR_WS_MODULES . 'shipping/' . $include_modules[$i]['file']); $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class']; } } } function quote($method = '', $module = '') { global $total_weight, $shipping_weight, $shipping_quoted, $shipping_num_boxes; $quotes_array = array(); if (is_array($this->modules)) { $shipping_quoted = ''; $shipping_num_boxes = 1; $shipping_weight = $total_weight; if (SHIPPING_BOX_WEIGHT >= $shipping_weight*SHIPPING_BOX_PADDING/100) { $shipping_weight = $shipping_weight+SHIPPING_BOX_WEIGHT; } else { $shipping_weight = $shipping_weight + ($shipping_weight*SHIPPING_BOX_PADDING/100); } if ($shipping_weight > SHIPPING_MAX_WEIGHT) { // Split into many boxes $shipping_num_boxes = ceil($shipping_weight/SHIPPING_MAX_WEIGHT); $shipping_weight = $shipping_weight/$shipping_num_boxes; } $include_quotes = array(); reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if (tep_not_null($module)) { if ( ($module == $class) && ($GLOBALS[$class]->enabled) ) { $include_quotes[] = $class; } } elseif ($GLOBALS[$class]->enabled) { $include_quotes[] = $class; } } $size = sizeof($include_quotes); for ($i=0; $i<$size; $i++) { $quotes = $GLOBALS[$include_quotes[$i]]->quote($method); if (is_array($quotes)) $quotes_array[] = $quotes; } } return $quotes_array; } function cheapest() { if (is_array($this->modules)) { $rates = array(); reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if ($GLOBALS[$class]->enabled) { $quotes = $GLOBALS[$class]->quotes; for ($i=0, $n=sizeof($quotes['methods']); $i<$n; $i++) { if (isset($quotes['methods'][$i]['cost']) && tep_not_null($quotes['methods'][$i]['cost'])) { $rates[] = array('id' => $quotes['id'] . '_' . $quotes['methods'][$i]['id'], 'title' => $quotes['module'], 'cost' => $quotes['methods'][$i]['cost']); } } } } $cheapest = false; for ($i=0, $n=sizeof($rates); $i<$n; $i++) { if (is_array($cheapest)) { if ($rates[$i]['cost'] < $cheapest['cost']) { $cheapest = $rates[$i]; } } else { $cheapest = $rates[$i]; } } return $cheapest; } } } ?> HTH, Terry
×
×
  • Create New...