Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

eitai2001

Members
  • Content count

    33
  • Joined

  • Last visited

About eitai2001

  • Birthday 06/08/1987

Profile Information

  • Real Name
    Itai Etzman
  • Gender
    Male
  • Location
    Johannesburg, South Africa
  • Interests
    Planes, computers, electronics ... SLEEP ... www.digitaladdiction.co.za
  • Website
  1. eitai2001

    SETCOM payment module?

    Hi. Can someone please help me. I would like to make it that when someone buys a product off the site, if they decide to use Setcom, it charges them another 5% on top of everything. Regards Itai Etzman
  2. eitai2001

    Specials On Default

    Hi. I'm still looking for a solution to this if anyone can help. Regards Itai
  3. eitai2001

    Specials On Default

    Hi. I'm trying to mix the following two contributions: Individual Boxes and Random New Products Shows Specials inc SubCats 1.1 or Include all Subcategories for 'New Products in ... v1.0b I have installed Individual Boxes correctly in both the new products and specials modules (although I still can't get the specials randomised) ... but I would like the new products and specials in a category and all sub categories to be displayed on at all different menu options so if someone clicks there won't just be a blank screen. I use dynamenu so this isn't generally a problem, but some people do click by mistake ... and having only 1 sub-category worth of new products isn't what I want. Please can someone with some good expertise help me merge the new_products.php module from individual boxes with that of the latter contribution ... My website is www.digitaladdiction.co.za if you want to see any references to my site ... Also, if needed, I will add the code for my new_products.php module file and specials.php module file. also, Does anyone out there know how to get the specials on default contribution to show random specials rather than the latest ones? Regards Itai Etzman
  4. eitai2001

    [contribution] Simple Template System (sts)

    Hi. Can someone tell me how to specifically exclude a page from an sts template so that it shows by default.
  5. Look at my shipping.php at the same section. I had the same problem and I took out some of the if statements to correct it. The only reason I'm posting it here is to see if anyone will see a bug that may appear from it. Regards Itai Etzman
  6. Look at my shipping.php at the same section. I had the same problem and I took out some of the if statements to correct it. The only reason I'm posting it here is to see if anyone will see a bug that may appear from it. Regards Itai Etzman
  7. Please can someone tell me if the following source is problem free: <?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 © 2003 osCommerce Released under the GNU General Public License */ class shipping { var $modules; // class constructor function shipping($module = '') { // start indvship // global $language, $PHP_SELF; global $language, $PHP_SELF, $cart; $products = $cart->get_products();// BOF: indvship prices $shiptotal = $this->get_shiptotal(); $indvcount = $this->get_indvcount();// EOF: indvship prices // end indvship 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); // start indvship //while (list(, $value) = each($this->modules)) { // $class = substr($value, 0, strrpos($value, '.')); // $include_modules[] = array('class' => $class, 'file' => $value); //} //} // if($indvcount==sizeof($products)){ if ((tep_get_configuration_key_value('MODULE_SHIPPING_INDVSHIP_STATUS')) && ((tep_not_null($shiptotal)) || $shiptotal == 0)) { $include_modules[] = array('class'=> 'indvship', 'file' => 'indvship.php'); } // } else { // if(sizeof($products)>$indvcount){ while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); if (($class !='freeshipper') && ($class != 'indvship')) { // comment to show all ship options //if ($class !='freeshipper') { // uncomment to show all ship options $include_modules[] = array('class' => $class, 'file' => $value); } } } // } //} // end indvship 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; } //start indvship function get_shiptotal() { global $cart, $order; $this->shiptotal = ''; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { if (tep_not_null($products[$i]['products_ship_price'])) { $products_ship_price = $products[$i]['products_ship_price']; $products_ship_price_two = $products[$i]['products_ship_price_two']; $products_ship_zip = $products[$i]['products_ship_zip']; $qty = $products[$i]['quantity']; if(tep_not_null($products_ship_price) ||tep_not_null($products_ship_price_two)){ $this->shiptotal += ($products_ship_price); if ($qty > 1) { if (tep_not_null($products_ship_price_two)) { $this->shiptotal += ($products_ship_price_two * ($qty-1)); } else { $this->shiptotal += ($products_ship_price * ($qty-1)); } }/////////////NOT HERE <<------------ } } }// CHECK TO SEE IF SHIPPING TO HOME COUNTRY, IF NOT INCREASE SHIPPING COSTS BY AMOUNT SET IN ADMIN/////////////move back here <<------------ if (($order->delivery['country']['id']) != INDIVIDUAL_SHIP_HOME_COUNTRY) { if(INDIVIDUAL_SHIP_INCREASE > '0' || $this->shiptotal > '0') { $this->shiptotal *= INDIVIDUAL_SHIP_INCREASE; } else { $this->shiptotal += INDIVIDUAL_SHIP_INCREASE * $this->get_indvcount(); } return $this->shiptotal; // not sure why this is needed, but it now works correctly for home country - by Ed } else { $this->shiptotal *= 1; return $this->shiptotal; } } function get_indvcount() { global $cart; $this->indvcount = ''; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { if (tep_not_null($products[$i]['products_ship_price'])) { $products_ship_price = $products[$i]['products_ship_price'];//} $products_ship_price_two = $products[$i]['products_ship_price_two']; if(is_numeric($products_ship_price)){ $this->indvcount += '1'; } } } return $this->indvcount; } // end indvship 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'] . ' (' . $quotes['methods'][$i]['title'] . ')', '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; } } } ?>
×