Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi_Vendor_Shipping new thread


blucollarguy

Recommended Posts

You can use zones. The setup is the same as for stock osCommerce, just do the setup in your vendor's shipping module instead of the stock osC module. There is a page on zones in the documentation and several explanations here on the forum.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

You can use zones. The setup is the same as for stock osCommerce, just do the setup in your vendor's shipping module instead of the stock osC module. There is a page on zones in the documentation and several explanations here on the forum.

 

Regards

Jim

 

 

Hi,

Thank you for your reply.

 

I read the documentation in zones.php but I don't think this is what I want.

 

in the file's comment section it reads

If you want to be able to ship to any country in the world, you will

need to enter every country code into the Country fields. For most

shops, you will not want to enter every country. This is often

because of too much fraud from certain places. If a country is not

listed, then the module will add a $0.00 shipping charge and will

indicate that shipping is not available to that destination.

PLEASE NOTE THAT THE ORDER CAN STILL BE COMPLETED AND PROCESSED!

 

I want to hide specific shipping completely if the customer is outside UK.

 

for example say I have one shipping set-up only for UK customers and one for Europe/us customers. when a UK customer tries to checkout he should not see the Europe's shipping method and vice versa. Zone module clearly says that the module will not be hidden to undefined country's customer. I am just testing it now and see how it goes. is this possible?

Link to comment
Share on other sites

osCommerce version 2.2 has never been released. See What version is my shop? MVS currently supports Version 2.2RC2a, and should work with versions as old as 2.2RC1.

 

The vendor product report page in the Admin requires Javascript. Check that you do not have Javascript blocked and that it is working in your browser. Otherwise, this page works on my test system, and I am running very similar versions of PHP and MySQL, so it should work on yours as well.

 

Regards

Jim

 

 

Hi Jim,

 

Sorry I didnt precise exactly which versoon of the osCommerce. I thought it was so obviously so I didn't mentioned that.

Yes, it is the latest version of 2.2. Which is what you wrote - 2.2RC2a.

We dont have any javascript blocked in our company computers. This is so important these days. So my answer is no.

.

We are testing our websites on both Internet Explorer 8, Firefox 3.6.8 and Opera browsers.

 

//Per

Edited by pomarja
Link to comment
Share on other sites

<snipped>

for example say I have one shipping set-up only for UK customers and one for Europe/us customers. when a UK customer tries to checkout he should not see the Europe's shipping method and vice versa. Zone module clearly says that the module will not be hidden to undefined country's customer. I am just testing it now and see how it goes. is this possible?

What you want should be possible. I believe that you may need an addon to modify the behavior of the stock zones function. I've never done this, so I'm not the best person to ask. You would do better posting a question in the modules section of the forum, as this has nothing to do with MVS.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Hi Jim,

 

Sorry I didnt precise exactly which versoon of the osCommerce. I thought it was so obviously so I didn't mentioned that.

Yes, it is the latest version of 2.2. Which is what you wrote - 2.2RC2a.

We dont have any javascript blocked in our company computers. This is so important these days. So my answer is no.

.

We are testing our websites on both Internet Explorer 8, Firefox 3.6.8 and Opera browsers.

 

//Per

There are a lot of stores still running 2.2MS2 and even MS1, so it's important to ask. Some of the functions that MVS uses will not work with those older stores.

 

I'm puzzled at the failure you are seeing in admin/prods_by_vendor.php. That should just work. Try this: Select a vendor and look at the address bar. Does it change? Is there a string after the filename that looks something like vendors_id=1 (Where 1 is the vendor number.)

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Can someone please start me off how to make the modification in royal mail airmail shipping module on following code. I just don't how to start...

 

