Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi_Vendor_Shipping new thread


blucollarguy

Recommended Posts

As I said here, this is a One Page Checkout incompatibility. You will need to make changes to One Page Checkout. I've never tried to merge it with MVS, so I can't be any more specific than that.

 

Regards

Jim

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

Link to comment
Share on other sites

As I said here, this is a One Page Checkout incompatibility. You will need to make changes to One Page Checkout. I've never tried to merge it with MVS, so I can't be any more specific than that.

 

Regards

Jim

 

Jim,

Thank you for your helps. Tonight, I will uninstall one page checkout so I could use MVS. MVS is what I needed more. Once again, I really appreciated all your helps

 

Best regards,

Link to comment
Share on other sites

Help please..

 

Customers can not place a order in our shop (www.shop.potatopro.com)

 

On the page catalog/checkout_shipping.php I get this warning:

Warning: reset() [function.reset]: Passed variable is not an array or object in /home2/foodinno/public_html/catalog/includes/classes/vendor_shipping.php on line 48

 

On what the next page should be i get:

Warning: reset() [function.reset]: Passed variable is not an array or object in /home2/foodinno/public_html/catalog/includes/classes/vendor_shipping.php on line 48

 

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

 

Code from catalog/includes/classes/vendor_shipping.php

 } else {
       reset($modules_array);
       foreach ($installed_modules_array as $value) {
         $class = substr($value, 0, strrpos($value, '.'));
         $include_modules[] = array('class' => $class, 
                                    'file' => $value);
       }//foreach
     }//if tep_not_null

 

Can some body help me out fixing this error?

Link to comment
Share on other sites

Do you have at least one shipping module installed for each vendor?

 

Regards

Jim

 

Jim,

Check, check and double check, yes there was a vendor without shipping method, however when corrected it did not make a difference.

 

Any other ideas?

 

regards, marja

Link to comment
Share on other sites

The error message is saying that the array does not exist. The array consists of the installed shipping modules. This array comes from MODULE_VENDOR_SHIPPING_INSTALLED_x (where x is the vendor ID.) These values are stored in the vendor_configuration table in your database. Check that there is a value stored for each vendor, and that the value contains the name(s) of one or more shipping modules. Also check for duplicate entries for each vendor.

 

Regards

Jim

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

Link to comment
Share on other sites

First, thanks for this great contribution! It's made the task of changing the shipping method/location for each product much more manageable.

 

I am having a problem with my catalog however. When I edit a product in the catalog, there is the field/drop down menu for "Products Vendor". I see all 3 vendors I've specified, and I select one and update the product, but the next time I go to edit that product the Products Vendor comes up with "NONE". So updating the product is not adjusting the Products Vendor field. When I view a report of the products associated with a vendor, only one vendor shows up for all products.

 

Also, I have some products that will ship oversize via FedEx and UPS and I need a shipping module that will offer quotes based on dimensions rather than weight. Does one exist?

 

Thanks for all of your help,

Lindsay

Link to comment
Share on other sites

The Vendor pulldown works in my copy. Probably an editing error in admin/categories.php.

 

For the products report, check your database. Is the vendors_id in the products table correct? If it is, the error is in the report page.

 

UPS XML will do quotes based on weight+dimensions, but the dimensional part is a bit tricky to set up. You might have to modify it to get it to do what you want. Also, my experience with shipping oversize is that UPS will probably destroy your shipment, and FedEx is worse. YMMV.

 

Regards

Jim

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

Link to comment
Share on other sites

Wow! I think I got it!

Sorry for previous post showing "fair" instead of "free".

in modules/// freeamount.php

lines 118 & 119 somewhere under..

// class methods
     $vendors_data = tep_db_fetch_array($vendors_data_query);
     $country_name = tep_get_countries($vendors_data['vendor_country'], true);
  $get_total = false;
  $get_weight = false;
     $handling_charge = $vendors_data['handling_charge'];

and lines 133-146

      if ($shipping_weight > @constant('MODULE_SHIPPING_FREEAMOUNT_WEIGHT_MAX_' . $vendors_id)) {$this->quotes['error'] = MODULE_SHIPPING_FREEAMOUNT_TEXT_TO_HEIGHT . ' (' . $shipping_weight . ') ' . MODULE_SHIPPING_FREEAMOUNT_TEXT_UNIT;
	$get_weight = false;
      }else {
   $get_weight = true;
  }
     if ($cart->show_total() < @constant('MODULE_SHIPPING_FREEAMOUNT_AMOUNT_' . $vendors_id)) {
       if (@constant('MODULE_SHIPPING_FREEAMOUNT_DISPLAY_' . $vendors_id) == 'False') return;
	$get_total = false;
      $this->quotes['error'] = MODULE_SHIPPING_FREEAMOUNT_TEXT_ERROR;
     } else {
    $get_total = true;

if (($get_total == true && $get_weight == true))
{
      $this->quotes = array('id' => $this->code,
                            'module' => MODULE_SHIPPING_FREEAMOUNT_TEXT_TITLE,
                            'methods' => array(array('id' => $this->code,
                                                     'title' => MODULE_SHIPPING_FREEAMOUNT_TEXT_WAY,
                                                     'cost' => $shipping)));
	}
      }

 

 

