Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9159993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:37:46+00:00 2026-06-17T13:37:46+00:00

I’m putting together an ecommerce site for a client with a fairly complex pricing

  • 0

I’m putting together an ecommerce site for a client with a fairly complex pricing scheme. I’ve chosen to use foxycart, and have all product prices dynamically come out of a database. The reason for this is that every customer gets different prices for products for single units, and for varying quantities purchased. I’m trying to build the most flexible system I can, but I’m not sure what is best.

firstly I’ll have a customer_table
with:

id, name, city, state, country, zip, phone

Next is where I’m trying to decide how to build things. Right now there are 18 or so unique products, and some of these come in different sizes/volumes and have unique price break points per product, per size. So one product would have a price for less than 4 purchased, another for less than 10, another for less than 19, and another for greater than 20, and difference prices for the same product but at a different size. These price break points are not standard across all products either. Some may have price breaks at 3,9,12, while others may have less than 5 and greater than 5. The best way can think is just to build a table with 50 columns listing all these out. None of the data repeats, since it will change depending on the cust_id, so it seems normalised to me, but I’m wondering what you all think. This table might look like this:

id, cust_id, product1_lt4, product1_lt20, product1_gt20, product2_lt6, product2_lt12, product2_lt60, product2_gt60, etc...

With lt and gt being less than/greater than obviously. It just gets so huge.

I was trying to break up the tables as much as possible having a Category_table, Sub Category_table, product_table, size_table, and price table but I can’t think of any good way of inputting the data without having loads of null fields or 50+ tables.

Let me know if this makes sense. I can provide more detail if needed. I guess my main question is, is it a bad idea to go with option 1?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:37:47+00:00Added an answer on June 17, 2026 at 1:37 pm

    I might go with something like this:

    Customers
    id,first_name,etc...
    
    Categories
    id,name,etc...
    
    Sub_Categories
    id,name
    
    Category_Sub_Categories
    category_id,sub_category_id
    
    Product_Categories
    product_id,category_id
    
    Product_Sub_Categories
    product_id,sub_category_id
    
    Products
    id,name
    
    Customer_Product_Prices
    customer_id,product_id,quantity,price
    

    Then you can just assume that the lowest quantity associated with a product is for any amount less than, and the greatest quantity price is for any quantity over

    I believe this would be the most flexible and scalable way to build something with the complexity that you are trying to achieve

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I have a text area in my form which accepts all possible characters from
Let's say I'm outputting a post title and in our database, it's Hello Y’all
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.