<?php
/*
rmairmail.php

Royal Mail Airmail

Shipping module for osCommerce

Version 2.2.1 - 7 January 2010

A shipping module for UK based osCommerce stores.

This version created by Chris Lander from an original contribution
by Stuart Newton (contribution #4473).


This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

class rmairmail {
var $code, $title, $description, $enabled, $num_zones;

// class constructor
function rmairmail() {

	global $order, $total_weight;

	$this->version = ((defined('MODULE_SHIPPING_RMAIRMAIL_VERSION')) ? MODULE_SHIPPING_RMAIRMAIL_VERSION : '?.?');
	$this->code = 'rmairmail';
	$this->title = MODULE_SHIPPING_RMAIRMAIL_TEXT_TITLE . ' v' . $this->version;
	$this->description = MODULE_SHIPPING_RMAIRMAIL_TEXT_DESCRIPTION . ' v' . $this->version;
	$this->sort_order = MODULE_SHIPPING_RMAIRMAIL_SORT_ORDER;
	$this->icon = DIR_WS_ICONS . 'shipping_rmairmail.gif'; // upload icon to catalog/images/icon directory
	$this->tax_class = MODULE_SHIPPING_RMAIRMAIL_TAX_CLASS;
	$this->enabled = ((MODULE_SHIPPING_RMAIRMAIL_STATUS == 'True') ? true : false);
	$this->num_zones = 2;
	$this->weight_split = ((MODULE_SHIPPING_RMAIRMAIL_WEIGHT_SPLIT == 'True') ? true : false);
	$this->value_split = ((MODULE_SHIPPING_RMAIRMAIL_VALUE_SPLIT == 'True') ? true : false);

	// Calculate shipping weight taking into account
	//  Maximum Package Weight you will ship
	//  Package Tare weight
	//  Larger packages percent increase
	//
	//  as is done in ..../includes/classes/shipping.php line# 70 - 79
	//
	if (SHIPPING_BOX_WEIGHT >= $total_weight*SHIPPING_BOX_PADDING/100) {
		$shipping_weight = $total_weight+SHIPPING_BOX_WEIGHT;
	} else {
		$shipping_weight = $total_weight + ($total_weight*SHIPPING_BOX_PADDING/		100);
	}

	// Default to split using store maximum shipping weight
	$my_max_shipping_weight = SHIPPING_MAX_WEIGHT;
	// Split shipment using Method Maximum Shipment Weight?
	if ($this->weight_split) {
		if (SHIPPING_MAX_WEIGHT > MODULE_SHIPPING_RMAIRMAIL_MAX_WEIGHT) {
			$my_max_shipping_weight = MODULE_SHIPPING_RMAIRMAIL_MAX_WEIGHT;
		}
	}

	// Split shipment into the required number of boxes
	if ($shipping_weight > $my_max_shipping_weight) {
		$shipping_num_boxes = ceil($shipping_weight/$my_max_shipping_weight);
		$shipping_weight = $shipping_weight/$shipping_num_boxes;
	}

	// Ensure we have Set number of boxes and weight
	$shipping_num_boxes = (isset($shipping_num_boxes) ? $shipping_num_boxes : 1);
	$shipping_weight = (isset($shipping_weight) ? $shipping_weight : 0);
	$my_shipping_num_boxes = $shipping_num_boxes;
	$my_shipping_weight = $shipping_weight;

	// Split shipment on method Maximum Shipment Value?
	if ($this->value_split) {
		// Calc the value and weight of each package being shipped
		if ( ($order->info['subtotal'] / $shipping_num_boxes) > MODULE_SHIPPING_RMAIRMAIL_MAX_VALUE) {
			$my_shipping_num_boxes = ceil($order->info['subtotal']/MODULE_SHIPPING_RMAIRMAIL_MAX_VALUE);
			$my_shipping_weight = ($shipping_weight * $shipping_num_boxes) / $my_shipping_num_boxes;
		}
	}

	// Only ship if packet value exceeds method minimum value
	if ( ($order->info['subtotal'] / $my_shipping_num_boxes) < MODULE_SHIPPING_RMAIRMAIL_MIN_VALUE) {
		$this->enabled = false;
	}

	// Only ship if packet value does not exceed method maximum value
	if ( ($order->info['subtotal'] / $my_shipping_num_boxes) > MODULE_SHIPPING_RMAIRMAIL_MAX_VALUE) {
		$this->enabled = false;
	}

	// Only ship if packet weight exceeds method minimum value
	if ( $my_shipping_weight < MODULE_SHIPPING_RMAIRMAIL_MIN_WEIGHT) {
		$this->enabled = false;
	}

	// Only ship if packet weight does not exceed method maximum value
	if ( $my_shipping_weight > MODULE_SHIPPING_RMAIRMAIL_MAX_WEIGHT) {
		$this->enabled = false;
	}

	// Get the destination country
	$dest_country = $order->delivery['country']['iso_code_2']; # Get the destination country

	// Only Non-UK Customers to see shipping method. Hide for UK customers
	// Check if destination is a valid one for this method
	if (defined('MODULE_SHIPPING_RMAIRMAIL_INVALID_ZONES')) {
		$invalid_zones_table = constant('MODULE_SHIPPING_RMAIRMAIL_INVALID_ZONES');
		$invalid_zones = preg_split("/[,]/", $invalid_zones_table);
		if (in_array($dest_country, $invalid_zones)) { // Zone Invalid?
			$this->enabled= false;
		}else{ // Destination MUST be a Valid one
			$dest_zone = $this->num_zones;					// Set default shipping zone to last zone available
			for ($i=1; $i<=$this->num_zones; $i++) {
				$constant = 'MODULE_SHIPPING_RMAIRMAIL_COUNTRIES_'.$i;
				if (defined($constant)) {
					$countries_table = constant('MODULE_SHIPPING_RMAIRMAIL_COUNTRIES_' . $i);
					$country_zones = preg_split("/[,]/", $countries_table);
					if (in_array($dest_country, $country_zones)) {
						$dest_zone = $i;
						break;
					}
				}
			}
		}
	}
}

// class methods
function quote($method = '') {
	global $order, $shipping_weight, $shipping_num_boxes;

	$error = false; // Reset error flag

	// Ensure we have Set number of boxes and weight
	$shipping_num_boxes = (isset($shipping_num_boxes) ? $shipping_num_boxes : 1);
	$shipping_weight = (isset($shipping_weight) ? $shipping_weight : 0);
	$my_shipping_num_boxes = $shipping_num_boxes;
	$my_shipping_weight = $shipping_weight;

	// Split shipment using Method Maximum Shipment Weight?
	if ($this->weight_split) {
		// Store Max Weight larger than Shipping MaxWeight?
		if (SHIPPING_MAX_WEIGHT > MODULE_SHIPPING_RMAIRMAIL_MAX_WEIGHT) {
			// Calc the value and weight of each package being shipped
			$my_max_shipping_weight = MODULE_SHIPPING_RMAIRMAIL_MAX_WEIGHT;
			if ($shipping_weight > $my_max_shipping_weight) {
				$my_shipping_num_boxes = ceil(($shipping_weight * $shipping_num_boxes)/$my_max_shipping_weight);
				$my_shipping_weight = ($shipping_weight * $shipping_num_boxes)/$my_shipping_num_boxes;
			}
		}
	}

	// Split shipment on method Maximum Shipment Value?
	if ($this->value_split) {
		// Calc the value and weight of each package being shipped
		if ( ($order->info['subtotal'] / $my_shipping_num_boxes) > MODULE_SHIPPING_RMAIRMAIL_MAX_VALUE) {
			$my_shipping_num_boxes = ceil($order->info['subtotal']/MODULE_SHIPPING_RMAIRMAIL_MAX_VALUE);
			$my_shipping_weight = ($shipping_weight * $shipping_num_boxes) / $my_shipping_num_boxes;
		}
	}

	$shipping = -1;	// Flag no shipping cost available

	// Get the destination country
	$dest_country = $order->delivery['country']['iso_code_2']; # Get the destination country
	$dest_zone = 0; // Flag invalid destination

	// Only Non-UK Customers to see shipping method. Hide for UK customers
	// Check if destination is a valid one for this method
	if (defined('MODULE_SHIPPING_RMAIRMAIL_INVALID_ZONES')) {
		$invalid_zones_table = constant('MODULE_SHIPPING_RMAIRMAIL_INVALID_ZONES');
		$invalid_zones = preg_split("/[,]/", $invalid_zones_table);
		if (in_array($dest_country, $invalid_zones)) { // Zone Invalid?
			$dest_zone = 0;
		}else{ // Destination MUST be Valid so find which shipping zone destination belongs to
			$dest_zone = $this->num_zones;					// Set default shipping zone to last zone available
			for ($i=1; $i<=$this->num_zones; $i++) {
				$constant = 'MODULE_SHIPPING_RMAIRMAIL_COUNTRIES_'.$i;
				if (defined($constant)) {
					$countries_table = constant('MODULE_SHIPPING_RMAIRMAIL_COUNTRIES_' . $i);
					$country_zones = preg_split("/[,]/", $countries_table);
					if (in_array($dest_country, $country_zones)) {
						$dest_zone = $i;
						break;
					}
				}
			}
		}
	}

	// Invalid Destination Zone found?
	if ($dest_zone == 0) {
		$shipping_cost = 0;
		$shipping_method = MODULE_SHIPPING_RMAIRMAIL_INVALID_ZONE;
	}else{ // Destination must be in a valid zone
		// Get the cost to ship to the destination zone
		$shipping = -1;	// Flag no shipping cost available
		$zones_cost = constant('MODULE_SHIPPING_RMAIRMAIL_COST_' . $dest_zone);

		$zones_table = preg_split("/[:,]/" , $zones_cost);
		$size = sizeof($zones_table);

		// Determine if shipping cost is available
		for ($i=0; $i<$size; $i+=2) {
			if ($my_shipping_weight <= $zones_table[$i]) {
				$shipping = $zones_table[$i+1];
				if(tep_not_null($method) ) {
					// Text shown on Checkout_Confirmation
					$shipping_method = ''; // Leaving this entry blank causes only the shipping title to show i.e Royal Mail 1st Class Std
				}else{
					// Text shown on Checkout_shipping
					$shipping_method = '';
					// Display delivery weight?
					if (constant('MODULE_SHIPPING_RMAIRMAIL_DISPLAY_WEIGHT') == 'True') {
						// Delivery Weight : x items of n.nnnn Kg's
						$shipping_method = MODULE_SHIPPING_RMAIRMAIL_TEXT_WAY. ' : ';
						if ($my_shipping_num_boxes > 1) { // Shipment split between several boxes/packets
							$shipping_method = $shipping_method . $shipping_num_boxes . ' '.MODULE_SHIPPING_RMAIRMAIL_TEXT_ITEMS.' ';
						}else{
							$shipping_method = $shipping_method . $shipping_num_boxes . ' '.MODULE_SHIPPING_RMAIRMAIL_TEXT_ITEM.' ';
						}
						$shipping_method = $shipping_method . $shipping_weight. ' ' . MODULE_SHIPPING_RMAIRMAIL_TEXT_UNITS;
					}
					// Display delivery times?
					if (constant('MODULE_SHIPPING_RMAIRMAIL_DISPLAY_TIME') == 'True') {
						// Ships within 3 to 5 days
					$shipping_method = $shipping_method . ' (';
					$shipping_method = $shipping_method . ucfirst(MODULE_SHIPPING_RMAIRMAIL_DELIVERY_SHIPPING_TIME) . ')';
					}
				}
				break;
			}
		}
	}

	// No shipping cost found?
	if ($shipping == -1) {
		$shipping_cost = 0;
		$shipping_method = MODULE_SHIPPING_RMAIRMAIL_UNDEFINED_RATE;
	// Shipping charge found, so add together all costs
	} else {
		$shipping_cost = ($shipping * $my_shipping_num_boxes) + constant('MODULE_SHIPPING_RMAIRMAIL_HANDLING_' . $this->num_zones);
	}

	$this->quotes = array('id' => $this->code,
		'module' => MODULE_SHIPPING_RMAIRMAIL_TEXT_TITLE,
		'methods' => array(array('id' => $this->code,
		'title' => $shipping_method,
		'cost' => $shipping_cost)));

	// Need to apply tax ?
	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_RMAIRMAIL_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_RMAIRMAIL_STATUS'");
		$this->_check = tep_db_num_rows($check_query);
	}
	return $this->_check;
}

function install() {
	// MODULE_SHIPPING_RMAIRMAIL_VERSION
	tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Version', 'MODULE_SHIPPING_RMAIRMAIL_VERSION', '2.2.1', 'Sort order of display (1 shown first 99 etc shown last to customer)', '6', '0', now())");
	// MODULE_SHIPPING_RMAIRMAIL_STATUS
	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 RM Airmail', 'MODULE_SHIPPING_RMAIRMAIL_STATUS', 'True', 'Do you want to offer this shipping option?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
	// MODULE_SHIPPING_RMAIRMAIL_TAX_CLASS
	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_RMAIRMAIL_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())");
	// MODULE_SHIPPING_RMAIRMAIL_SORT_ORDER
	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_RMAIRMAIL_SORT_ORDER', '8', 'Sort order of display (1 shown first 99 etc shown last to customer)', '6', '0', now())");
	// MODULE_SHIPPING_RMAIRMAIL_MIN_WEIGHT
	tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Minimum weight to ship', 'MODULE_SHIPPING_RMAIRMAIL_MIN_WEIGHT', '0', 'Enter the minimum weight to ship', '6', '0', now())");
	// MODULE_SHIPPING_RMAIRMAIL_MAX_WEIGHT
	tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Maximum weight to ship', 'MODULE_SHIPPING_RMAIRMAIL_MAX_WEIGHT', '2', 'Enter the maximum weight to ship', '6', '0', now())");
	// MODULE_SHIPPING_RMAIRMAIL_WEIGHT_SPLIT
	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 ('Split shipments on maximum weight to ship', 'MODULE_SHIPPING_RMAIRMAIL_WEIGHT_SPLIT', 'False', 'Do you want to split your shipment by maximum weight to ship?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
	// MODULE_SHIPPING_RMAIRMAIL_MIN_VALUE
	tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Minimum value to ship', 'MODULE_SHIPPING_RMAIRMAIL_MIN_VALUE', '0', 'Enter the maximum value to ship', '6', '0', now())");
	// MODULE_SHIPPING_RMAIRMAIL_MAX_VALUE
	tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Maximum value to ship', 'MODULE_SHIPPING_RMAIRMAIL_MAX_VALUE', '39', 'Enter the maximum value to ship', '6', '0', now())");
	// MODULE_SHIPPING_RMAIRMAIL_VALUE_SPLIT
	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 ('Split shipments on maximum value to ship', 'MODULE_SHIPPING_RMAIRMAIL_VALUE_SPLIT', 'False', 'Do you want to split your shipment by maximum value to ship?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
	// MODULE_SHIPPING_RMAIRMAIL_DISPLAY_WEIGHT
	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 ('Display delivery weight', 'MODULE_SHIPPING_RMAIRMAIL_DISPLAY_WEIGHT', 'True', 'Do you want to display the shipping weight? (e.g. Delivery Weight : 2.7674 Kg\'s)', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
	// MODULE_SHIPPING_RMAIRMAIL_DISPLAY_INSURANCE
	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 ('Display Insurance', 'MODULE_SHIPPING_RMAIRMAIL_DISPLAY_INSURANCE', 'True', 'Do you want to display the shipping insurance? (e.g. Insured upto £500)', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
	// MODULE_SHIPPING_RMAIRMAIL_DISPLAY_TIME
	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 ('Display delivery time', 'MODULE_SHIPPING_RMAIRMAIL_DISPLAY_TIME', 'True', 'Do you want to display the shipping time? (e.g. Ships within 3 to 5 days)', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
	// MODULE_SHIPPING_RMAIRMAIL_INVALID_ZONES
	tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Invalid ISO Country Codes', 'MODULE_SHIPPING_RMAIRMAIL_INVALID_ZONES', 'GB', 'Enter the two digit ISO code for which this shipping method does NOT apply to. (Default: GB)', '6', '0', now())");

	for ($i = 1; $i <= $this->num_zones; $i++) {
		$default_countries = '';
		$shipping_table = '';
		$shipping_handling = '';
		if ($i == 1) {
			$default_countries = 'AL,AD,AM,AT,AZ,BY,BE,BA,BG,HR,CY,CZ,DK,EE,FO,FI,FR,GE,DE,GI,GR,GL,HU,IS,IE,IT,KZ,KG,LV,LI,LT,LU,MK,MT,MD,MC,NL,NO,PL,PT,RO,RU,SM,SK,SI,ES,SE,CH,TJ,TR,TM,UA,UZ,VA,US';
			$shipping_table = '.1:1.21,.12:1.31,.14:1.45,.16:1.57,.18:1.7,.2:1.82,.22:1.95,.24:2.06,.26:2.18,.28:2.31,.3:2.44,.34:2.66,.38:2.88,.42:3.1,.46:3.32,.5:3.54,.56:3.87,.62:4.2,.68:4.53,.74:4.86,.8:5.19,.9:5.74,1:6.29,1.2:7.29,1.4:8.29,1.6:9.29,1.8:10.29,2:11.29';
			$shipping_handling = 0;
		// MODULE_SHIPPING_RMAIRMAIL_COUNTRIES_$i
		tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('RM Airmail Zone ".$i." Valid ISO Country Codes', 'MODULE_SHIPPING_RMAIRMAIL_COUNTRIES_" . $i ."', '" . $default_countries . "', 'Comma separated list of two character ISO country codes that are valid destinations for this method (Default: ".$default_countries.")', '6', '0', now())");
		}
		if ($i == 2) {
			$default_countries = 'All Others'; // this must be the lastest zone
			$shipping_table = '.1:1.68,.12:1.93,.14:2.19,.16:2.44,.18:2.7,.2:2.94,.22:3.18,.24:3.41,.26:3.64,.28:3.88,.3:4.11,.34:4.59,.38:5.07,.42:5.55,.46:6.03,.5:6.51,.56:7.2,.62:7.89,.68:8.58,.74:9.27,.8:9.96,.9:11.11,1:12.26,1.2:14.46,1.4:16.66,1.6:18.86,1.8:21.06,2:23.26';
			$shipping_handling = 0;
		// MODULE_SHIPPING_RMAIRMAIL_COUNTRIES_$i
		tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('RM Airmail Zone ".$i." Valid ISO Country Codes', 'MODULE_SHIPPING_RMAIRMAIL_COUNTRIES_" . $i ."', '" . $default_countries . "', 'All other destinations (Default: ".$default_countries.")', '6', '0', now())");
		}
		// MODULE_SHIPPING_RMAIRMAIL_COST_$i
		tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('RM Airmail Zone ".$i." Rates', 'MODULE_SHIPPING_RMAIRMAIL_COST_" . $i ."', '" . $shipping_table . "', 'Enter values upto 5,2 decimal places. (12345.67) Example: 2:4.2,4:6.85 - Weights less than or equal to 2Kg would cost 4.20, Weights less than or equal to 4Kg but more than 2Kg will cost 6.85. Do not enter KG or currency symbols.', '6', '0', now())");
		// MODULE_SHIPPING_RMAIRMAIL_HANDLING_$i
		tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('RM Airmail Zone ".$i." Packaging / Handling Fee', 'MODULE_SHIPPING_RMAIRMAIL_HANDLING_" . $i ."', '" . $shipping_handling . "', 'If you want to add extra costs to customers for jiffy bags etc, the cost can be entered below (eg enter 1.50 for a value of �1.50)', '6', '0', now())");
	}
}

function remove() {
	tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('MODULE_SHIPPING_RMAIRMAIL_VERSION','" . implode("', '", $this->keys()) . "')");
}

function keys() {
	$keys = array('MODULE_SHIPPING_RMAIRMAIL_STATUS'
			,'MODULE_SHIPPING_RMAIRMAIL_TAX_CLASS'
			,'MODULE_SHIPPING_RMAIRMAIL_SORT_ORDER'
			,'MODULE_SHIPPING_RMAIRMAIL_MIN_WEIGHT'
			,'MODULE_SHIPPING_RMAIRMAIL_MAX_WEIGHT'
			,'MODULE_SHIPPING_RMAIRMAIL_WEIGHT_SPLIT'
			,'MODULE_SHIPPING_RMAIRMAIL_MIN_VALUE'
			,'MODULE_SHIPPING_RMAIRMAIL_MAX_VALUE'
			,'MODULE_SHIPPING_RMAIRMAIL_VALUE_SPLIT'
			,'MODULE_SHIPPING_RMAIRMAIL_DISPLAY_WEIGHT'
			,'MODULE_SHIPPING_RMAIRMAIL_DISPLAY_INSURANCE'
			,'MODULE_SHIPPING_RMAIRMAIL_DISPLAY_TIME'
			,'MODULE_SHIPPING_RMAIRMAIL_INVALID_ZONES'
		);
	for ($i=1; $i<=$this->num_zones; $i++) {
		$keys[] = 'MODULE_SHIPPING_RMAIRMAIL_COUNTRIES_' . $i;
		$keys[] = 'MODULE_SHIPPING_RMAIRMAIL_COST_' . $i;
		$keys[] = 'MODULE_SHIPPING_RMAIRMAIL_HANDLING_' . $i;
	}
	return $keys;
}
}
?>

Link to comment
Share on other sites

There are a lot of stores still running 2.2MS2 and even MS1, so it's important to ask. Some of the functions that MVS uses will not work with those older stores.

 

I'm puzzled at the failure you are seeing in admin/prods_by_vendor.php. That should just work. Try this: Select a vendor and look at the address bar. Does it change? Is there a string after the filename that looks something like vendors_id=1 (Where 1 is the vendor number.)

 

Regards

Jim

 

Hi Jim,

 

I can understand that. I just wonder why people don't change anything when it comes an update....

 

Anyway, thank you for your answer and question .

And my answer is unfortunately not. It still looks like this when a select a vendor "admin/prods_by_vendor.php".

 

Rgds, Per

Link to comment
Share on other sites

Hi Jim,

 

I can understand that. I just wonder why people don't change anything when it comes an update....

 

Anyway, thank you for your answer and question .

And my answer is unfortunately not. It still looks like this when a select a vendor "admin/prods_by_vendor.php".

 

Rgds, Per

It appears that the change is not being submitted. Try replacing line 114 of admin/prods_by_vendor.php with the following code:

                <td class="main" align="left"><?php echo TABLE_HEADING_VENDOR_CHOOSE . ' '; ?><?php echo tep_draw_form ('vendors_report', FILENAME_PRODS_VENDORS) . tep_draw_pull_down_menu ('vendors_id', $vendors_array,'','onChange="this.form.submit()";') . '<noscript>' . tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</noscript>';;?></form></td>

Do you see a Continue button with that change?

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

It appears that the change is not being submitted. Try replacing line 114 of admin/prods_by_vendor.php with the following code:

                <td class="main" align="left"><?php echo TABLE_HEADING_VENDOR_CHOOSE . ' '; ?><?php echo tep_draw_form ('vendors_report', FILENAME_PRODS_VENDORS) . tep_draw_pull_down_menu ('vendors_id', $vendors_array,'','onChange="this.form.submit()";') . '<noscript>' . tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</noscript>';;?></form></td>

Do you see a Continue button with that change?

 

Regards

Jim

 

 

Hello again Jim,

 

I really appreciate your help. Unfortunately this code didn't work. Sorry for the long time between the

answers from me but its because the difference in time between Sweden and the US.

 

Maybe you have something else.

 

Regards, Per

 

Below you will find copy of the code in my page of "prods_by_vendor.php":

----------------------------------------------------------------------------------------------

<?php

/*

$ID: prods_by_vendor.php (for use with MVS) by Craig Garrison Sr, BluCollar Sales

$Loc: /catalog/admin/ $

$Mod: MVS V1.2 2009/02/28 JCK/CWG $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2006 osCommerce

 

Released under the GNU General Public License

*/

 