Hey Mo, I think you got it too! Thanks for the tip.

 

jk

Link to comment
Share on other sites

Hi,

 

When I try to checkout I keep getting a redirection loop error. I think I have narrowed it down to this bit of code:

 

 //If a shipping method has not been selected for all vendors, redirect the customer to the shipping method selection page
 if (SELECT_VENDOR_SHIPPING == 'true') { // This test only works under MVS
   if (!is_array ($shipping['vendor']) || count ($shipping['vendor']) != count ($cart->vendor_shipping)) { // No shipping selected or not all selected
     tep_redirect (tep_href_link (FILENAME_CHECKOUT_SHIPPING, 'error_message=' . ERROR_NO_SHIPPING_SELECTED, 'SSL'));
  }
 } 

 

I only have two vendors. One does individual shipping, the other is flat rate (this allows me to ship large items on individual and all others on a basic rate.) From what I can see all of my products are in one vendor or the other. I can't find any product that does not have a vendor prescribed to it.

 

Can anyone suggest something that I can't see please? It's slowly driving me crazy!

 

Thank you, Ali

Link to comment
Share on other sites

That redirect triggers when shipping has not been selected. If both of your vendors have a shipping method selected (when both are present), then you probably have an error in checkout_shipping.php. Check that the selected shipping method is being passed to checkout_payment.php.

 

Regards

Jim

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

Link to comment
Share on other sites

Hello Everyone, Has anyone made any progress on integrating MVS with paypal website payment standard. Surely someone is able to use this great contrib with the net's most popular payment gateway. I even tried to find a freelancer to do it and would be willing to pay someone if the solution isn't already out there.

thanks in advance.

Link to comment
Share on other sites

Hello all

 

I was wondering if there is a way to import vendors with EP and/or connect vendors to products in bulk. I have tested MVS and would like to use it on my real site. My problem is I have 14000 items between 4 vendors and doing them one at a time would really be a pain.

Any suggestions would be appreciated.

Link to comment
Share on other sites

EP will assign products to the proper vendor. Check the settings in EP. Vendors must be set up before you import. Attributes don't work, so don't even try. Large spreadsheets will have to be broken by hand into manageable chunks. I know, I just finished importing 31,000+ products.

 

Regards

Jim

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

Link to comment
Share on other sites

Thanks Jim for your help. It is appreciated.

 

A couple of questions. Are you saying MVS won't work with attributes or you can't import attributes while using MVS? What field name do you use. ie.. v_vendor_name I have already set MVS support to true.

Link to comment
Share on other sites

EP won't import attributes. Well, it will, but it destroys the relationship between options and attributes, thereby scrambling all your attributes. Yes, I found this out the hard way. Don't forget to backup your database before using EP. Every time.

 

To get the right field names, do an export first. Copy the first row of the export and add that to all of your imports. Make the product fields match the headers and it will import just fine. Other than the attributes, that is.

 

Regards

Jim

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

Link to comment
Share on other sites

The error message is saying that the array does not exist. The array consists of the installed shipping modules. This array comes from MODULE_VENDOR_SHIPPING_INSTALLED_x (where x is the vendor ID.)

 

Hi Jim,

 

I've been attempting to integrate MVS with One Page Checkout - quite challenging indeed

but have managed to at least get the different shipping methods on the page but that javascript...

anyway, there is this bit: if (tep_count_shipping_modules() > 1) which I presume needs

an alternative such as: if (tep_count_vendor_shipping_modules() > 1) and passing in the

vendor id somewhere. Does such a variation to tep_count_shipping_modules already exist

under a different name or place besides functions/general.php?

 

My feeble attempt (calling from modules/vendor_shipping.php):

if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_vendor_shipping_modules($vendor_id) > 1) ) )

 

$shipping = $shipping_modules->cheapest($vendor_id);

 

echo ' 4-7-10 in modules/vendor_shipping php line 114 and vendor shipping modules = ' . tep_count_vendor_shipping_modules($vendor_id);

 

 

in functions/general.php

function tep_count_vendor_shipping_modules($vendor_id) {

$vendor_shipping_modules = '_' . $vendor_id;

$vendor_shipping_modules1 = MODULE_VENDOR_SHIPPING_INSTALLED . $vendor_shipping_modules;

 

return tep_count_modules(MODULE_VENDOR_SHIPPING_INSTALLED . $vendor_shipping_modules);

}

 

