Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi_Vendor_Shipping new thread


blucollarguy

Recommended Posts

Paypal uses a modified processing page to enter the order data when it returns to osCommerce. This page replaces the normal catalog/checkout_process.php that normally does the order processing for MVS. You will need to make the changes to the Paypal page that you would normally make to catalog/checkout_process.php.

 

Regards

Jim

 

Jim,

 

You would be talking about making changes to catalog/includes/modules/payment/paypal_standard.php correct?

 

Thanks,

Blaine

Link to comment
Share on other sites

hi there,

Currently I´m trying to install my webshop with the MVS-module. Everything works fine from installing to firing the sql file which is attached to the package.

BUT, if I try to push the manage "button"(which is no button at my admin panel) in my admin panel i get the following site including the following error codes:

 

Warning: include(/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/bax.php) [function.include]: failed to open stream: No such file or directory in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include() [function.include]: Failed opening '/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/bax.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include(/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/colissimo.php) [function.include]: failed to open stream: No such file or directory in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include() [function.include]: Failed opening '/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/colissimo.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include(/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/dhlairborne.php) [function.include]: failed to open stream: No such file or directory in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include() [function.include]: Failed opening '/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/dhlairborne.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include(/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/fedex1.php) [function.include]: failed to open stream: No such file or directory in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include() [function.include]: Failed opening '/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/fedex1.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include(/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/firstitemplus.php) [function.include]: failed to open stream: No such file or directory in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include() [function.include]: Failed opening '/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/firstitemplus.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include(/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/flat.php) [function.include]: failed to open stream: No such file or directory in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include() [function.include]: Failed opening '/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/flat.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include(/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/freeamount.php) [function.include]: failed to open stream: No such file or directory in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include() [function.include]: Failed opening '/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/freeamount.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include(/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/fxfreight.php) [function.include]: failed to open stream: No such file or directory in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include() [function.include]: Failed opening '/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/fxfreight.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include(/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/indvship.php) [function.include]: failed to open stream: No such file or directory in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include() [function.include]: Failed opening '/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/indvship.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include(/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/item.php) [function.include]: failed to open stream: No such file or directory in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include() [function.include]: Failed opening '/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/item.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include(/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/spu.php) [function.include]: failed to open stream: No such file or directory in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include() [function.include]: Failed opening '/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/spu.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include(/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/table.php) [function.include]: failed to open stream: No such file or directory in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include() [function.include]: Failed opening '/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/table.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include(/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/tntzipzonesexpress.php) [function.include]: failed to open stream: No such file or directory in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include() [function.include]: Failed opening '/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/tntzipzonesexpress.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include(/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/tntzipzonesroad.php) [function.include]: failed to open stream: No such file or directory in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include() [function.include]: Failed opening '/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/tntzipzonesroad.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include(/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/ups.php) [function.include]: failed to open stream: No such file or directory in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include() [function.include]: Failed opening '/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/ups.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include(/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/upsxml.php) [function.include]: failed to open stream: No such file or directory in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include() [function.include]: Failed opening '/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/upsxml.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include(/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/usps.php) [function.include]: failed to open stream: No such file or directory in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include() [function.include]: Failed opening '/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/usps.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include(/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/zones.php) [function.include]: failed to open stream: No such file or directory in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Warning: include() [function.include]: Failed opening '/var/www/web236/html/catalog/includes/languages/german/modules/vendors_shipping/zones.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /var/www/web236/html/catalog/admin/vendor_modules.php on line 134

 

Can anybody help there?

 

Double check to make sure you have uploaded all the files to the proper places.

Link to comment
Share on other sites

Hi, I am hoping to get some help with a problem I am having with shipping estimator portion of this contribution. It is installed on a heavily modified site using only UPS and shipping to the US and Canada only. The estimator works fine with US zip codes but gives the following error with Canadian postal codes.

 

Warning: Invalid argument supplied for foreach() in /home/airrite/public_html/estore/products_ship_estimator.php on line 1381

 

Any suggestions or assistance would be greatly appreciated. Thank you.

Link to comment
Share on other sites

products_ship_estimator.php has only 839 lines of code. What have you done to the poor thing?

 

Whatever you've added, the foreach() on Line 1381 is not being handed the array it expects. You'll need to find where that array is coming from and why it's missing.

 

Regards

Jim

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

Link to comment
Share on other sites

products_ship_estimator.php has only 839 lines of code. What have you done to the poor thing?

 

Whatever you've added, the foreach() on Line 1381 is not being handed the array it expects. You'll need to find where that array is coming from and why it's missing.

 

Regards

Jim

 

Hi Jim, Thank you for your response. The package I downloaded and installed had an additional line break between each line of code. I updated it and it shows as line number 690. Well, the array is correct for US zip codes.

 

I'm an amateur at php but it seems that the likely problem could be it's stripping the alpha characters because Canadian codes aren't strictly numeric.

 

Any other suggestions? Thank you, Rodney

Link to comment
Share on other sites

Anyone working on one page check out with MVS. Its a shame that 2 great contributions can't be merged into one.

 

 

I too would love to see one page checkout and MVS working together.

