Jump to content
blucollarguy

Multi_Vendor_Shipping new thread

Recommended Posts

Hello Jim,

 

Thanks - bugs guts are flying!

 

Working great :thumbsup:

 

Steve

 

Added code to prevent getting the "divide by Zero" error -- find in includes/classes/vendor_shipping.php (line 84):

 ? ? ? ?$vendors_data = tep_db_fetch_array($vendors_data_query); ?//Only the row of the table for this vendor

and add immediately after:

 ? ? ? ?if ($vendors_data['max_box_weight'] == 0) $vendors_data['max_box_weight'] = 1000000;

One more bug squashed.  :P

 

Regards

Jim

Share this post


Link to post
Share on other sites

I have this one added to the next release. Great Jim!

 

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

Hi All,

 

I'm attempting to set up your contrib on a test site. I have a question. How do I know what values to put in for the following fields? Am I supposed to guess or is there somewhere I can get this info?

 

Tare Weight

Percentage-based Tare Weight

Maximum box weight

Number of zones (Zones module)

 

You are all doing a GREAT JOB!

 

TL

Share this post


Link to post
Share on other sites

You need to get this information from your vendor, or from your own shop if you are setting up shipping for yourself. Tare weight is the weight of the box and packing material for small orders. Percentage tare weight is the tare weight as a percentage of the product weight for larger orders. The shipping calculations will use whichever is larger. Maximum box weight is the weight of the heaviest package that you (or your vendor) will ship. Number of zones is the number of zones that you want to set up using the Zones module. If you aren't using this module you can safely ignore this value.

 

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

I've been following this thread and decided to install this contribution. I'm still a newbie depite my subtle list of mods. On my test site, I have a stock OSC layout with MVS installed. The admin page seems ok for now, but I'm unable to complete an order to really find out how the install went. Here is a link to the website, http://www.veedubdesign.com/testsite/catalog/index.php... I was looking through the database and can't seem to add the requested table, any ideas would be great.

 

rudy


The quest for knowledge is a B!%CH!!

Share this post


Link to post
Share on other sites

Run the mvs.sql file included in the distribution. You can use the MySQL command line, phpMyAdmin, your host's control panel, or whatever you use to get access to your database.

 

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

Jim,

I ran it again, and this is what I get:

 

INSERT INTO `configuration`

VALUES ( 325, 'Enable Vendor Shipping', 'SELECT_VENDOR_SHIPPING', 'false', 'Enable Multi-Vendor shipping-(true/false)', 7, 6, '2004-09-07 13:19:40', '2004-05-04 14:43:03', NULL , 'tep_cfg_select_option(array(''true'', ''false''),' )

 

rudy

 

Run the mvs.sql file included in the distribution. You can use the MySQL command line, phpMyAdmin, your host's control panel, or whatever you use to get access to your database.

 

Regards

Jim


The quest for knowledge is a B!%CH!!

Share this post


Link to post
Share on other sites
That error indicates that $vendors_data['max_box_weight'] is zero or not filled in. We probably should have a safety check for this. Anyway, the most likely cause is that you have not specified a maximum weight for this particular vendor. Check your Vendors and add values as appropriate.

 

Regards

Jim

Thanks Jim!

That sloved my cart issue too! I went over my install at least 6 times using a compare and merge program and knew it wasn't there, although I didn't know what the problem was. :thumbsup: BTW I started my Mobile Tool Service 5-1-2005 and it's been keeping me so swamped and I haven't had time to do anything but that, but I'll make the time this weekend to finish updating the instructions, now I know it wasn't something I broke. :P

 

Regards,

James

Share this post


Link to post
Share on other sites

I just noticed that you won't see the error unless you add an item into the shopping cart.

When you do this error populates:

1146 - Table 'testsite.TABLE_VENDORS' doesn't exist

select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id, v.vendors_id, v.vendors_name from products p, products_description pd, TABLE_VENDORS v where p.products_id = '6' and pd.products_id = p.products_id and v.vendors_id = p.vendors_id and pd.language_id = '1'

 

I've run the mvs.sql a few times. I dumped the entire database and reinstalled using the install script.

 

I do have a vendors table in the database, But it looks like its asking for a "table_vendors".

 

This would be a great modification if I can actually configure it correctly...

 

thank you

rudy

 

I've been following this thread and decided to install this contribution. I'm still a newbie depite my subtle list of mods. On my test site, I have a stock OSC layout with MVS installed. The admin page seems ok for now, but I'm unable to complete an order to really find out how the install went. Here is a link to the website, http://www.veedubdesign.com/testsite/catalog/index.php... I was looking through the database and can't seem to add the requested table, any ideas would be great.

 

rudy


The quest for knowledge is a B!%CH!!

Share this post


Link to post
Share on other sites

That error message indicates that you have missed the table definition in includes/database_tables.php. You need to add this to the file:

//MVS Start
 define('TABLE_ORDERS_SHIPPING','orders_shipping');
 define('TABLE_VENDORS', 'vendors');
 define('TABLE_VENDOR_CONFIGURATION', 'vendor_configuration');
//MVS End

 

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

That was it! We're getting there.

I enable MVS in the admin panel. I'm assuming that is all I need to get the shipping working. Here's the next hurdle:

Warning: reset(): Passed variable is not an array or object in /usr/home/sites/www.veedubdesign.com/web/testsite/catalog/includes/classes/vendor_shipping.php on line 48

 

this is at the checkout shipping screen, how can I remedy this?

 

rudy

 

