Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

blucollarguy

Multi_Vendor_Shipping new thread

Recommended Posts

You could tweak this module to work with MVS, I needed Indvidual Shipping for MVS so I had to write it. There are instructions in the MVS download on how to modify othe shipping modules to work with MVS. I just used those.

 

Stephanie :)

 

What do you mean Individual Shipping for MVS?


Wade Morris

Amarillo, Texas

 

Before you do any changes on your site you need to do BACKUP! BACKUP!

Share this post


Link to post
Share on other sites
Guest
Thanks Stephanie,

 

I didn't realize you could have different shipping for each vendor. I think all I'll just setup 2 vendors, one for OEm, and the other for caomptibles. We don't need to forward anything to the vendors since we ship from ourn own inventory.

 

i'm in the process of backing up the store before applying the mod. hope all goes well, if not it may be a long day/night. lol

 

That is the main idea of MVS to allow people to manage shipping of different vendors. I even have one vendor that has 2 types of shipping and I have them setup twice with different shipping for different products. I just treat it like there are two vendors.

 

I redid my store and I have to say that I started with stock OSC and put MVS right over it then used WinMerge to put all my other mods back on. MVS is a very big mod. If you need a testing server on your machine Apache2Triad is a great one.

 

Stephanie :)

Share this post


Link to post
Share on other sites
Guest
What do you mean Individual Shipping for MVS?

 

I needed to charge a different flat shipping rate for each item. And I found MVS and Individual shipping but I had to rewrite Individual Shipping to work with MVS. I used the instructions in the MVS files on how to do it, and had a lot of help from everybody here.

 

You could do the same thing take the code from the table shipping you need (name it something different like pecentage table shipping) and rewrite it to work with MVS. Just follow the instructions on how to do it included in the MVS download. And when you get stuck ask for help here. I'm sure there are others that would find a shipping by percentage addon useful. :D

 

Stephanie

Share this post


Link to post
Share on other sites
Guest
What do you mean Individual Shipping for MVS?

 

I needed to charge a different flat shipping rate for each item. And I found MVS and Individual shipping but I had to rewrite Individual Shipping to work with MVS. I used the instructions in the MVS files on how to do it, and had a lot of help from everybody here.

 

You could do the same thing take the code from the table shipping you need (name it something different like pecentage table shipping) and rewrite it to work with MVS. Just follow the instructions on how to do it included in the MVS download. And when you get stuck ask for help here. I'm sure there are others that would find a shipping by percentage addon useful. :D

 

Stephanie

Share this post


Link to post
Share on other sites
I needed to charge a different flat shipping rate for each item. And I found MVS and Individual shipping but I had to rewrite Individual Shipping to work with MVS. I used the instructions in the MVS files on how to do it, and had a lot of help from everybody here.

 

You could do the same thing take the code from the table shipping you need (name it something different like pecentage table shipping) and rewrite it to work with MVS. Just follow the instructions on how to do it included in the MVS download. And when you get stuck ask for help here. I'm sure there are others that would find a shipping by percentage addon useful. :D

 

Stephanie

 

I rather have someone to rewrite it for me. I am not very good rewriting codes


Wade Morris

Amarillo, Texas

 

Before you do any changes on your site you need to do BACKUP! BACKUP!

Share this post


Link to post
Share on other sites
Guest
I rather have someone to rewrite it for me. I am not very good rewriting codes

 

I'll look at it but I am not promising anything :blink:

Share this post


Link to post
Share on other sites

Ok becuase right now I have 2 seperate stores onto 1 paypal account

Edited by mtechama

Wade Morris

Amarillo, Texas

 

Before you do any changes on your site you need to do BACKUP! BACKUP!

Share this post


Link to post
Share on other sites
That is the main idea of MVS to allow people to manage shipping of different vendors. I even have one vendor that has 2 types of shipping and I have them setup twice with different shipping for different products. I just treat it like there are two vendors.

 

I redid my store and I have to say that I started with stock OSC and put MVS right over it then used WinMerge to put all my other mods back on. MVS is a very big mod. If you need a testing server on your machine Apache2Triad is a great one.

 

Stephanie :)

 

I'm not sure which mods I've installed over the past couple of years. To many to keep track of. I think i'll try your suggestion on using Apache2Triad. I'll start fresh then try to add all the previous mod back in, if i can find them. If I get it to work then I know its safe to upload to the server.

 

thanks,

 