I gave it a try a while ago, but the Ajax part is a bit beyond me at this point.

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!

Link to comment
Share on other sites

Hi Jim, Thank you for your response. The package I downloaded and installed had an additional line break between each line of code. I updated it and it shows as line number 690. Well, the array is correct for US zip codes.

 

I'm an amateur at php but it seems that the likely problem could be it's stripping the alpha characters because Canadian codes aren't strictly numeric.

 

Any other suggestions? Thank you, Rodney

Invalid postcodes wouldn't show up there. That array is for shipping methods. It shouldn't get that far if there were none, or the postcode was missing/invalid.

 

The additional lines indicates that your editor is not properly handling line endings. That will mess up all sorts of things. Don't use that editor on any code anywhere.

 

Get a fresh copy of products_ship_estimator from the distribution. Don't open it in any program. Upload it to your site using an FTP program in ASCII mode. Now see if the problem is still there. If it is, you'll need to debug the UPS module.

 

Regards

Jim

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

Link to comment
Share on other sites

MVS 1.2.2

php 5.1.6

MySQL 5.0.77

RC2a

 

When I click Calculate Shipping from the product page, enter zip and state... I see this error

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /xxx/xxx/xxx/includes/classes/vendor_shipping.php on line 50

 

Line 50 below is

        reset($modules_array);

 

I've been trying various solutions within the /includes/classes/vendor_shipping.php code below, but have had no luck... any help appreciated.

 

////
// Find all of the modules and instantiate the module classes
   function shipping($module = '') {
     global $language, $PHP_SELF;

     $installed_modules_array = array();
		//Get the vendors_id for each vendor in the database
     $vendors_data_query = tep_db_query("select vendors_id from " . TABLE_VENDORS);
     while ($vendors_data = tep_db_fetch_array($vendors_data_query)) {;
       $vendors_id = $vendors_data['vendors_id'];
       $installed_modules = @constant ('MODULE_VENDOR_SHIPPING_INSTALLED_' . $vendors_id);

       if (isset ($installed_modules) && tep_not_null ($installed_modules)) {
         $modules_array = explode(';', $installed_modules);
         $this->modules[$vendors_id] = $modules_array;

         foreach ($modules_array as $module_name) {
           //if the module is not already in the array, add it in
           if (!in_array ($module_name, $installed_modules_array)) {  
             $installed_modules_array[] = $module_name;
           }//if !in_array
         }//foreach
       }//if isset
     }//while


     $include_modules = array();
     if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $modules_array)) ) {
       $include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 
                                  'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)));
     } 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

     for ($i=0, $n=sizeof($include_modules); $i<$n; $i++) {
       include(DIR_WS_LANGUAGES . $language . '/modules/vendors_shipping/' . $include_modules[$i]['file']);
       include(DIR_WS_MODULES . 'vendors_shipping/' . $include_modules[$i]['file']);

       $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class'];
     }//for
   }//function

////

Edited by Roaddoctor

-Dave

Link to comment
Share on other sites

for this part of the code, to prevent errors from appearing if no ship methods have been set-up within Vendor Manger, you may wish to add something like: (graceful fail)

 

     } else {

if (is_array($modules_array)) {            //<---- add
       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

     for ($i=0, $n=sizeof($include_modules); $i<$n; $i++) {
       include(DIR_WS_LANGUAGES . $language . '/modules/vendors_shipping/' . $include_modules[$i]['file']);
       include(DIR_WS_MODULES . 'vendors_shipping/' . $include_modules[$i]['file']);

       $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class'];
     }//for

    }//if     //<---- add

   }//function

////

-Dave

Link to comment
Share on other sites

That will cause the function to return nothing, which will then cause a different error when the expected function result is used. If you really want to fix this, the function needs to return an error code that is then handled by the main code (i.e. display a useful error message and then die.)

 

Regards

Jim

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

Link to comment
Share on other sites

  • 3 weeks later...

Well I thought I was ok until I started some more testing...

Ver 1.2.2 on a clean 2.2Rc2a when installed. Unfortunately I did not test much initially and other mods have been added subsequently. This is a development build on php5.1.6, and mysql5.0.77

 

I've got a few issues and would appreciate any input.

-vendor emails are not being sent at all, nor can I manually trigger the send. I have the two test vendors set up to send at pending; I tried both catalog and admin in shipping/packaging. mime/html is true. I do recieve the standard store owner mail and send extra email.

- When viewing an order in orders.php:

 

Order Sent to My Store: no

Order Sent to Vendor 2: no

 

Products Contains: Vendor Order Sent: no (shouldnt this indicate the item name?)

Shipper ok

Method ok

Ship Cost ok

Model Missing/blank just a "-"

Tax ok Contains: ship tax 0.0000

Price (ex) Missing/blank just a "-"

Price (inc) Missing/blank just a "-"

Total (ex) Missing/blank just a "-"

Total (inc) Missing/blank just a "-"

 

Sub-Total: Combined Shipping: Total: All ok / contain $values

 

-When viewing invoice.php all the same variables are missing or blank

-When viewing vendor_packingslip.php the Products and the Model are both working

