Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need Input: Multiple Ship-to Addresses Development


Aklem

Recommended Posts

Ok. I need some brainstorming from the developers here on a project I'm planning. I'm a little overwhelmed. Perhaps discussing it will help organize me.

 

Basically, I want to be able to have a ship-to address for each product I have for my store. The store is a gift-box catalog store, so customers usually want to send out each package to a different address. I know that I have seen this talked about before, but there are no working contributions that can cleanly do this. I'm currently adding the address as product attributes, but this is a really messy solution, and does not allow me to individually select parts of each shipto.

 

So, The first thing that I'd do is create a new table in my database to hold the ship-to addresses. This table would have all the expected fields associated with an address, as well as a ship price field where I could put the shipping charges.

 

On the product_info.php page, I would add fields for the address. If the user is logged in, the php would select their default customer address from the table with the customer data and use these as the default values for the fields. Then they wouldn't have to type it in each time if they aren't using the multiple ship-to's.

 

When the user clicks "add to cart" the product should be added to the customers_basket table. This table will have another field in it that will be the ID for the shipping address table. I'm running into a problem because the form submits "product_info.php?products_id=57&action=add_product" when you hit "add to cart", but I cannot find where it actually updates the database. Also, when a user is not logged in, where is the cart data being stored? It's not in the database. I'm assuming that there is an array someplace of the cart class that is being dumped into the database when they sign in. This is messy.

 

Ok.... I should probably stop here or else this will get really long. Needless to say, the address data will be then associated with the products on an order and so on and so forth... but I'd like to get this far first.

 

Please let me know your comments, ideas, help, or even if you think that this project is not do-able (and why).

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