Nate

Share this post


Link to post
Share on other sites

Stephanie is going to see what she can do to get me going. I just really not that good creating or rewriting table shipping or anything.


Wade Morris

Amarillo, Texas

 

Before you do any changes on your site you need to do BACKUP! BACKUP!

Share this post


Link to post
Share on other sites
Jim / Craig,

 

Another globals issue I'm afraid...

 

I had MVS working well UNTIL I tried to change some product attributes...

 

I got the error:

Fatal error: Call to undefined function: link_get_variable() in .../admin/products_attributes.php on line 18

 

My code for admin/products_attributes.php has this piece of code inserted lines 16-21 so it will work register globals disabled:

// >>> BEGIN REGISTER_GLOBALS
// These variables are accessed directly rather than through $HTTP_GET_VARS or $_GET later in this script
link_get_variable('option_page'); //this is line 18 in my code
link_get_variable('value_page');
link_get_variable('attribute_page');
// <<< END REGISTER_GLOBALS

 

Any thoughts or suggestions??

 

Cheers,

 

Paul.

 

Since I posted this I think I have found the source of the problem in admin/includes/functions/general.php and have patched the code to work without register globals... I hope.

 

Cheers,

 

Paul.

Share this post


Link to post
Share on other sites
Guest
Stephanie is going to see what she can do to get me going. I just really not that good creating or rewriting table shipping or anything.

 

Well this is close to what you need...although it isn't working LOL

Any way can someone throw in their 2 cents?

It looks right to me, but the Vendor Shipping Modules page stops loading when it gets to the percent mod.

 

<?php
/*
 $Id: percent.php,v 1.27 2003/02/05 22:41:52 hpdl Exp $
 Modified for MVS V1.0 2006/03/25 JCK/CWG/SJS
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2006 osCommerce

 Released under the GNU General Public License
*/

 class table {
var $code, $title, $description, $icon, $enabled, $vendors_id, $sort_order; //multi vendor

// class constructor
function table() {
  global $order, $vendors_id;

//MVS
//	  $this->vendors_id = ($products['vendors_id'] <= 0) ? 1 : $products['vendors_id'];
  $this->code = 'percent';
  $this->title = MODULE_SHIPPING_PERCENT_TEXT_TITLE;
  $this->description = MODULE_SHIPPING_PERCENT_TEXT_DESCRIPTION;
  $this->icon = '';
  $this->delivery_country_id = $order->delivery['country']['id'];
  $this->delivery_zone_id = $order->delivery['zone_id'];

}

//MVS start
  function sort_order($vendors_id='1') {
 $sort_order = @constant ('MODULE_SHIPPING_PERCENT_SORT_ORDER_' . $vendors_id);
 if (isset ($sort_order)) {		$this->sort_order = $sort_order;
 } else {
   $this->sort_order = '-';
 }
 return $this->sort_order;
  }

			function tax_class($vendors_id='1') {
  $this->tax_class = constant('MODULE_SHIPPING_PERCENT_TAX_CLASS_' . $vendors_id);
					return $this->tax_class;
}

			function enabled($vendors_id='1') {
  $this->enabled = false;
  $status = @constant('MODULE_SHIPPING_PERCENT_STATUS_' . $vendors_id);
					if (isset ($status) && $status != '') {
	$this->enabled = (($status == 'True') ? true : false);
  }
  if ( ($this->enabled == true) && ((int)constant('MODULE_SHIPPING_PERCENT_ZONE_' . $vendors_id) > 0) ) {
	$check_flag = false;
	$check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)constant('MODULE_SHIPPING_PERCENT_ZONE_' . $vendors_id) . "' and zone_country_id = '" . $this->delivery_country_id . "' order by zone_id");
	while ($check = tep_db_fetch_array($check_query)) {
	  if ($check['zone_id'] < 1) {
		$check_flag = true;
		break;
	  }
	   elseif ($check['zone_id'] == $this->delivery_zone_id) {
		$check_flag = true;
		break;
		}
	}

	if ($check_flag == false) {
	  $this->enabled = false;
	}//if
  }//if
  return $this->enabled;
}

			function zones($vendors_id='1') {
  if ( ($this->enabled == true) && ((int)constant('MODULE_SHIPPING_PERCENT_ZONE_' . $vendors_id) > 0) ) {
	$check_flag = false;
	$check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int)constant('MODULE_SHIPPING_PERCENT_ZONE_' . $vendors_id) . "' and zone_country_id = '" . $this->delivery_zone_id . "' order by zone_id");
	while ($check = tep_db_fetch_array($check_query)) {
	  if ($check['zone_id'] < 1) {
		$check_flag = true;
		break;
	  } elseif ($check['zone_id'] == $this->delivery_zone_id) {
		$check_flag = true;
		break;
	  } //if
	}//while

	if ($check_flag == false) {
	  $this->enabled = false;
	}//if
  }//if
					return $this->enabled;
}//function
//MVS End

