Jump to content
blucollarguy

Multi_Vendor_Shipping new thread

Recommended Posts

FYI -

 

I'm still not getting anything with the USPS module.

 

Any ideas  ??

 

Thx.

 

Jeff.

 

 

FOUND IT !!!

 

This one - is - a code problem :)

 

In the usps.php file, this function:

 

 

function enabled($vendors_id='1') {

$this->enabled = false;

$status = @constant('MODULE_SHIPPING_USPS_RATES_STATUS_' . $vendors_id);

if (isset ($status) && $status != '') {

$this->enabled = (($status == 'True') ? true : false);

}

 

 

should be as follows:

 

 

function enabled($vendors_id='1') {

$this->enabled = false;

$status = @constant('MODULE_SHIPPING_USPS_STATUS_' . $vendors_id);

if (isset ($status) && $status != '') {

$this->enabled = (($status == 'True') ? true : false);

}

Share this post


Link to post
Share on other sites
FYI -

 

I'm still not getting anything with the USPS module.

 

Any ideas  ??

 

Thx.

 

Jeff.

 

You also need to change the following in usps.php:

 

 

if ( ($this->enabled == true) && ((int)constant('MODULE_SHIPPING_USPS_RATES_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_USPS_RATES_ZONE_' . $vendors_id) . "' and zone_country_id = '" . $this->delivery_country_id . "' order by zone_id");

 

 

It should be :

 

 

if ( ($this->enabled == true) && ((int)constant('MODULE_SHIPPING_USPS_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_USPS_ZONE_' . $vendors_id) . "' and zone_country_id = '" . $this->delivery_country_id . "' order by zone_id");

 

 

Jeff.

Share this post


Link to post
Share on other sites

One other bug I found today.

 

In the Administration area, when you view an order the shipping line shows that tax for the shipping charge, but the items are not showing the prices with tax added under the columns "Price (inc)" and "Total (inc)".

 

Under those columns, the prices shown are the same as the price in the "Price (exc)" and "Total (exc)" columns.

 

Since the total order tax is shown down in the totals area, it might be cleaner to drop the "(inc)" columns ?? I'm not sure. At this point, though, they are not displaying correctly.

 

Thanks,

Jeff.

Share this post


Link to post
Share on other sites

Man Jeff, youi've been busy today! Sorry I have not been around, been very busy myself.

 

I will look into each of these bugs and fixes you've found today, thanks for all the work, and especially sharing your finds.

 

These must be the last couple of bugs in this(maybe) :blink:

 

Craig :D


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

Great contribution!

 

Just reporting an error in the cosmetic output in my install (RC4). Affects Vendor Shipping Modules page.

 

In file "admin\vendor_modules.php" around line #83

 

<td class=\"main\">
<?php
//MVS Start
$vendors_query

 

should read

 

<td class="main">
<?php
//MVS Start
$vendors_query ...

 

Also, lines #90-#93 hard code english messages - these should really be tied into an includes/english define.

Edited by moosey_jude

Share this post


Link to post
Share on other sites

Further minor cosmetic error (RC4)

 

Affects Vendor Manager - New Vendor - Vendor Admin

 

File admin\includes\languages\english\vendors.php Line #56 reads

 

define('TEXT_VENDOR_CITY', 'City"');

 

should be

 

define('TEXT_VENDOR_CITY', 'City:');

 

Cheers.

Share this post


Link to post
Share on other sites

I have a question regarding shipping weights. I'm using the zone shipping method with a test vendor and at checkout the shipping method is showing correctly however the shipping weight is showing as the sum of the cart item weights and doesn't include any tare weight per item (which I understand to take into account the additional weight of packaging per item). I've not had time yet to investigate whether the shipping cost is being pulled from the table inclusive of the tare weight(s) or whether this parameter is being ignored altogether.

 

Anyway, I'd appreciate a little enlightenment if anyone can spare the time and is in the know :)

Share this post


Link to post
Share on other sites

Showing my ignorance here - but I notice a reference to a 'freeshipping' module in the MVS code. Which module is this referring to? as I don't seem to have a 'free shipping' module as part of the RC4 release and there are a number of 'free shipping' contributions that don't directly identify themselves as being MVS compatible. (I know I can work-around using the Flat rate module and a zone to do what I want.)

 

Tone.

Share this post


Link to post
Share on other sites
I've not had time yet to investigate whether the shipping cost is being pulled from the table inclusive of the tare weight(s) or whether this parameter is being ignored altogether.

 

Well I've investigated further and the tare weights don't appear to be included when pulling the shipping cost from the zones table. I suggest this is in error - anyone save me some time and point me to the right file/code snippet to look at?

Share this post


Link to post
Share on other sites

moosey_jude --

 

You've been busy! And you pay close attention to detail, that's good.

 

The "free shipping" is in admin->Modules->Order Total->Shipping.

 

From there you can set free shipping based on the order amount. This is standard osC stuff, it's already in there and MVS attempts to continue to support it.

 

Tare weights are not supported from the "Zones" module per sey as far as I know, but I have never used the "Zones" table for shipping, so I could be wrong. Sorry I can't help you much with that. However, if you look through the other modules, you will find the code that calls and puts to use the "tare weights", perhaps you can work it into the zones module.

The module offering a quote using the "sum" of the cart contents is obviously wrong. I'll have to take a look at the variables passing the "$shipping_weight", they are set in catalog/classes/shopping_cart.php and passed on from there to the module, something within the zones module is missing or out of whack.

 

And thanks for the other bug notices, no matter how minor, I need to know about them.

 

Craig :)

Edited by blucollarguy

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

Don't know if anyone remembers, but a little while ago I said I was going to start work on allowing the vendors access to the admin panel using Admin with levels contrib. So that they could view thier part of an order and packing slip etc...

 

Well I am a little way down the road, I can now add an admin user who is placed in the Vendors group. And then add that admin account as a vendor because they are placed in the vendors admin group.

 

Here begins my issue, the code below is how I am pulling the correct admin users from the database and placing them into a drop down list within vendors.php?action=new, but obviously I do not want to display current vendors in the drop down list. I am a little concerned about the loop going over the vendor_members query. Does anyone have any suggestions about how I could improve on this.

 

// ORDERSMP add a dropdown list with current available admin members not currently a vendor. NOTE: admin_group_id = 5 is the admin group setup for Vendors.
? ?$admin_memberses = array();
$admin_members_query = tep_db_query("select admin_id, admin_email_address from " . TABLE_ADMIN . " where admin_groups_id = 5");
? ?while($admin_members = tep_db_fetch_array($admin_members_query))
{
? $vendor_members_query = tep_db_query("select vendors_id from " . TABLE_VENDORS . " where vendors_id = " . $admin_members['admin_id']);
? if(!$vendor_members = tep_db_fetch_array($vendor_members_query))
? {
? ? $admin_memberses[] = array('id' => $admin_members['admin_id'],
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'text' => $admin_members['admin_email_address']);
? }
}
? ?echo tep_draw_pull_down_menu('vendors_id', $admin_memberses);

 

Thanks for your time.

Edited by MPeace

Matt Peace

Share this post


Link to post
Share on other sites

Craig

 

Thanks for the encouraging comments. I have to say being new to the contribution I got a bit confused. So having now set the Tare weight in the Vendor Admin rather than the standard Shipping/Packaging module :-" I now observe that a single Tare weight is added where multiple numbers of an item are placed in the cart. I would expect the desired behaviour to be that the Tare weight is added for each item above a single item. Thanks for the pointers into the code - I'll investigate and post any mods back to the forum.

 

Tony.

Share this post


Link to post
Share on other sites
Don't know if anyone remembers, but a little while ago I said I was going to start work on allowing the vendors access to the admin panel using Admin with levels contrib. So that they could view thier part of an order and packing slip etc...

 

Well I am a little way down the road, I can now add an admin user who is placed in the Vendors group.  And then add that admin account as a vendor because they are placed in the vendors admin group.

 

Here begins my issue,  the code below is how I am pulling the correct admin users from the database and placing them into a drop down list within vendors.php?action=new, but obviously I do not want to display current vendors in the drop down list. I am a little concerned about the loop going over the vendor_members query.  Does anyone have any suggestions about how I could improve on this.

 

// ORDERSMP add a dropdown list with current available admin members not currently a vendor. NOTE: admin_group_id = 5 is the admin group setup for Vendors.
   $admin_memberses = array();
$admin_members_query = tep_db_query("select admin_id, admin_email_address from " . TABLE_ADMIN . " where admin_groups_id = 5");
   while($admin_members = tep_db_fetch_array($admin_members_query))
{
  $vendor_members_query = tep_db_query("select vendors_id from " . TABLE_VENDORS . " where vendors_id = " . $admin_members['admin_id']);
  if(!$vendor_members = tep_db_fetch_array($vendor_members_query))
  {
    $admin_memberses[] = array('id' => $admin_members['admin_id'],
                              'text' => $admin_members['admin_email_address']);
  }
}
   echo tep_draw_pull_down_menu('vendors_id', $admin_memberses);

 

Thanks for your time.

 

I'm not entirely clear on what you are asking. But, if you are asking about how to eliminate current Vendors from the "Admin Vendors" list, I guess you would have to do a compare using the email address. I will think on it a bit, this is not something in the way of code work that I have done before.

 

It sounds like you've gotten it pretty good though. Keep up the good work!

 

 

Tony,

 

sounds great, I had always assumed the tare weight was to be used for the entire shipment, I guess there could be a per product tare weight. Let us know what you end up with, and thanks for the input.

 

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

I just installed RC4 on my test site and overall it is a great piece of work. I have found a couple of problems though.

 

In the USPS module I can't remove any of the international shipping options or the diplay weight or display transit time options. If I uncheck them they are not removed and are checked the next time I edit the module.

 

The second problem I have found is if I go through checkout but don't finish and go back to the sites homepage and then go to checkout again there is no shipping method selected by default and you can then checkout without paying for shipping. I checked to see if I could make the same thing happen on my live store and it does not.

 

Great work on this and it looks like it is almost ready.

 

Sean Hawkes

Share this post


Link to post
Share on other sites
I just installed RC4 on my test site and overall it is a great piece of work. I have found a couple of problems though.

 

In the USPS module I can't remove any of the international shipping options or the diplay weight or display transit time options. If I uncheck them they are not removed and are checked the next time I edit the module.

 

The second problem I have found is if I go through checkout but don't finish and go back to the sites homepage and then go to checkout again there is no shipping method selected by default and you can then checkout without paying for shipping. I checked to see if I could make the same thing happen on my live store and it does not.

 

Great work on this and it looks like it is almost ready.

 

Sean Hawkes

 

The USPS problem I know about and am trying to get to it. I'm having a hard time getting them to accept my information in order to test. Hopefully I'll get by it soon.

 

The ability to check out without a shipping charge could be a real problem though.

 

Hmmmmmmmmmm!

 

We will definitely need to look into that one.

 

Thanks, 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

I think I have a solution to the USPS module problem. In admin/includes/functions/general.php this section of code in the instructions is to be added after line 1357 but before the closing ?>

//MVS Start
 // Alias function for array of configuration values in the Administration Tool
 function tep_cfg_select_multioption($select_array, $key_value, $key = '') {
   for ($i=0; $i<sizeof($select_array); $i++) {
     $name = (($key) ? 'configuration[' . $key . '][]' : 'configuration_value');
     $string .= '<br><input type="checkbox" name="' . $name . '" value="' . $select_array[$i] . '"';
     $key_values = explode( ", ", $key_value);
     if ( in_array($select_array[$i], $key_values) ) $string .= 'CHECKED';
     $string .= '> ' . $select_array[$i];
   }
   return $string;
 }
//MVS End

 

Instead you should find this section of code and put the above right after it

////
// Alias function for module configuration keys
 function tep_mod_select_option($select_array, $key_name, $key_value) {
   reset($select_array);
   while (list($key, $value) = each($select_array)) {
     if (is_int($key)) $key = $value;
     $string .= '<br><input type="radio" name="configuration[' . $key_name . ']" value="' . $key . '"';
     if ($key_value == $key) $string .= ' CHECKED';
     $string .= '> ' . $value;
   }

   return $string;
 }

 

So far everything is working for the USPS module on my test site.

 

Sean Hawkes

Edited by shawkes

Share this post


Link to post
Share on other sites

I just installed MVS to my store. I deleted all of the vendors before this. Then couldnt create any others so I re-installed my shop. Now that it is re-installed I still can't create a vendor and it doesnt even give me the sample ones with the fresh install either. I have no clue whats going on at all.

 

Thanks For the future help!!,

Billy

Edited by tates

Share this post


Link to post
Share on other sites

MVS only sets one vendor -- the default, ID #1. This is in the database install (mvs.sql.) You can create this one manually using the vendors page in the Admin or with your database management tool. If you do this, make certain that you set this vendor's ID to 1.

 

The SQL to install the default vendor is:

INSERT INTO `vendors` VALUES (1, 'Store Owner', 'My Store', '555-543-9988', '', '', 'owner@mystore.com', 'www.mvs.com', '', '2005-03-09 19:51:22', '2005-03-09 19:51:22', NULL, 1, 2, 'change', '889977 Astreet', 'Somewhere', 'MV', '223', '', '9999999', 0.00, 0.000, 0.00, 40.000, 0, 3);

 

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

OK I need some help. When I try to checkout I get this error. I get as soon as I click Continue on the delivery Information Screen.

 

Warning: reset(): Passed variable is not an array or object in /home/choiceau/public_html/includes/classes/vendor_shipping.php on line 48

 

Warning: Cannot modify header information - headers already sent by (output started at /home/choiceau/public_html/includes/classes/vendor_shipping.php:48) in /home/choiceau/public_html/includes/functions/general.php on line 29

 

Can anyone help me out with this one??

Share this post


Link to post
Share on other sites

This can happen if you don't have any shipping modules installed for a particular vendor. Each vendor needs to have at least one shipping module installed.

 

If you have at least one module installed for each vendor, then the system is not reading the database correctly, or possibly the Vendors admin is not setting the constants correctly. The vendor_configuration table should have values for the configuration_key field that look like MODULE_VENDOR_SHIPPING_INSTALLED_# (where # is the vendor ID number) for all vendors. If these values do nto exist, check that you have installed all of the Admin files.

 

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

Ok now its letting me check out but its not calculating the shipping amount. I have the worst luck with contributions ahhah. Says it was unable to obtain a rate quote. Do I have to Install UPS in both the modules and vendors??

 

Thanks for the help!!

Edited by tates

Share this post


Link to post
Share on other sites

The UPS module needs to be installed in includes/modules/vendor_shipping/. The MVS distribution contains a copy of the UPS module.

 

This sounds more like a setup problem. Do you have a complete address set up for your vendor? Is all of the information in the module settings correct?

 

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

Yes, everythign is in there correct. Here is something else that I think is wrong. When you go into the manage vendor here is what it shows, and I'm pretty sure this is an error HAHA. Heres the link to a pic of what the error is.

http://www.choiceautoenhancements.com/images/MVSERROR.jpg Let me know what the heck this is and thanks for all of your help!!

Share this post


Link to post
Share on other sites

Wow Ok so I figured it out I had a zipcode done like this 45625-6957 HAHAHA

Ok but whats with all of those error messages still??

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

×