Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multiple-Shipping-Addresses 2


BlueYon

Recommended Posts

Ok,

 

I have found a much better way to do the multiple shiping address mod and I'm releasing it today.

 

All tax and shipping calcuations will be worked out for each shipping address.

 

You can slect what ever shippng module you want withthis and it will still work!!

 

This module will allow people to select pay together with the next order as a payment option.

 

It will then add the total to the next order that is not the selected payment method "pay together with next order".

 

You can keep clicking pay with next order

 

 

Why would you want a module to do this?

 

Multiple shipping addresses and Dropshipping

 

All tax and shipping calcuations will be worked out for each shipping address.

 

I have forum thread here:

 

It saves customers time instead of them having to pay each indivdual order going to differnt addresses

 

The customer can delete the orders they have not paid and view details for each order through a small interface on the checkout confirmation page.

 

All the coding in this module I would say is up to the oSCommerce standard.

Link to comment
Share on other sites

  • Replies 52
  • Created
  • Last Reply

Top Posters In This Topic

Ok,

 

I have found a much better way to do the multiple shiping address mod and I'm releasing it today.

 

All tax and shipping calcuations will be worked out for each shipping address.

 

You can slect what ever shippng module you want withthis and it will still work!!

 

This module will allow people to select pay together with the next order as a payment option.

 

It will then add the total to the next order that is not the selected payment method "pay together with next order".

 

You can keep clicking pay with next order

Why would you want a module to do this?

 

Multiple shipping addresses and Dropshipping

 

All tax and shipping calcuations will be worked out for each shipping address.

 

I have forum thread here:

 

It saves customers time instead of them having to pay each indivdual order going to differnt addresses

 

The customer can delete the orders they have not paid and view details for each order through a small interface on the checkout confirmation page.

 

All the coding in this module I would say is up to the oSCommerce standard.

I would love it.....Do you have a link to where it can be downloaded at?

Link to comment
Share on other sites

It is not showing up for me. I put the code snippit in the checkout_shipping.php and replaced the file you uploaded to replace the other one.

 

It is showing this for the module in my admin..

 

Fatal error: Cannot redeclare class multiple_orders in /home/buybutto/public_html/shop/includes/modules/payment/multiple_orders.php on line 13

 

What would cause this? .. Thanks.

Link to comment
Share on other sites

It is not showing up for me. I put the code snippit in the checkout_shipping.php and replaced the file you uploaded to replace the other one.

 

It is showing this for the module in my admin..

 

Fatal error: Cannot redeclare class multiple_orders in /home/buybutto/public_html/shop/includes/modules/payment/multiple_orders.php on line 13

 

What would cause this? .. Thanks.

 

Hi,

 

Do you have another shipping module with a class called multiple_orders?

 

Make sure when you over write the the previous file you are not overwriting the file language file.

 

You have 2 files one is for the langaue and the other is the actual code to do the calculations.

 

Delete both the files in and add them again.

Link to comment
Share on other sites

Oops.. I guess I spoke too soon. I just went to put in some test orders and it was not showing the previous orders when I go to pay with money order or paypal.

 

When I chose the pay with next order it shows the other orders at the bottom where I can view and edit.

 

I added the code to the checkout_process not the other I mentioned above.

 

Thanks for any help.

Link to comment
Share on other sites

  • 2 weeks later...
Oops.. I guess I spoke too soon. I just went to put in some test orders and it was not showing the previous orders when I go to pay with money order or paypal.

 

When I chose the pay with next order it shows the other orders at the bottom where I can view and edit.

 

I added the code to the checkout_process not the other I mentioned above.

 

Thanks for any help.

 

 

Your install list:

 

Just add the module files to the corrasponding directories.

 

 

add this sql code:

 

ALTER TABLE `orders` ADD `paid_order` TINYINT( 1 ) DEFAULT '1' NOT NULL ;

 

 

Very little code is required to make this work:

 

 

around line line 108 after: Which PHP File???

 

$insert_id = tep_db_insert_id();

for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {

$sql_data_array = array('orders_id' => $insert_id,

'title' => $order_totals[$i]['title'],

'text' => $order_totals[$i]['text'],

'value' => $order_totals[$i]['value'],

'class' => $order_totals[$i]['code'],

'sort_order' => $order_totals[$i]['sort_order']);

tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);

}

Link to comment
Share on other sites

Your install list:

 

Just add the module files to the corrasponding directories.

add this sql code:

 

ALTER TABLE `orders` ADD `paid_order` TINYINT( 1 ) DEFAULT '1' NOT NULL ;

Very little code is required to make this work:

around line line 108 after:    Which PHP File???  <-- Did you ever get a response ??

 

  $insert_id = tep_db_insert_id();

  for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {

    $sql_data_array = array('orders_id' => $insert_id,

                            'title' => $order_totals[$i]['title'],

                            'text' => $order_totals[$i]['text'],

                            'value' => $order_totals[$i]['value'],

                            'class' => $order_totals[$i]['code'],

                            'sort_order' => $order_totals[$i]['sort_order']);

    tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);

  }

Link to comment
Share on other sites

the file that gets modified is checkout_process.php.

 

Now, maybe someone can help me...I'm getting an error on checkout_confirmation.php: Call to undefined function: tep_count_customer_orders()

 

Anybody got this function?

Link to comment
Share on other sites

Thanks for the Info. I have installed the mod and so far it works GREAT!!!!!! :D

 

I am showing in orders detail in admin: Payment Method: TEXT_PAID_WITH 54.

It seems like a very simple fix, just a lanuage file but I don't know which one.

After that is done.........I will be also. Thanks for a great contribution.

Link to comment
Share on other sites

Thanks for the Info. I have installed the mod and so far it works GREAT!!!!!! :D

 

I am showing in orders detail in admin: Payment Method: TEXT_PAID_WITH 54.

It seems like a very simple fix, just a lanuage file but I don't know which one.

After that is done.........I will be also. Thanks for a great contribution.

 

 

Just add this to your english.php

 

// multiple shipping addresses

define('TEXT_PAID_WITH', 'paid with order no. ');

Edited by BlueYon
Link to comment
Share on other sites

Also anyone looking to sell electronics you can find my dropship site here:

 

http://www.priority-parts.com

 

I'm looking for some good webmasters that know how to sell!

 

There is good money in this as I have some 20 oscommerce sites running and all take around 50,000 USD a month.

 

I'm not sure if this message will be taken down because it might be against forum rules but it's worth a try!

Edited by BlueYon
Link to comment
Share on other sites

Ok, I have added the updated version of this modification to the contribution section.

 

Multiple shipping address v2.2

 

Enjoy!!!

 

 

The upgrade is GREAT!!!!!

I did run in to an erorr in the checkout confirmation. I check over the files and found this problem:

 

STEP 4

In:

/checkout_confirmation.php

 

around line 235 or 266 change this code:

 

<?php

if (is_array($payment_modules->modules)) {

if ($confirmation = $payment_modules->confirmation()) {

?>

 

into this code:

 

 

<?php

// multiple orders

$orders_total = tep_count_customer_orders();

 

if ($orders_total > 0) {

$history_query_raw = tep_db_query("select o.orders_id, o.date_purchased, o.delivery_name, o.billing_name, ot.text as order_total, s.orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$customer_id . "' and paid_order = '0' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' order by orders_id DESC");

$orders_to_pay = tep_db_num_rows($history_query_raw);

}

 

if ((is_array($payment_modules->modules))|($orders_to_pay > 0)) {

if (($confirmation = $payment_modules->confirmation())|(($orders_to_pay > 0))) {

?>

 

I took out the red part and the error went away.

I'm no expert so double check it.

Thanks again for the Contribution.

Link to comment
Share on other sites

  • 2 weeks later...
The upgrade is GREAT!!!!!

 

I've been trying to get this to work, patiently installing each release, but can't get it to add the order totals together, but it just doesn't add them. I've discovered that all orders get added to the db with paid_order set to '1'. I desperately need this to work for the Cmas rush. Any help is greatly appreciated.

Link to comment
Share on other sites

I've been trying to get this to work, patiently installing each release, but can't get it to add the order totals together, but it just doesn't add them. I've discovered that all orders get added to the db with paid_order set to '1'. I desperately need this to work for the Cmas rush. Any help is greatly appreciated.

 

Did you install both modules in the admin section "total order" and "pay together with next order"?

 

Wheres your site?

Link to comment
Share on other sites

  • 2 weeks later...
I have added :blink:  everything with ease but nothing shows up in admin.

Thanks In Advance

 

Try installing on fresh compy onb a test server of oscommerce and then drop the files in again!

 

There will be some reason your site is not accpeting it. I think alot of people are already using this modifcation.

Link to comment
Share on other sites

I've noticed that this contribution works only with someone with an account made up.  I installed the PWA Purchase without account module and I haven't been able to make the Multiple shipping addresses to work.

 

Any thoughts or changes I can make?

 

I'm not sure it would work because you would need an aacount to see all your previous orders still waiting to be paid ofr.

 

You would need to change the system so that:

 

1) The customer can specify how many shipping addresses are needed.

2) Fields setup for each addresses details.

3) A method to define which product goes to which address.

4) A method of working out the shipping cost for each address

5) The total shipping cost to each each to be displayed under shipping.

 

It can be done but its not really practical. You would have to also have a help system to advise the customer how to assign the prooducts to the different shipping addresses.

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