//Get a quote
function quote($method = '', $module = '', $vendors_id = '1') {
  global $HTTP_POST_VARS, $shipping_weight, $order, $cart, $shipping_num_boxes;

if (MODULE_SHIPPING_PERCENT_STATUS == 'True') {
// edited to work with gift vouchers and 0 weight products
//$order_total = $cart->show_total();
$order_total = $cart->show_total_virtual();
// edited to work with gift vouchers and 0 weight products
}
if ($order_total >= MODULE_SHIPPING_PERCENT_LESS_THEN) {
$shipping_percent = $order_total * MODULE_SHIPPING_PERCENT_RATE;
}
else {
$shipping_percent = MODULE_SHIPPING_PERCENT_FLAT_USE;
}

$this->quotes = array('id' => $this->code,
'module' => MODULE_SHIPPING_PERCENT_TEXT_TITLE,
'methods' => array(array('id' => $this->code,
'title' => MODULE_SHIPPING_PERCENT_TEXT_WAY,
'cost' => $shipping_percent)));

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);

return $this->quotes;
}

//MVS Start
  $vendors_data_query = tep_db_query("select handling_charge,
											 handling_per_box,
											 vendor_country,
											 vendors_zipcode
									  from " . TABLE_VENDORS . "
									  where vendors_id = '" . (int)$vendors_id . "'"
									);
  $vendors_data = tep_db_fetch_array($vendors_data_query);
  $country_name = tep_get_countries($vendors_data['vendor_country'], true);

  $handling_charge = $vendors_data['handling_charge'];
  $handling_per_box = $vendors_data['handling_per_box'];
  if ($handling_charge > $handling_per_box*$shipping_num_boxes) {
	$handling = $handling_charge;
  } else {
	$handling = $handling_per_box*$shipping_num_boxes;
  }
//MVS End

//MVS - Changed 'cost' => $shipping + $handling
  $this->quotes = array('id' => $this->code,
						'module' => MODULE_SHIPPING_PERCENT_TEXT_TITLE,
						'methods' => array(array('id' => $this->code,
												 'title' => MODULE_SHIPPING_PERCENT_TEXT_WAY,
												 'cost' => $shipping_percent + $handling)));

  //	$this->tax_class = constant(MODULE_SHIPPING_PERCENT_TAX_CLASS_ . $vendors_id);
  if ($this->tax_class($vendors_id) > 0) {
	   $this->quotes['tax'] = tep_get_tax_rate($this->tax_class($vendors_id), $order->delivery['country']['id'], $order->delivery['zone_id']);
 }
  if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title);

  return $this->quotes;
}

function check($vendors_id='1') {
  if (!isset($this->_check)) {

  //multi vendor add  "vendors_id = '". $vendors_id ."' and"
	$check_query = tep_db_query("select configuration_value from " . TABLE_VENDOR_CONFIGURATION . " where vendors_id = '". $vendors_id ."' and configuration_key = 'MODULE_SHIPPING_PERCENT_STATUS_" . $vendors_id . "'");
	$this->_check = tep_db_num_rows($check_query);
  }
  return $this->_check;
}						 /////VID