require_once ('includes/application_top.php');

 

require_once (DIR_WS_CLASSES . 'currencies.php');

$currencies = new currencies();

 

// Test changes 01-19-2008

$line_filter = '';

if (isset ($_GET['line']) && $_GET['line'] != '') {

$line_filter = $_GET['line'];

$line_filter = preg_replace("(\r\n|\n|\r)", '', $line_filter); // Remove CR &/ LF

$line_filter = preg_replace("/[^a-z]/i", '', $line_filter); // strip anything we don't want

}

 

$vendors_id = 1;

if (isset ($_GET['vendors_id']) && $_GET['vendors_id'] != '') {

$vendors_id = (int) $_GET['vendors_id'];

}

 

$show_order = '';

if (isset ($_GET['show_order']) && $_GET['show_order'] != '') {

$show_order = $_GET['show_order'];

$show_order = preg_replace("(\r\n|\n|\r)", '', $show_order); // Remove CR &/ LF

$show_order = preg_replace("/[^a-z]/i", '', $show_order); // strip anything we don't want

}

 

switch ($line_filter) {

case 'prod' :

$sort_by_filter = 'pd.products_name';

break;

case 'vpid' :

$sort_by_filter = 'p.vendors_prod_id';

break;

case 'pid' :

$sort_by_filter = 'p.products_id';

break;

case 'qty' :

$sort_by_filter = 'p.products_quantity';

break;

case 'vprice' :

$sort_by_filter = 'p.vendors_product_price';

break;

case 'price' :

case '' :

default :

$sort_by_filter = 'p.products_price';

break;

}

 

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">

