Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Unique Shipping/Delivery To Address for each cart item


Guest

Recommended Posts

Posted

Hi, my brother is running a gift basket drop shipping business and shipping is handled individually.

He needs to be able to enter a shipping address for each item entered into the cart.

 

 

For instance, after he clicks "Buy now" on an item, he is prompted to enter shipping/delivery information.

 

Basically, every Cart Item has to have shipping information (firstname, lastname, street, city, state, etc) input in it somehow. Could I accomplish this?

Posted
This is an example of what i'm going for.

 

individualaddress6ln.th.jpg

 

 

Any ideas on how to get started?

Posted

Here is a little more info if I wasn't too clear.

 

i'm trying to make a site similar to FTD dot com

What I need is the following:

1. some way to add a delivery or shipping addresss for each item in cart (they will be shipped from different places and this is the easiest way for us to do it).

 

2. a button to edit those delivery addresses in the cart

 

 

Less of a priority

3 give each item a an item in the basket, an order number suffixa at the end of the transaction (say the order number is 54321, and the 3 items are ordered, each would have a unique order number of 54321A, 54321B, 54321C, respecitvely.

 

Does that make any sense? :huh:

Posted

One approach would be:

 

- create a new sql table and store a shipping location for each products_id. So you store products_id and then various delivery fields. See how the orders table is structured for this.

- create a form at the checkout_shipping.php page where the customer fills the data for each table entry. Each table entry represent a separate products_id with the delivery fields.

- if you want to have different carriers then you would need to add to that form the shipping options and expand this new table to include the carriers code for instance.

- calculate/create a total value for the different shipping selections of each item.

 

That will not include adding shipping addresses when you're just viewing the osc shopping cart, but only during checkout. If you have the above you could always create an additional column to bind the order_id with the entry in that table and then encode it, by appending a letter or number at the end of the actual order.

Posted
One approach would be:

 

- create a new sql table and store a shipping location for each products_id. So you store products_id and then various delivery fields. See how the orders table is structured for this.

- create a form at the checkout_shipping.php page where the customer fills the data for each table entry. Each table entry represent a separate products_id with the delivery fields.

- if you want to have different carriers then you would need to add to that form the shipping options and expand this new table to include the carriers code for instance.

- calculate/create a total value for the different shipping selections of each item.

 

That will not include adding shipping addresses when you're just viewing the osc shopping cart, but only during checkout. If you have the above you could always create an additional column to bind the order_id with the entry in that table and then encode it, by appending a letter or number at the end of the actual order.

 

Hmm...I hadn't really thought of it like that.

 

 

What I dont' understand is how to bind the addresses to the order_ids.

Should I create another table with columns for orders_id (with addended letter) and various delivery fields? I think if I could get the database schema down I would be alright.

 

 

 

 

The shipping should be straightforward, as I'm using the individual shipping contrib.

Posted

That new table will hold the addresses for each product imagine it pretty much like the orders_products table with the delivery fields from the orders table. (which unfortunately you cannot use since it is only used once the order is generated.)

 

So call this new table pre_orders with an autoindex column called pre_orders_id. So now the pre_orders_id and orders_id columns could generate the unique shipping number you need. So this new table would look like:

 

 

-- 
-- Table structure for table `pre_orders`
-- 

DROP TABLE IF EXISTS `pre_orders`;
CREATE TABLE `pre_orders` (
 `pre_orders_id` int(11) NOT NULL auto_increment,
 `orders_id` int(11) NOT NULL default '0',
 `products_id` int(11) NOT NULL default '0',
 `delivery_name` varchar(64) NOT NULL default '',
 `delivery_company` varchar(32) default NULL,
 `delivery_street_address` varchar(64) NOT NULL default '',
 `delivery_suburb` varchar(32) default NULL,
 `delivery_city` varchar(32) NOT NULL default '',
 `delivery_postcode` varchar(10) NOT NULL default '',
 `delivery_state` varchar(32) default NULL,
 `delivery_country` varchar(32) NOT NULL default '',
 `delivery_address_format_id` int(5) NOT NULL default '0',
 PRIMARY KEY  (`orders_products_id`),
 KEY `products_id` (`products_id`),
 KEY `orders_id` (`orders_id`)
) TYPE=InnoDB AUTO_INCREMENT=54321;

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...