function install($vendors_id) {
//multi vendor add 'vendors_id' to field names and '" . $vendors_id . "', to values
  // $vendors_id = $vendors_id;
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, vendors_id) values ('Enable Percent Shipping', 'MODULE_SHIPPING_PERCENT_STATUS_" . $vendors_id . "', 'True', 'Do you want to offer percent rate shipping?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now(), '" . $vendors_id . "')");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Percentage Rate', 'MODULE_SHIPPING_PERCENT_RATE_" . $vendors_id . "', '.18', 'The Percentage Rate all .01 to .99 for all orders using this shipping method.', '6', '0', now(), '" . $vendors_id . "')");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('A Flat Rate for orders under', 'MODULE_SHIPPING_PERCENT_LESS_THEN_" . $vendors_id . "', '34.75', 'A Flat Rate for all orders that are under the amount shown.', '6', '0', now(), '" . $vendors_id . "')");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('A Flat Rate of', 'MODULE_SHIPPING_PERCENT_FLAT_USE_" . $vendors_id . "', '6.50', 'A Flat Rate used for all orders.', '6', '0', now(), '" . $vendors_id . "')");
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, vendors_id) values ('Tax Class', 'MODULE_SHIPPING_PERCENT_TAX_CLASS_" . $vendors_id . "', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now(), '" . $vendors_id . "')");
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, vendors_id) values ('Shipping Zone', 'MODULE_SHIPPING_PERCENT_ZONE_" . $vendors_id . "', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now(), '" . $vendors_id . "')");
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, vendors_id) values ('Sort Order', 'MODULE_SHIPPING_PERCENT_SORT_ORDER_" . $vendors_id . "', '0', 'Sort order of display.', '6', '0', now(), '" . $vendors_id . "')");
}

function remove($vendors_id) {
  tep_db_query("delete from " . TABLE_VENDOR_CONFIGURATION . " where vendors_id = '". $vendors_id ."' and configuration_key in ('" . implode("', '", $this->keys($vendors_id)) . "')");
}

function keys() {
return array('MODULE_SHIPPING_PERCENT_STATUS_' . $vendors_id, 'MODULE_SHIPPING_PERCENT_RATE_' . $vendors_id, 'MODULE_SHIPPING_PERCENT_LESS_THEN_' . $vendors_id, 'MODULE_SHIPPING_PERCENT_FLAT_USE'_ . $vendors_id, 'MODULE_SHIPPING_PERCENT_TAX_CLASS_' . $vendors_id, 'MODULE_SHIPPING_PERCENT_ZONE_' . $vendors_id, 'MODULE_SHIPPING_PERCENT_SORT_ORDER_' . $vendors_id);
}
}
?>

 

Any help would be appreciated :)

 

Stephanie

Edited by gr8sale

Share this post


Link to post
Share on other sites
Guest

OK this is the error it is trowing up:

 

Parse error: parse error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in C:\xxx\xxx\xxx\catalog\includes\modules\vendors_shipping\percent.php on line 128

 

Jim Craig Mark ????

Share this post


Link to post
Share on other sites
OK this is the error it is trowing up:

 

Parse error: parse error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in C:\xxx\xxx\xxx\catalog\includes\modules\vendors_shipping\percent.php on line 128

 

Jim Craig Mark ????

Stephanie,

 

is this for weight or price?


Wade Morris

Amarillo, Texas

 

Before you do any changes on your site you need to do BACKUP! BACKUP!

Share this post


Link to post
Share on other sites
OK this is the error it is trowing up:

 

Parse error: parse error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in C:\xxx\xxx\xxx\catalog\includes\modules\vendors_shipping\percent.php on line 128

 

Jim Craig Mark ????

You have mismatched closing braces. The class closes at line 161 (should be 192.) I don't have time to look at this further right now, but I'll look at it later if you haven't figured it out by then.

 

Also, you're calling this "percent" but the class name is still "table". This will cause it to fail, since the calling code uses the file name to call the class.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites
Set up a vendor for backordered items that has its own UPS XML module with it's own unique shipping delay code, and set up the site so that any out of stock item is automatically assigned to that vendor.

 

 

If only it were that simple.....

 

all 3 of my main dropshippers offer MANY items that need to be ordered in first.

To create a ton of new vendors based on 4 day delay, 7 day delay, 10 day delay, 14 day delay etc would be WAY too complicated.

 

Can I not just get the UPS module to somehow pull the "date available" and send that as the shipping date instead of todays date + the shipping delay?


Jim Bullen - President

The Cigar Hut Group of Companies

 

 

Installed add-ons: (that now need to be upgraded to OSC CE Phoenix)

PWA, MVS, Easy Populate, Dynamic Sitemap, Featured Products, MVS Order Editor, MVS Shipping Estimator, Google XML Sitemap, About Us, Ad Tracker, Address Enhancer, Also Purchased, Backorders, Category Descriptions, Dynamic Meta Tags, Contact Us Email Subjects, Country state Selector, Extra Address Line, Order Number in Email Subject, OSC Affiliate, Product Extra Fields, Review Approval System, Reviews in Product Display, Sold Out, Sold Out (but Displayed), Ultimate SEO URL's, Updated Spiders, Welcome Email Password, Pending Order Email, Who's Online Enhancement, CCGV, Easy Discounts, Customer Comments, Request a Review, Sales Report, plus many many more!