<script language="javascript" src="includes/general.js"></script>

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">

<!-- header //-->

<?php require_once(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

<table border="0" width="100%" cellspacing="2" cellpadding="2">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">

<!-- left_navigation //-->

<?php require_once(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<?php

 

$vendors_query = tep_db_query ("select vendors_id,

vendors_name

from " . TABLE_VENDORS . "

order by vendors_name

");

while ($vendors = tep_db_fetch_array ($vendors_query) ) {

$vendors_array[] = array (

'id' => $vendors['vendors_id'],

'text' => $vendors['vendors_name']

);

}

?>

<td class="main" align="left"><?php echo TABLE_HEADING_VENDOR_CHOOSE . ' '; ?><?php echo tep_draw_form ('vendors_report', FILENAME_PRODS_VENDORS) . tep_draw_pull_down_menu ('vendors_id', $vendors_array,'','onchange="this.form.submit()";') . '<noscript>' . tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</noscript>';;?></form></td>

<td class="main" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_VENDORS) . '"><b>Go To Vendors List</a>';?><td>

</tr>

<tr>

<td class="main" align="left">

<?php

 

if ($show_order == 'desc') {

// Test code -- 3 lines

echo 'Click for <a href="' . tep_href_link (FILENAME_PRODS_VENDORS, '&vendors_id=' . $vendors_id . '&line=' . $line_filter . '&show_order=asc') . '"><b>ascending order</b></a>';

} else {

echo 'Click for <a href="' . tep_href_link (FILENAME_PRODS_VENDORS, '&vendors_id=' . $vendors_id . '&line=' . $line_filter . '&show_order=desc') . '"><b>descending order</b></a>';

}

?>

</td>

</tr>

</table></td>

</tr>

<?php

 

if (isset ($vendors_id)) {

 

// $vendors_id = $HTTP_POST_VARS['vendors_id'];

$vend_query_raw = "select vendors_name as name from " . TABLE_VENDORS . " where vendors_id = '" . $vendors_id . "'";

$vend_query = tep_db_query ($vend_query_raw);

$vendors = tep_db_fetch_array ($vend_query);

?>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="1">

<tr class="dataTableHeadingRow">

<td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_VENDOR; ?></td>

<td class="dataTableHeadingContent" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_PRODS_VENDORS, 'vendors_id=' . $vendors_id . '&line=prod') . '">' . TABLE_HEADING_PRODUCTS_NAME . '</a>'; ?> </td>

<td class="dataTableHeadingContent" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_PRODS_VENDORS, 'vendors_id=' . $vendors_id . '&line=vpid') . '">' . TABLE_HEADING_VENDORS_PRODUCT_ID . '</a>'; ?></td>

<td class="dataTableHeadingContent" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_PRODS_VENDORS, 'vendors_id=' . $vendors_id . '&line=pid') . '">' . TABLE_HEADING_PRODUCTS_ID . '</a>'; ?></td>

