Shop online

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I want to build a shop from scratch,
i'm laying down all the possible problem i can find during the way.
how can i structure the database to be able to add unlimited properties  
or attribute to different kind of product ?
like if i sell a t-shirt i will hate to chose size and colour
if i sell a plate probable the model and the colour
i'm looking into other open source shop like oscommerce and the  
structure of the database is really to big for my knowledge so i cant  
really understand it.
i now that i neet to divide all in table as much i can  but how?

Re: Shop online

Quoted text here. Click to load it

How about:

table product: id, name

table properties: product_id, property_name, property_value - maybe
even type/type_id?

table property_type: id, name

You can add endless rows/properties for a product. The type might help
to check propery values. Just remember to store everything as
Order, if you like to show properties is a specific order.


Re: Shop online

Daniele wrote:
Quoted text here. Click to load it

You're insane. Why create the wheel from scratch? As a programmer I know  
that there will always be bugs in any code, but thanks to open source  
there are 100,000 eyes looking at the code and debugging it. For most  
products that you want there is already a well beaten up open source  
alternative. For something as basic as a shopping cart there are at  
least three alternative open source projects that are out there that  
provide a base from which to start. Some are great (like oscmax) some  
are buggy and suck (oscloaded). But a cart from scratch?

[disclaimer: note that my company uses oscmax as our base, we also hand  
built a CMS system - so we are only 1/2 nuts. :-) ]

Re: Shop online

JM Ivler wrote:
Quoted text here. Click to load it
I'm willing to go in that direction because I need the possibility to  
edit and change template in all the way i will need and many shop do not  
  allow me to do that
yes i can change template but oscommerce and osmax i think ( not sure )  
allow to change color css ecc but not the real structure on the front  
and,i'm thinking in use just the back-end and build a new front-end but  
i think i will have first to understand how 100.000 people structured  
the back end to build the other part.
does anyone think like me ?
or can you just advice shop that i can just use and change the front-end
in the way i want ?

Re: Shop online

Daniele wrote:
Quoted text here. Click to load it

On OSCMax I have total control over the template system. I can  
center-align a shop, have right/left or no infoboxes, do whatever I  
want. The template system is very powerful.

BUT! as I tell my customers... "People are very used to a specific sales  
experience online. You may have this great idea on how you want to  
effect it, but will people feel comfortable with being in that format?  
Will you lose customers?" See, the overall goal is to obtain a customer  
and a final sale, not look cool (or Kewl if you so prefer). So, in a  
cart you are looking for the following:

1) good indexing for google (whomever) - this is marketing
2) comfort for the buyer - it has to feel natural to transverse, search,  
explore the store
3) expected simplicity in product selection - adding a product to the  
cart should be one click, getting additional information should be one  
click, etc.
4) cross-sell and up-sell opportunities - this is the ability to show  
the customer sonething else that they might want based on what they have  
already stated that they want. It's what turns a single small sale into  
a larger sale.
5) simple checkout process - data should be entered only once (ie:  
billing address and shipping address) with the ability to change if they  
need to. The steps should be clear and concise. The process should  
"flow" from page to page in a logical and clear manner.

Following these simple rules ensures that a store on-line can fulfill  
all the things that it needs to do process-wise. Then it's just a matter  
of loading the products and making sure that your images and details  
sell the items.

Re: Shop online

Daniele wrote:
Quoted text here. Click to load it

You'd first have to construct your data model, normalize it to get to a
working and practical database setup. Honestly, judgeing from the way
your question is formulated, you are way over your head here.

I could give you an ad hoc answer for the exact examples you mention but
I am afraid it would not be a serious step towards solving the bigger
problem here.

If I'm wrong, and you are in fact comfortable with the challenge ahead,
then it's silly not to 'steal with pride' from existing
scripts/packages. There's literally hundreds if not thousands of
solutions out there, varying from incredibly simple and feature limited
to full fledged high-tech online shopping systems including credit-card
processing features, advanced logistics modules and what have you.

Not the answer you hoped for I guess, but perhaps the one you knew was


Re: Shop online

Schraalhans Keukenmeester wrote:
Quoted text here. Click to load it
I resolve my problem on my own about the properties of the product

about the size of the project yes i agree with you is way to big but
is not the good way to learn that ?
no one born with the knowledge and we learn to walk drooping on the  
floor,i want to be realistic with myself so for this before write  
anything i want to lay down all the project
i want to be optimistic not an idiot

Re: Shop online

Daniele wrote:

Quoted text here. Click to load it

There are two answers to the database structure question.

One school of thought, to which I belong, says that your best short-term,
mid-term, and long-term solution is to build a database whose tables
reflect the actual information you are trying to store.  To take this path,
you need to read up on Normalization.

If you take the route of building proper databases, you do run into a
significant problem with updates to the structures, which don't go the same
way as modifying code. This drives some people to what I can only call
half-wit schemes, such as the infamous Entity-Attribute-Value error.  In
this scheme you build one table with columns Entity, Attribute, Value (and
key, but that's not part of the name).  You never have to restructure
anything because you only have one table.  You also have to re-invent SQL
because you've thrown that out, you kiss performance goodbye, and basically
you spend the rest of your life trying to recode everything you threw away
by using only one table.

In the end you need a tool that can help you maintain code and data
together.  I have my own solution to this, mentioned in an [ANNOUNCE]
posting earlier today, as do countless other people and organizations.

Kenneth Downs
Secure Data Software, Inc.

Site Timeline