Share this post


Link to post
Share on other sites
Since I posted this I think I have found the source of the problem in admin/includes/functions/general.php and have patched the code to work without register globals... I hope.

 

Cheers,

 

Paul.

Sorry I wasn't able to post earlier Paul. Glad you seem to have fixed it. Seems like a strange error considering the function it is referring to as "undefined" should be defined by the Register Globals mod. The file you did the fix in is the file I would have guessed was the one being used so I suppose you found the offending code.

 

Is it still working?

 

Craig :)


Happy Coding!

Craig Garrison Sr

Anything worth having, is worth working for.

Multi Vendor Shipping V1.1 Demo Catalog

3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.

Multi Vendor Shipping V1.1 Demo Admin

login: webmaster@blucollarsales.com

pass: mvs_demo

MVS Thread:

Multi-Vendor Shipping

My contribs:

Download Multi Vendor Shipping V1.1

Vendor Email

Vendor Info in easypopulate

EZ Price Updater

And more to come!

Share this post


Link to post
Share on other sites
If only it were that simple.....

 

all 3 of my main dropshippers offer MANY items that need to be ordered in first.

To create a ton of new vendors based on 4 day delay, 7 day delay, 10 day delay, 14 day delay etc would be WAY too complicated.

 

Can I not just get the UPS module to somehow pull the "date available" and send that as the shipping date instead of todays date + the shipping delay?

Yes you can. In includes/modules/vendors_shipping/upsxml.php, do a search for this:

$this->_upsGetTimeServices

This is the date that is shown to the customer. What you can do is create some code in the products page that will add so many days to the current date, and put that number in the database with the product(a new feild would need to be created for it) and then do a query for the number (this could be done from the shopping_cart class) and then use it to add to the current date(date at the time the customer places the order) replace the code I posted, with it. This shouldn't really be too difficult, but will take some time to work thru. Back up all files you work with and go for it. You have nothing to lose but some time, and generally speaking, time is cheaper than people.

 

Good luck, Craig :)


Happy Coding!

Craig Garrison Sr

Anything worth having, is worth working for.

Multi Vendor Shipping V1.1 Demo Catalog

3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.

Multi Vendor Shipping V1.1 Demo Admin

login: webmaster@blucollarsales.com

pass: mvs_demo

MVS Thread:

Multi-Vendor Shipping

My contribs:

Download Multi Vendor Shipping V1.1

Vendor Email

Vendor Info in easypopulate

EZ Price Updater

And more to come!

Share this post


Link to post
Share on other sites
OK this is the error it is trowing up:

 

Parse error: parse error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in C:\xxx\xxx\xxx\catalog\includes\modules\vendors_shipping\percent.php on line 128

 

Jim Craig Mark ????

Odd thing about this is that, in my editor anyway, line 128(which is the same line number my error check says it is) is:

$vendors_data_query = tep_db_query("select handling_charge,

 

When I check each of the braces, the class closes at line 161, which is not correct. You closed the function quotes at the wrong place, go to lines 124 and 125:

return $this->quotes;
}

and delete these two lines, and give it a try.

 

Craig :)


Happy Coding!

Craig Garrison Sr

Anything worth having, is worth working for.

Multi Vendor Shipping V1.1 Demo Catalog

3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.

Multi Vendor Shipping V1.1 Demo Admin

login: webmaster@blucollarsales.com

pass: mvs_demo

MVS Thread:

Multi-Vendor Shipping

My contribs:

Download Multi Vendor Shipping V1.1

Vendor Email

Vendor Info in easypopulate

EZ Price Updater

And more to come!

Share this post


Link to post
Share on other sites

You will also need to replace:

function keys() {
return array('MODULE_SHIPPING_PERCENT_STATUS_' . $vendors_id, 'MODULE_SHIPPING_PERCENT_RATE_' . $vendors_id, 'MODULE_SHIPPING_PERCENT_LESS_THEN_' . $vendors_id, 'MODULE_SHIPPING_PERCENT_FLAT_USE'_ . $vendors_id, 'MODULE_SHIPPING_PERCENT_TAX_CLASS_' . $vendors_id, 'MODULE_SHIPPING_PERCENT_ZONE_' . $vendors_id, 'MODULE_SHIPPING_PERCENT_SORT_ORDER_' . $vendors_id); 
}

 