----------- END OF CODE ----------------------

this outputs:

4-7-10 in modules/vendor_shipping php line 114 and vendor shipping modules = 0

 

What seems to be happening is:

MODULE_VENDOR_SHIPPING_INSTALLED_3 is being passed to tep_count_modules

instead of, for instance:

flat.php;freeamount.php;ups.php;usps.php (the configuration values)

 

I understand this may be confusing and off-topic (and hope you're in a good mood)

Thanks for reading this and any insight into this.

 

jk

Link to comment
Share on other sites

MVS doesn't need the count, so that test is never done. It gets the data from $cart->vendor_shipping, which has the information in an array by vendor. You could step through the vendors and get the data for each one if you wanted to. But, as I said, it isn't used anywhere so why bother.

 

See Lines 120-174 in checkout_shipping.php for the code that replaces the shipping checks.

 

Regards

JIm

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

Link to comment
Share on other sites

Thanks for the quick response - actually i was going to replace the call to

tep_count_shipping_modules in one page checkout (checkout.php)

as a plan b maybe this can be used or adapted (elseif)

if (tep_count_shipping_modules() > 0 || SELECT_VENDOR_SHIPPING == 'true') {

 

i know this might be pushing it but I'm having a heck of a time with updating

the shipping methods when clicking the option/radio buttons, they are being selected

but not updating the order totals, I've possibly isolated where the MVS code

executes javascript (cloned from checkout_shipping to [onepage checkout]checkout.php)

 

object.className = "moduleRowSelected";//override el.className and highlight the clicked row

 

var field = document.getElementById('shipping_radio_' + buttonSelect + '_' + vendor);

if (document.getElementById) {

 

var field = document.getElementById('shipping_radio_' + buttonSelect + '_' + vendor);

alert(' 4-6-10 in checkout php line 319 and vendor id = ' + vendor + 'and field = ' + buttonSelect);

 

// attempts to send to onepage checkout routine but no success

//onePage.setShippingMethod(field);

// onePage.setShippingMethod($(':radio[name=shipping]:checked'));

//onePage.setShippingMethod($(':radio[name="shipping_" + vendor]:checked'));

//echo $onePageCheckout->setShippingMethod($_POST['method']);

//onePage.setShippingMethod($(':radio[name="shipping_" + buttonSelect + "_" + vendor]:checked'));

// X attempts to send to onepage checkout routine but no success

 

} else {

var field = document.all['shipping_radio_' + buttonSelect + '_' + vendor];

--------- END OF CODE--------------------------

 

in a nutshell, what would correspond to the part in bold, using the MVS radio/option button name/values:

onePage.setShippingMethod($(':radio[name=shipping]:checked'));

 

what basically has to happen is the radio button passed as an object and then the button value

is extrapolated to determine the shipping method

 

this is possibly the final missing piece of a week long project/puzzle to merge these two

outstanding contributions and your expert collaboration regarding the above would be most welcome

 

jk

Link to comment
Share on other sites

You're hurting my brain. No, seriously, I'm having to remember code I wrote years ago, and I only wrote part of MVS to start with. Craig did most of the work. So give me a break if I mess this up.

 

MVS adds the $vendors_id to almost everything in shipping. It's added to the buttons as well, so the button name looks like "shipping_1", where the 1 is vendor #1. So your radio[name="shipping_" + vendor] should work, if the vendor is actually being set correctly. I would add that part in PHP to pick up the correct $vendors_id.

 

Regards

Jim

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

Link to comment
Share on other sites

I guess it is time to ask this question

how do i make a donation to the

kymation foundation for brain pain,

as a token of my appreciation for your

superb support, gosh you've been so

gracious throughout numerous pleas for help

that I feel indebted to you and need to

formally express my gratitude.

 

John

 

ps yes you're right about radio[name="shipping_" + vendor]

Link to comment
Share on other sites

Probably shouldn't talk about that here; email me if you're serious. The email address is in my profile. I'll continue to help as much as I can, no matter what. I see it as payback for all of the free software I get here.

 

Regards

Jim

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

Link to comment
Share on other sites

The error message is saying that the array does not exist. The array consists of the installed shipping modules. This array comes from MODULE_VENDOR_SHIPPING_INSTALLED_x (where x is the vendor ID.) These values are stored in the vendor_configuration table in your database. Check that there is a value stored for each vendor, and that the value contains the name(s) of one or more shipping modules. Also check for duplicate entries for each vendor.

 

Regards

Jim

 

Hi Jim

 

It's been awhile...

I had a good look into the database as you suggested, removed a obsolete vendor with no values for vendor_shipping_installed_x. It does not make a difference...

Edited by marretjeca
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...