Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multi_Vendor_Shipping new thread


blucollarguy

Recommended Posts

The Paypal module is trying to use the stock osCommerce shipping values. MVS does not use those. We need an array of values to accommodate multiple vendors/shipping methods. I suspect that everyone else is using Paypal IPN to get around this.

 

Regards

Jim

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

Link to comment
Share on other sites

Jim,

 

It looks like the only popular PayPal IPN that is out there is for MS2 and I have RC2. How much coding do you think would be involved to make PayPal Express work with MVS? The only thing that it is not doing is transferring the shipping calculations.

 

Thanks,

Blaine

Link to comment
Share on other sites

Just like MVS, Paypal IPN was originally coded for MS@, but has since been updated to RC2a.

 

I have no idea what it would take to modify Paypal Express, or if that is even possible. My guess is that it can't be done because Paypal controls the shipping part of the process, but I may very well be wrong.

 

Regards

Jim

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

Link to comment
Share on other sites

Unfortunately I believe that I have to use PayPal Express Checkout because I am using PayPal Website Payments Pro.

 

Forgive me but I am not fluent in PHP or MySQL but it seems to me that all we need to do is figure out how to get the quote from the previous page (checkout_shipping.php) stored for use by PayPal. It sounds simple but I don't know if you have to regenerate the quote all over again on the checkout_payment.php page. You figure that it has already been generated once and shouldn't need to be generated again but like I said, not fluent in PHP/MySQL.

 

Any help would certainly be appreciated.

 

Thanks,

Blaine

Link to comment
Share on other sites

In the mean time I have implemented a work-around by having PayPal Express redirect customers back to the checkout_shipping.php page instead of the checkout_confirmation.php page so that it regenerates the shipping quote. And since the PayPal token is saved they can click through all the pages in the checkout process without getting redirected to PayPal which preserves the shipping quote and charges the appropriate amount. However, this will probably be confusing to the customer as to why they are having to choose which payment option they wish to use again.

Link to comment
Share on other sites

  • 2 weeks later...

Need help!

I read all the pages with diferent solutions but it didnt work.

 

I get this error at final of checkout process (checkout_process.php).

Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in xxxxxxxxxxx /includes/functions/database.php on line 130

 

and after a seconds

 

Warning: Cannot modify header information - headers already sent by (output started at xxxxxx/includes/functions/database.php:130) in /xxxxxxxxxxxxxx/includes/functions/general.php on line 64

 

I look for the email and the order is OK. But at the end of process this ugly error with the blank page.

 

I review for white spaces before and after <php php>? (this is ok)

 

The problem is in checkout_process.php, at line aprox. 130

130 'shipping_module' => $shipping['id'],

 

 

if i remove that line all works fine.

 

Can anyone help me, please???

Link to comment
Share on other sites

I found a solution in general.php by removing osCommerce update 051113 (thanks to Fredrik.r!);

 

From

function tep_db_input($string, $link = 'db_link') {
 global $$link;

 if (function_exists('mysql_real_escape_string')) {
       return mysql_real_escape_string($string, $$link);
 } elseif (function_exists('mysql_escape_string')) {
       return mysql_escape_string($string);
 }

return addslashes($string);
}

 

 

 

to

 

function tep_db_input($string) {
 return addslashes($string);
}

 

It works!

 

But, could be this dangerous(removing the update)???

Link to comment
Share on other sites

Sorry, is changing /includes/functions/database.php (not the general.php)

 

 

I found other solution configuring php.ini to this(without changing the update):

 

register_globals = on
[b]output_buffering = on
output_buffering = 4096[/b]
error_reporting(E_ALL & ~E_WARNING & ~E_NOTICE & ~E_STRICT);

Link to comment
Share on other sites

The code in update 051113 is part of a security update. Removing it is a bad idea. In any case, that's not the real problem.

 

Your second "solution" just turns off error reporting for the warning message. The problem is still there.

 

You need to find out why an array is being passed to tep_db_input(). That's where the real problem is. It's likely due to a mistake you made, and that needs to be fixed.

 

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. I´ll try soon you said me.

 

Now Im fighting with other piece of code in stats_sales_report2.php

 

I modified to this:

 

<?php echo REPORT_VENDOR_FILTER; ?><br>
                   <select name="vendor" size="1">
                     <option value="0"><?php echo REPORT_ALL; ?></option>
                     <option value="1"><?php echo 1; ?></option>
                     <option value="2"><?php echo 2; ?></option>
                     <option value="3"><?php echo 3; ?></option>
                     <option value="4"><?php echo 4; ?></option>
                     <option value="5"><?php echo 5; ?></option>
                     <option value="6"><?php echo 6; ?></option>