<td class="dataTableHeadingContent" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_PRODS_VENDORS, 'vendors_id=' . $vendors_id . '&line=qty') . '">' . TABLE_HEADING_QUANTITY . '</a>'; ?></td>

<td class="dataTableHeadingContent" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_PRODS_VENDORS, 'vendors_id=' . $vendors_id . '&line=vprice') . '">' . TABLE_HEADING_VENDOR_PRICE . '</a>'; ?></td>

<td class="dataTableHeadingContent" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_PRODS_VENDORS, 'vendors_id=' . $vendors_id . '&line=price') . '">' . TABLE_HEADING_PRICE . '</a>'; ?></td>

</tr>

<tr class="dataTableRow">

<td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_VENDORS, '&vendors_id=' . $vendors_id . '&action=edit') . '" TARGET="_blank"><b>' . $vendors['name'] . '</a></b>'; ?></td>

<td class="dataTableContent"><?php echo ''; ?></td>

<td class="dataTableContent"><?php echo ''; ?></td>

<td class="dataTableContent"><?php echo ''; ?></td>

<td class="dataTableContent"><?php echo ''; ?></td>

<td class="dataTableContent"><?php echo ''; ?></td>

<td class="dataTableContent"><?php echo ''; ?></td>

 

<?php

 

// if (isset($HTTP_GET_VARS['page']) && ($HTTP_GET_VARS['page'] > 1)) $rows = $HTTP_GET_VARS['page'] * MAX_DISPLAY_SEARCH_RESULTS - MAX_DISPLAY_SEARCH_RESULTS;