with:

function keys() {
return array('MODULE_SHIPPING_PERCENT_STATUS_' . $vendors_id, 'MODULE_SHIPPING_PERCENT_RATE_' . $vendors_id, 'MODULE_SHIPPING_PERCENT_LESS_THEN_' . $vendors_id, 'MODULE_SHIPPING_PERCENT_FLAT_USE_' . $vendors_id, 'MODULE_SHIPPING_PERCENT_TAX_CLASS_' . $vendors_id, 'MODULE_SHIPPING_PERCENT_ZONE_' . $vendors_id, 'MODULE_SHIPPING_PERCENT_SORT_ORDER_' . $vendors_id);
}

 

And you should get no more errors.

 

Craig :)


Happy Coding!

Craig Garrison Sr

Anything worth having, is worth working for.

Multi Vendor Shipping V1.1 Demo Catalog

3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.

Multi Vendor Shipping V1.1 Demo Admin

login: webmaster@blucollarsales.com

pass: mvs_demo

MVS Thread:

Multi-Vendor Shipping

My contribs:

Download Multi Vendor Shipping V1.1

Vendor Email

Vendor Info in easypopulate

EZ Price Updater

And more to come!

Share this post


Link to post
Share on other sites
Yes you can. In includes/modules/vendors_shipping/upsxml.php, do a search for this:

$this->_upsGetTimeServices

This is the date that is shown to the customer. What you can do is create some code in the products page that will add so many days to the current date, and put that number in the database with the product(a new feild would need to be created for it) and then do a query for the number (this could be done from the shopping_cart class) and then use it to add to the current date(date at the time the customer places the order) replace the code I posted, with it. This shouldn't really be too difficult, but will take some time to work thru. Back up all files you work with and go for it. You have nothing to lose but some time, and generally speaking, time is cheaper than people.

 

Good luck, Craig :)

 

Thanks for the suggestions Craig,

But rather than making new table entries, what I was thinking, in upsxml.php was to modify

		$this->today = date("Ymd");

and

	  if (constant('SHIPPING_DAYS_DELAY_' . $vendors_id) > 0) {
	$shipdate = date("Ymd", time()+(86400*constant('SHIPPING_DAYS_DELAY_' . $vendors_id)));
  } else {
	$shipdate = $this->today;
  }

 

to pull the products_date_available variable from the products table and use that date instead of today's date

 

from what I can see this would have to be tied into checkout_shipping.php and a variable then passed to the shipping module.

 

I have an idea what to do, but can't get a grip on how to do it


Jim Bullen - President

The Cigar Hut Group of Companies

 

 

Installed add-ons: (that now need to be upgraded to OSC CE Phoenix)

PWA, MVS, Easy Populate, Dynamic Sitemap, Featured Products, MVS Order Editor, MVS Shipping Estimator, Google XML Sitemap, About Us, Ad Tracker, Address Enhancer, Also Purchased, Backorders, Category Descriptions, Dynamic Meta Tags, Contact Us Email Subjects, Country state Selector, Extra Address Line, Order Number in Email Subject, OSC Affiliate, Product Extra Fields, Review Approval System, Reviews in Product Display, Sold Out, Sold Out (but Displayed), Ultimate SEO URL's, Updated Spiders, Welcome Email Password, Pending Order Email, Who's Online Enhancement, CCGV, Easy Discounts, Customer Comments, Request a Review, Sales Report, plus many many more!

Share this post


Link to post
Share on other sites
Thanks for the suggestions Craig,

But rather than making new table entries, what I was thinking, in upsxml.php was to modify

		$this->today = date("Ymd");

and

	  if (constant('SHIPPING_DAYS_DELAY_' . $vendors_id) > 0) {
	$shipdate = date("Ymd", time()+(86400*constant('SHIPPING_DAYS_DELAY_' . $vendors_id)));
  } else {
	$shipdate = $this->today;
  }

 

to pull the products_date_available variable from the products table and use that date instead of today's date

 

from what I can see this would have to be tied into checkout_shipping.php and a variable then passed to the shipping module.

 

I have an idea what to do, but can't get a grip on how to do it