<?php
                       foreach ($sr->vendor as $value) {
?>
                     <option value="<?php echo $value["vendors_id"]?>"<?php if ($srVendor == $value["vendors_id"]) echo "selected"; ?>><?php echo $value["vendors_name"] ; ?></option>
<?php
                        }

 

 

Nothing happens when i change the vendor and click send.

Link to comment
Share on other sites

Because in the pulldown there is only one option available "REPORT_ALL".

 

I want to report the list of one specific vendor and print preview him. This could be made with orders_by_vendor.php but I want all the optios working.

 

I don´t kwow if this option is available because in the right papel of vendors.php appears "This vendors ordes - (Coming Soon)"

 

Now I have other problem with vendor_email_send.php:

Send Vendor Email

The body of the email will look like this, this is what your Vendor will see when they open the email: bla, bla, bla.

 

I write on the box and then click on Preview, and finally in the next page "SEND EMAIL".

 

It appears a red line on top that said "Contact" but noting happens.

 

 

In other hand, this contribution is great and works fine except this minors "bugs" that dosnt work with me.

Link to comment
Share on other sites

The foreach loop in that pulldown populates it with the vendor names. You need to find out why it's not working, not try to substitute something manually. The same goes for the email form. You need to find out what's wrong in your setup.

 

Regards

Jim

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

Link to comment
Share on other sites

I have been trapped in a problem of fedex module of MVS, which is, customers from Canada can only see "Ground Service" in the checkout_shipping step. I have seriously checked our fedex account setting, which returns other international shipping types perfectly in the fedex online account.

 

I have searched all the forum, found some posts came with the same problem but no following answers.

 

Any suggestions? Thanks.

 

(PS: I checked the echo output in fedex1.php, only got the "92" which refer to "Ground Service" in the response code from fedex)

Link to comment
Share on other sites

Have you checked the same quote on the FedEx website? Ground is available everywhere, but the other services are limited to certain shipping/receiving locations.

 

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

 

Yes I did, that's why I mentioned "I have seriously checked our fedex account setting, which returns other international shipping types perfectly in the fedex online account."

 

I logged in my account at fedex.com and found that International Priority/economic are available for several post codes, but all of them only return Ground Service in my cart.

Link to comment
Share on other sites

Interesting. If you are getting only code 92 in the response from FedEx, then they are only returning Ground rates, as you have noted. Yet the FedEx website returns more services. Now why is that happening? It must be something that is sent to FedEx from your store that is limiting the response.

 

The next step is to check the data that is being sent for errors or restrictions. You can post that data here if you wish.

 

Regards

Jim

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

Link to comment
Share on other sites

I have problems in this contribution with PDF ADMIN INVOICE.

 

Making and order on web with the normal shoping process , when clickig create PDF on admin it works.

 

But if the customers uses MVS options and finalice the order. Then in admin I click on CretePDF and there is not products. All cell in white!!! (extrange)

 

The lines of pdf_invoice.php are these:

 

//Show the products information line by line
.
.
$pdf->MultiCell(18,6,$order->products[$i]['model'],1,'L', '1');
.
.
$pdf->MultiCell(9,6,$order->products[$i]['qty'],1,'C', '1');
.
.
$pdf->MultiCell(128,6,substr($order->products[$i]['name'],0,60),1,'L', '1');
.
.
etc.

Link to comment
Share on other sites

Interesting. If you are getting only code 92 in the response from FedEx, then they are only returning Ground rates, as you have noted. Yet the FedEx website returns more services. Now why is that happening? It must be something that is sent to FedEx from your store that is limiting the response.

 

The next step is to check the data that is being sent for errors or restrictions. You can post that data here if you wish.

 

Regards

Jim

 

 

Hi Jim,

 

Thanks for the reply last week, here's my sample sending data:

 

0,"25"10,"my account number"498,"6158129"8,"CA"9,"92653"117,"US"17,"V6G1Z3"16,"BC"50,"CA"75,"LBS"1116,"I"1401,"23.9"1529,"1"1415,"110.25"68,"USD"440,"Y"1273,"01"1333,"1"1529,"2"99,""

 

Sent from 92653(US) to V5G1Z3(CA), only return one array with 92(Ground Service).

 

Thanks.

Edited by youqi
Link to comment
Share on other sites

I don't see anything wrong with that, but I could be missing something.

 

As a test, turn off MVS. Set up the FedEx module to the same settings as this vendor, and run the same purchase. Do you get the same rates?

 

regrds

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