$rows = 0;

if ($show_order == 'desc') {

$products_query_raw = "select p.products_id, p.vendors_id, pd.products_name, p.products_quantity , p.products_price, p.vendors_product_price, p.vendors_prod_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.vendors_id = " . $vendors_id . " and pd.language_id = " . $languages_id . " order by " . $sort_by_filter . " desc";

} elseif ($show_order == 'asc') {

$products_query_raw = "select p.products_id, p.vendors_id, pd.products_name, p.products_quantity , p.products_price, p.vendors_product_price, p.vendors_prod_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.vendors_id = " . $vendors_id . " and pd.language_id = " . $languages_id . " order by " . $sort_by_filter . " asc";

} else {

$products_query_raw = "select p.products_id, p.vendors_id, pd.products_name, p.products_quantity , p.products_price, p.vendors_product_price, p.vendors_prod_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.vendors_id = " . $vendors_id . " and pd.language_id = " . $languages_id . " order by " . $sort_by_filter . "";

}

/* $products_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $products_query_raw, $products_query_numrows);

Decide not to use SPLIT pages for the $vendors_id variable not being maintained.

*/

 

$products_query = tep_db_query ($products_query_raw);

while ($products = tep_db_fetch_array ($products_query)) {

$rows++;

 

if (strlen ($rows) < 2) {

$rows = '0' . $rows;

}

?>

<tr class="dataTableRow">

<?php

 

if ($products['vendors_prod_id'] == '') {

$products['vendors_prod_id'] = 'None Specified';

}

?>

<td class="dataTableContent"><?php echo ''; ?></td>

<td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=new_product&pID=' . $products['products_id']) . '" TARGET="_blank"><b>' . $products['products_name'] . '</a></b>'; ?></td>

<td class="dataTableContent"><?php echo $products['vendors_prod_id']; ?></td>

<td class="dataTableContent"><?php echo $products['products_id']; ?></td>

<td class="dataTableContent" align="left"><?php echo $products['products_quantity']; ?> </td>

<td class="dataTableContent"><?php echo $products['vendors_product_price']; ?></td>

<td class="dataTableContent"><?php echo $products['products_price']; ?></td>

</tr>

<?php

 

}

}