You'll need to call that date from the shopping_cart class and add it to the products array, that will give you acces to it by the module. Then, in the module, replace "$this->today = date("Ymd");" with the date you get from the products_date_available. You could do a check of some sort to find out wether or not you want to do this on what products, but keeping it simple, this should work fine.

 

Craig :)


Happy Coding!

Craig Garrison Sr

Anything worth having, is worth working for.

Multi Vendor Shipping V1.1 Demo Catalog

3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.

Multi Vendor Shipping V1.1 Demo Admin

login: webmaster@blucollarsales.com

pass: mvs_demo

MVS Thread:

Multi-Vendor Shipping

My contribs:

Download Multi Vendor Shipping V1.1

Vendor Email

Vendor Info in easypopulate

EZ Price Updater

And more to come!

Share this post


Link to post
Share on other sites
Sorry I wasn't able to post earlier Paul. Glad you seem to have fixed it. Seems like a strange error considering the function it is referring to as "undefined" should be defined by the Register Globals mod. The file you did the fix in is the file I would have guessed was the one being used so I suppose you found the offending code.

 

Is it still working?

 

Craig :)

 

It would have been defined by the Register Globals mod if I'd have noticed it when I was merging the files!

Anyway, the MVS module is working a treat, apart from the vendors product reports and vendors orders list...

 

- Paul -

Share this post


Link to post
Share on other sites
It would have been defined by the Register Globals mod if I'd have noticed it when I was merging the files!

Anyway, the MVS module is working a treat, apart from the vendors product reports and vendors orders list...

 

- Paul -

 

I think I've got the whole thing working without register globals now.

 

In admin/prods_by_vendor.php, I've linked 'vendors_id':

  require('includes/application_top.php');

 require(DIR_WS_CLASSES . 'currencies.php');

 link_post_variable('vendors_id');

 $currencies = new currencies();
 $line2 = $line;

 

In admin/orders_by_vendor.php, I've linked 'vendors_id' and 'status':

  require('includes/application_top.php');

 require(DIR_WS_CLASSES . 'currencies.php');

 link_post_variable('vendors_id');
 link_post_variable('status');

 $currencies = new currencies();

 

Assuming I didn't forget to include any other Register Globals mods, do you think there are any other areas of concern?

 

All the best,

 

Paul.

Share this post


Link to post
Share on other sites
I think I've got the whole thing working without register globals now.

 

In admin/prods_by_vendor.php, I've linked 'vendors_id':

  require('includes/application_top.php');

 require(DIR_WS_CLASSES . 'currencies.php');

 link_post_variable('vendors_id');

 $currencies = new currencies();
 $line2 = $line;

 

In admin/orders_by_vendor.php, I've linked 'vendors_id' and 'status':

  require('includes/application_top.php');

 require(DIR_WS_CLASSES . 'currencies.php');

 link_post_variable('vendors_id');
 link_post_variable('status');

 $currencies = new currencies();

 

Assuming I didn't forget to include any other Register Globals mods, do you think there are any other areas of concern?

 

All the best,

 

Paul.

I'm kinda surprised you had to do that in these 2 files. I suppose after the intial _POST, I started using what would be the $GLOBAL name, which I shouldn't have done. But, I thought I defined them in the page so that $GLOBALs weren't involved. See what I know. I am setting up a new server for testing with PHP5 and I will be working without $GLOBALS entirely after that, so many updates will be done with MVS at that point.

 

I can't imagine any other such problems.

 

Great work and good luck with your store, Craig :)


Happy Coding!

Craig Garrison Sr

Anything worth having, is worth working for.

Multi Vendor Shipping V1.1 Demo Catalog

3 Vendors, each category, "buy" a product from each category to see how MVS works during checkout.

Multi Vendor Shipping V1.1 Demo Admin

login: webmaster@blucollarsales.com

pass: mvs_demo

MVS Thread:

Multi-Vendor Shipping

My contribs:

Download Multi Vendor Shipping V1.1

Vendor Email

Vendor Info in easypopulate

EZ Price Updater

And more to come!

Share this post


Link to post
Share on other sites
Guest

You have mismatched closing braces. The class closes at line 161 (should be 192.) I don't have time to look at this further right now, but I'll look at it later if you haven't figured it out by then.

 

Also, you're calling this "percent" but the class name is still "table". This will cause it to fail, since the calling code uses the file name to call the class.

 

Regards

Jim

 

 

Thanks for the suggestions Jim :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×