-It seems that order processing is taking much longer than typical...

 

Where do I start?

-Dave

Link to comment
Share on other sites

Are you using a checkout module (Paypal, etc.) that replaces part of the checkout process? If so, that's your problem.

 

If not, start with the database. Is the data there (and correct) for this order? If it is, check the admin-side pages where the data is missing. If not, start with checkout_process.php and work back from there. Actually, I would probably start with checkout_process.php anyway, since that page is where the email is sent and the data is stored in the database. That is the one place where a single error would bork up all of the functions you mentioned.

 

Regards

Jim

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

Link to comment
Share on other sites

Ok after a bit more

 

If I have Catalog set in shipping/packaging & emails set to Pending in the Vendor setup - then vendor emails DO send and contain all the information... any other configuration does not seem to send. I would prefer to review the order before sending it off to the vendor.

 

I do have paypal website pro installed(Dynamo effects) but have been doing all the testing with check/moneyorder checkout option. I've disabled paypal for testing this further.

The database seems fine - all the details are in the vaious tables.

checkout_process.php is essentially identical to yours, with just a SPPC section and one line added for order editor 5.066.

When viewing an order on orders.php or invoice.php, the previously posted items are still missing... product name, model, and prices.

Packing slips are fine and show product anme and model...

Order processing is taking a real long time each time I confirm these test order... 10 to 20 seconds... seems long

I've gone thru and double checked the install and nothing seems out of order.

 

Its late. Going to pick this back up tomorrow. Thanks for your help Kymation.

-Dave

Link to comment
Share on other sites

I created a new Order Status called "Order Sent to Shipper" and set it to send the email when I change the status of the order to that. That way I can review the order, confirm payment, shipping, etc. and then assign the order status to "Order Sent to Shipper" and the email is sent.

Link to comment
Share on other sites

orders.php and invoice.php pull the data from the database. Since your database is fine, you'll need to find out why those two files aren't getting the data. Check for conflicts between MVS and other mods, if any. Order Editor is a possible suspect.

 

Regards

Jim

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

Link to comment
Share on other sites

I seem to have sorted out the email issues. Setting BOTH in shipping/packaging, and then setting the desired order status to send the mail in Vendor setup seems to work. The "Order Sent to My Store: yes Order Sent to Vendor 2: yes" does not show yes for either entry until both emails are sent. bug?

 

-I am still clueless as to why Products, Model, Price (ex), Price (inc), Total (ex), Total (inc) are all blank "-" in invoice.php.

-Products and Model do show on the packingslip and vendor_packingslip...

 

When viewing orders.php order details, for example with a 2 item order going to two different vendors:

-Why does the Products column show "Vendor Order Sent: yes" and not the item ordered?

-Model and prices are blank "-"

-When you click on the line item vendor_packingslip button, should only that vendors product be on the packingslip?

 

I took another look at order editor instructions looking for where it might be boogering mvs and really dont see much overlap.

 

Thank you for your help...

-Dave

Link to comment
Share on other sites

None of this happens with my test store or the live stores that are using this. You have errors in your code somewhere; you'll just have to track them down.

 

Regards

Jim

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

Link to comment
Share on other sites

2.2RC2a

mysql 5.077

php 5.1.6

 

-I am still clueless as to why Products, Model, Price (ex), Price (inc), Total (ex), Total (inc) are all blank "-" spacer in invoice.php.

-Products and Model do show on the packingslip and vendor_packingslip...

 

I have completely gone back thru the installation. Everything seems in order.

I tried placing your copy of Orders.php - same behaivor

mvsbroke.jpg

 

I tried my original (prior to MVS) and the rc2a default orders.php - different, but strange behaivor as well

mvsbroke2.jpg

 

I am really not sure how to approach debugging this, any help would be greatly appreciated.

 

I did notice that if I enter Order Editor all of the values are present. If I view the transaction from the catalog side, all of the values are present.

 

Contribs installed that could possible be part of the issue:

order editor 5.066

paypal WPP (Dynamo Effects)

SPPC 4.22 and price break for SPPC

Ult SEO URL v22d_5

 

I've also read earlier in this thread that this may be a php5/mysql5 issue with this contribution? can you confirm or deny? :)

 

One other question, from the instructions that read: 1.2 Modified files... "catalog/admin/includes/modules.php"

Is this supposed to read "catalog/admin/modules.php" ?typo I assume?

-Dave

Link to comment
Share on other sites

I remember this being a Register Globals problem with previous versions. Are you certain that you are running the MVS 1.2.2 version of these files?

 

Regards

Jim

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

Link to comment
Share on other sites

This is very odd. So odd, in fact, that I had to go look at a couple of sites to compare them to what you showed above. Everything is still working there.

 

admin/orders.php gets the data for the order from the order class. This is displayed in admin/vendor_order_info.php. So try this: at the top of that file, add the following code:

 

print '<pre>';
print_r ($order->products);
print '</pre>';

Then go take a look at the Orders page. You should see the data on the page above the display you posted above. Copy that data and post it here. We'll see if that tells us anything.

 

Regards

Jim

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

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