?>

</table></td>

</tr>

<tr>

<td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="smallText" valign="top">

<?php

 

// echo $products_split->display_count($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS);

?>

</td>

<td class="smallText" align="right">

<?php

 

// echo $products_split->display_links($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'].$vendors_id);

?>

</td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table></td>

<!-- body_text_eof //-->

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<?php require_once(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

</body>

</html>

<?php require_once(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Edited by pomarja
Link to comment
Share on other sites

That appears to be the stock module. I'm afraid I can't offer any more suggestions. That code works on several stores that I have installed it on, using very similar versions of PHP and MySQL. There must be some difference between your install and mine, but I just can't find it.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Ok, I really appreciate the help earlier. I found a syntax error and fixed it (wow!)

 

Now, I have a problem editing/inputting new products. The error is:

 

TEXT_VENDORS_PROD_COMMENTS

Fatal error: Call to undefined function tep_get_vendors_prod_comments() in /home2/arabyboo/public_html/shop/admin/categories.php on line 647

 

I've looked at categories.php and I don't see any obvious syntax errors, but I'm a php newbie. I downloaded MVS only recently so I'm sure it's the most recent version (v. 1.2.3)

 

Here is line 647:

 

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_textarea_field('vendors_prod_comments', 'soft', '70', '5', (isset($vendors_prod_comments) ? $vendors_prod_comments : tep_get_vendors_prod_comments($pInfo->products_id))); ?></td>

 

Oh, my ultimate goal here is to set up a drop-ship operation, so I'm counting on MVS to be my solution to help facilitate all the orders - to e-mail the vendors when orders come in. Are there any other (free) solutions which I might look into?

 

I do need to set up vendor and item profiles, though. Some vendors will want to charge more for shipping or will have special items which require a different shipping profile.

 

I've looked, but I haven't seen much discussion of drop-ship here in the forums. Anyone know of such a forum?

Link to comment
Share on other sites

tep_get_vendors_prod_comments() is defined in catalog/admin/includes/functions/general.php, so it looks like you missed an edit there.

 

We wrote MVS because there was no other solution available. If there's any other way to do it, I'm not aware of it. There are a number of people here who are using drop-ship, but they tend to be fairly quiet. You'll probably gen an answer if you ask a specific question on the forum.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

tep_get_vendors_prod_comments() is defined in catalog/admin/includes/functions/general.php, so it looks like you missed an edit there.

 

We wrote MVS because there was no other solution available. If there's any other way to do it, I'm not aware of it. There are a number of people here who are using drop-ship, but they tend to be fairly quiet. You'll probably gen an answer if you ask a specific question on the forum.

 

Regards

Jim

 

Jim,

 

Thanks a ton! I'm glad to know I'm on the right track with MVS - it's PHP which is my problem...

 

I'm confused though - how did I miss an edit? I don't understand what you mean. That is, what should I be editing and to what parameters?

 

I did just find what I think was a syntax error where a comment was missing a space (it read //MVS where I think it needs to be // MVS)

 

Any ideas?

 

Thanks again - I'm looking forward to implementing your great tool in my new business!

Edited by Hobart
Link to comment
Share on other sites

That function was added to catalog/admin/includes/functions/general.php by MVS. If PHP is complaining that it's not defined, you didn't add it. Do a compare with your version and the one in the MVS distribution and you'll see the missing code.

 

Comments were hand-typed, and there's no syntax checking, so missing spaces are entirely likely. Search for MVS and you should be OK. There may still be some comments from Vendor Order Email, but I think I got all of those replaced.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

That function was added to catalog/admin/includes/functions/general.php by MVS. If PHP is complaining that it's not defined, you didn't add it. Do a compare with your version and the one in the MVS distribution and you'll see the missing code.

 

Comments were hand-typed, and there's no syntax checking, so missing spaces are entirely likely. Search for MVS and you should be OK. There may still be some comments from Vendor Order Email, but I think I got all of those replaced.

 

Regards

Jim

 

Jim - Thanks so much. I hope you can be patient with me. I just need to clarify your statements so that I can hope to fix this...

 

So, I uploaded general.php and this function (function tep_get_vendors_prod_comments()) was inserted by MVS, right? So, the missing code is in my original files. If that's true, then what do I need to do to fix the added code?

 

So, when I compare and find that my original files are missing something, how does this help me? How do I fix the code on the server - what do I need to do in the online code editor?

 

OR

 

Do I need to add this function? In that case, is there a resource where I can find that code so I can plop it into place? I must say that the function seems to be in the file I uploaded (the one on my hard drive.)

 

I'm sorry, I'm missing something here.

 

I thank you for your time here. I'm sure I'll look back at this some day and say "what an idiot!" (in re: myself)

Link to comment
Share on other sites

The missing code is in the MVS files. If you uploaded catalog/admin/includes/functions/general.php from the MVS distribution then you should have it. Perhaps you put the file in the wrong place and osC can't find it?

 

Please don't edit files directly on the server (unless your "server" is a local test box.) Always download (FTP) the files to your local computer, make your changes, and upload the changed files to the server. If you have the files on your local computer, use a file comparison program to compare your file and the one from the MVS distribution. When you see some code in the MVS version that is missing from yours, just copy it over. That's the easiest way to update files on a modified osCommerce setup.

 

Don't worry about asking questions. We all learned this code from scratch at some point. In my case, it was osCommerce, PHP, and MySQL all at once, so I know what you are going through.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

The missing code is in the MVS files. If you uploaded catalog/admin/includes/functions/general.php from the MVS distribution then you should have it. Perhaps you put the file in the wrong place and osC can't find it?

 

Please don't edit files directly on the server (unless your "server" is a local test box.) Always download (FTP) the files to your local computer, make your changes, and upload the changed files to the server. If you have the files on your local computer, use a file comparison program to compare your file and the one from the MVS distribution. When you see some code in the MVS version that is missing from yours, just copy it over. That's the easiest way to update files on a modified osCommerce setup.

 

Don't worry about asking questions. We all learned this code from scratch at some point. In my case, it was osCommerce, PHP, and MySQL all at once, so I know what you are going through.

 

Regards

Jim

 

Jim, you rock man.

 

I may have put it in the wrong place. I've suspected this...

 

I'll delete what I have on my hard drive and download a fresh copy, install and see what happens!

 

I'm also on the same learning curve. I've purchased a PHP/SQL book (o'reilly to the rescue) and hope to learn this stuff as I go!

 

Oh, I have to learn how to be an editor and businessman, too!

 

Onward!

 

Cheers, Hobie

Link to comment
Share on other sites

Hello,

I Installed MVS and everything works fine. When I go to checkout_shipping.php and turn on Kiss Error & Debugging, following errors occur:

 

Error: Undefined variable: order_id
File: includes/classes/order.php
Line: 288
Error: Undefined index: 1
File: includes/classes/shopping_cart.php
Line: 369
Error: Undefined index: weight
File: includes/classes/shopping_cart.php
Line: 369
Error: Undefined index: cost
File: includes/classes/shopping_cart.php
Line: 370
Error: Undefined index: qty
File: includes/classes/shopping_cart.php
Line: 371
Error: Undefined index: ship_cost
File: includes/classes/shopping_cart.php
Line: 373
Error: Undefined variable: shipping_tax
File: includes/modules/vendor_shipping.php
Line: 44

 

Is someone able to fix that?

 

Kind regards

Link to comment
Share on other sites

  • 2 weeks later...

Hello, I recently installed MVS 1.2.3 by copying all of the files over to my existing install and I ran the SQL script but I am now receiving the following error:

 

 

Fatal error: Call to a member function add_current_page() on a non-object in /home/wiccanel/public_html/catalog/includes/application_top.php on line 322

 

 

Anyone know what I did wrong?

 

Thanks,

 

 

Jason

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...