That error message indicates that you have missed the table definition in includes/database_tables.php. You need to add this to the file:

//MVS Start
 define('TABLE_ORDERS_SHIPPING','orders_shipping');
 define('TABLE_VENDORS', 'vendors');
 define('TABLE_VENDOR_CONFIGURATION', 'vendor_configuration');
//MVS End

 

Regards

Jim


The quest for knowledge is a B!%CH!!

Share this post


Link to post
Share on other sites

You need to have at least one vendor set up with at least one shipping module. The default install creates a default vendor for you, but it doesn't set up the shipping module. That's probably why you are getting this error.

 

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

Good Day!

I have the current release on a clean install of OSC, All seemed well until I came to this Parse error: Parse error: parse error, unexpected '.' in /var/www/catalog/includes/vendor_order_data.php on line 85.... My experiences with the simple parse errors have not been pleasant. My instinct tells me to refer to the line in question and correct the error. BUT, will it correct it? Has anyone come across this yet?

 

I'm very excited to see how this will work. Thank you

 

rudy


The quest for knowledge is a B!%CH!!

Share this post


Link to post
Share on other sites

My instinct agrees with yours. Line 85 sholuld be

        $products_ordered .=  "\n\t"  . 'Tax ' . tep_display_tax_value($this->products[$l]['orders_products'][$i]['tax']) . '%  ' . "\n\t"  .

Please try that and see what happens. And thanks for the bug report.

 

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

This is the modified code error: Warning: Cannot modify header information - headers already sent by (output started at /var/www/catalog/includes/vendor_order_data.php:93) in /var/www/catalog/includes/functions/general.php on line 29

 

The sale is still complete on the admin side, but the customer dosen't get confirmation the sale was completed.

 

 

rudy

 

My instinct agrees with yours. Line 85 sholuld be

        $products_ordered .=  "\n\t"  . 'Tax ' . tep_display_tax_value($this->products[$l]['orders_products'][$i]['tax']) . '%  ' . "\n\t"  .

Please try that and see what happens. And thanks for the bug report.

 

Regards

Jim


The quest for knowledge is a B!%CH!!

Share this post


Link to post
Share on other sites

Put your cursor just after the last ?> and hit delete a few times. There can't be any characters outside the code block in that file.

 

Squashing bugs, just one at a time....

 

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

Removing this last period creates the second error message: $products_ordered .= ( . )

This is the modified code error: Warning: Cannot modify header information - headers already sent by (output started at /var/www/catalog/includes/vendor_order_data.php:93) in /var/www/catalog/includes/functions/general.php on line 29

 

The sale is still complete on the admin side, but the customer dosen't get confirmation the sale was completed.

rudy


The quest for knowledge is a B!%CH!!

Share this post


Link to post
Share on other sites

Jim,

Same parse error after the closing tag. I didn't have any code there either, I did delete the tag and got the same message.

 

rudy

 

Put your cursor just after the last ?> and hit delete a few times. There can't be any characters outside the code block in that file.

 

Squashing bugs, just one at a time....

 

Regards

Jim


The quest for knowledge is a B!%CH!!

Share this post


Link to post
Share on other sites

You can't have anything at all after the closing tag: spaces, tabs, returns, any invisible characters. You do need the tag itself, though. Also, please check for anything before the opeing <?php tag and delete that as well.

 

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

Jim,

Going back to the bluecollar.com/osc/, at I get the same error...: Parse error: parse error, unexpected '.' in /home/bcsales/public_html/osc/includes/vendor_order_data.php on line 85

 

Same Line...

 

You can't have anything at all after the closing tag: spaces, tabs, returns, any invisible characters. You do need the tag itself, though. Also, please check for anything before the opeing <?php tag and delete that as well.

 

Regards

Jim


The quest for knowledge is a B!%CH!!

Share this post


Link to post
Share on other sites

Not too surprising; it's the same file.

 

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
Not too surprising; it's the same file.

 

Regards

Jim

Good job guys, I thought I had already fixed that one. It is fixed now.

 

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

Hi,

 

Great contribution, this is an excellent piece of work. I have installed this contribution on my test server and it is running great.

 

I have also installed Multi Admins with Levels, what I am going to attempt to do is allow the vendor to log into the admin and view only thier part of a customers order, this will allow my vendors to send an email to my customers as to when the item was despatched and print off my packing slip to send with the item.

 

I have searched the contributions trying to find something that does what I want but have been unable to, which is why I am now going down the route of modifying the Multi Vendor Shipping with the Multi Admins with levels. But before I start work I thought I should ask the experts if there is already a contrib. that does what I am after.

 

Many thanks for taking the time to read this off topic post.


Matt Peace

Share this post


Link to post
Share on other sites
Craig,

    What corrections did you make on the file?

 

thanx

rudy

In catalog/includes/vendor_order_data.php line 85

 $products_ordered .=  "\n\t"  . 'Tax ' . tep_display_tax_value($this->products[$l]['orders_products'][$i]['tax']) . '%  ' . "\n\t"  .

There was a period right AFTER the "=" sign, bad thing. If you are still getting the "modify header" warning, remove ALL text that is commented out, this block:

/* MVS
    $Id: vendor_order_data.php
By Craig Garrison Sr. (craig@blucollarsales.com) for Multi-Vendor Shipping
     osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2005 osCommerce

 Released under the GNU General Public License
 */

Some servers have been ignoring the comments and causing this problem. Try those things and see if that fixes your problems.

Let us know how it goes, 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

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

×