Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi_Vendor_Shipping new thread


blucollarguy

Recommended Posts

That's what I thought, I wasn't sure. I also found a bug in /catalog/include/classes/vendors.php when upgrading to 2.3

 

the line read:

 

reset($modules_array);

foreach ($installed_modules_array as $value) {

$class = substr($value, 0, strrpos($value, '.'));

$include_modules[] = array('class' => $class,

'file' => $value);

 

THe Change:

 

foreach ($installed_modules_array as $value) {

reset($modules_array);

$class = substr($value, 0, strrpos($value, '.'));

$include_modules[] = array('class' => $class,

'file' => $value);

 

Otherwise it was giving a error

Link to comment
Share on other sites

That is a bug, but your fix is still incorrect. The correct code should be:

 

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

Fixed in the master copy. Thanks for the bug report.

 

Regards

Jim

Edited by kymation

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

Link to comment
Share on other sites

Warning: strpos() expects parameter 1 to be string, array given in C:\xampp\htdocs\storelive\includes\classes\vendor_shipping.php on line 46

 

Warning: substr() expects parameter 1 to be string, array given in C:\xampp\htdocs\storelive\includes\classes\vendor_shipping.php on line 46

if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $modules_array)) ) {

 

change it to

if ( (is_string($module) && (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $modules_array))) ) {

 

and it is causing ot_shipping to through the same errors as well

$module = substr($GLOBALS['shipping']['id'], 0, strpos($GLOBALS['shipping']['id'], '_'));

so change it to

 

$module = is_string($GLOBALS) && (substr($GLOBALS['shipping']['id'], 0, strpos($GLOBALS['shipping']['id'], '_')));

 

hope this helps

Al

Edited by alman
Link to comment
Share on other sites

It's been quite a while, but I think I remember this one. If I'm right, you're missing the code that deals with arrays being passes to the module. Now if I can just remember where that code is....

 

Regards

Jim

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

Link to comment
Share on other sites

No, I fix anything that I find or that someone tells me about. Paypal has always been a problem, and any other payment "module" that bypasses the osCommerce checkout will also be a problem.

 

Regards

Jim

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

Link to comment
Share on other sites

Has any one got module PayPal (WPP) PayPal Pro - Direct Payment & Express Checkout, to work with this module MVS?

 

The direct payment part works its juts the express checkout doesn't, after you clicked the express button it takes you to paypal you login etc then go back to the site to select postage, when selected postage it then takes you to the payment page?? (which i have disabled)(its like it forgets its express checkout?!?!?)

 

thanks for you help

regards

Link to comment
Share on other sites

You should be able to add that in with the rest of your product information. If the shipping price field is not showing up, you probably have an error in your installation somewhere in admin/categories.php.

 

Regards

Jim

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

Link to comment
Share on other sites

shipping price field is not showing up

 

I even used the default MVS admin/categories.php, I dont see a text entry for shipping price field in the categories, do I have to add it?

 

in product_query it looks like Mvs dont have it:

 

//MVS

$product_query = tep_db_query("select products_quantity, products_model, vendors_prod_id, products_image, products_price, vendors_product_price, vendors_prod_comments, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, vendors_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");

$product = tep_db_fetch_array($product_query);

 

So I guess I have to add it but I thought indiv shipping was in the MVS

Edited by drillsar
Link to comment
Share on other sites

Individual Shipping is available to use with MVS but is not installed. See the Individual Shipping module folder in the Extras folder.

 

Regards

Jim

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

Link to comment
Share on other sites

Individual Shipping is available to use with MVS but is not installed. See the Individual Shipping module folder in the Extras folder.

 

Regards

Jim

 

I did that but admin/categories.php is missing there or am I missing something?

Link to comment
Share on other sites

You may have to go to the original Individual Shipping Addon for some of the files.

 

Individual Shipping is not really a part of MVS. Somebody modified it to work with MVS and put the modified files in the Extras folder. There are no instructions so I'm assuming it's incomplete.

 

Regards

Jim

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

Link to comment
Share on other sites

Hey Jim,

 

I see a problem with Individual SHipping if vendor has another shipping method, so im assuming this is the problem:

 

$this->vendor_shipping[$vendors_id]['cost'] += tep_add_tax($products_price, $products_tax) * $quantity;

 

Im guessing this will have to be changed to:

 

$this->vendor_shipping[$vendors_id]['cost'] += tep_add_tax($products_price, $products_ship_price, $products_tax) * $quantity;

 

Individual shipping works but alot was missing, again though if vendor has multiple shipping carriers it dont add the individual shipping as well, Im thinking this is the fix for that.

 

Does that look right?

 

I'm almost done converting this to 2.3.1 the only thing thats not done is the shipping estimator so Im going to leave that out for now.

Link to comment
Share on other sites

That won't work unless you've modified tep_add_tax(). Maybe you want this:

$this->vendor_shipping[$vendors_id]['cost'] += tep_add_tax($products_price + $products_ship_price, $products_tax) * $quantity;

 

That will force the store to add tax on shipping. Not everyone wants that, so it should be an option, not required.

 

I don't see how that will affect the Individual Shipping not being added in. That code only fixes shipping tax, not the whole amount. There's probably some other bug in Individual Shipping if it's not being added in.

 

Regards

Jim

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

Link to comment
Share on other sites

If you want Individual pricing to be the only choice, you need to assign it as the only module for that vendor. As long as there are multiple modules there will be multiple choices.

 

Regards

Jim

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

Link to comment
Share on other sites

What im saying is if you have multiple shipping per vendor like UPS and Indiv shipping, both of them are displayed, shouldnt the indiv ship add it to the UPS Method?

 

Example lets say I have a keyboard and shipping is $4.00 (Indiv SHipping), and they buy a video card that uses weight of 2lbs, UPS price is 6.23+Indiv shipping price total of $10.23 currently it shows $6.23 and $4.00 or this isnt possible?

Link to comment
Share on other sites

Yes you can do that. Assign the keyboard to the vendor that has Individual Shipping set up and the video card to the vendor that has UPS set up. The shipping costs will be added up on the shipping page.

 

Regards

Jim

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

Link to comment
Share on other sites

Yes you can do that. Assign the keyboard to the vendor that has Individual Shipping set up and the video card to the vendor that has UPS set up. The shipping costs will be added up on the shipping page.

 

Regards

Jim

 

It wouldn't work with the same vendor correct?

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