Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 24
  1. #1
    Member
    Join Date
    Jun 2007
    Location
    Scotts Valley, CA
    Posts
    49
    Member #
    15405
    Hi all,

    I'm involved in the clothing industry. For clothing, the creation of order forms is somewhat complicated by the fact that you're dealing with several different sizes. I've found some good advice on putting together single part number order forms both here and in other spots on the web. I'm looking for advice on the following:

    1) Creating an order form in HTML from a MySQL database containing style numbers and names, colorway numbers and names and size ranges (size ranges vary from product to product so that the offering is not uniform across products). Each style would have the size range displayed above the input boxes, and there would only be input boxes for the sizes offered. Each colorway would be a separate line on the order form.

    2) Validating that the sum of a size run equals a given minimum.

    3) Putting the customer's order back into a table on the database, tagged with the season and the username.

    My big conceptual issue is how to get a line for each style/colorway into the database table. My understanding is that it's pretty easy to get a single line in there with a single form submission, but maybe harder to get multiples.

    Can anyone direct me where to look for a bit more advice on this?

    Cheers,

    k.

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,715
    Member #
    5580
    Liked
    717 times
    I would imagine the flow to be like this ...

    A PHP script would be run that reads a database (MySQL)
    and builds a form ... that gets displayed on the user's browser.
    If the user happened to "login", previous options they used
    would be included on that form.

    By using Javascripting (or AJAX), you would control
    all of the form functions. For instance, a click on one
    thing would change the options (or choices) on another.

    When the form is complete and the proper combinations
    chosen, then the form would be sent to a PHP script.
    That would handle all of the processing, MySQL, etc.

    ==========

    Now, where to get something like that? no answer for that.

    You might end up hiring someone by using the other part of WDF
    where you can request a programmer for hire?

    This sounds really customized to me, so I'm guessing you won't find
    too much already created that you can use.


  4. #3
    Member
    Join Date
    Jun 2007
    Location
    Scotts Valley, CA
    Posts
    49
    Member #
    15405
    Thanks for the feedback... I'm working on slogging my way through... I'll keep the forum posted if I find a solution.

    Cheers,

    k.

    Quote Originally Posted by mlseim
    I would imagine the flow to be like this ...

    A PHP script would be run that reads a database (MySQL)
    and builds a form ... that gets displayed on the user's browser.
    If the user happened to "login", previous options they used
    would be included on that form.

    By using Javascripting (or AJAX), you would control
    all of the form functions. For instance, a click on one
    thing would change the options (or choices) on another.

    When the form is complete and the proper combinations
    chosen, then the form would be sent to a PHP script.
    That would handle all of the processing, MySQL, etc.

    ==========

    Now, where to get something like that? no answer for that.

    You might end up hiring someone by using the other part of WDF
    where you can request a programmer for hire?

    This sounds really customized to me, so I'm guessing you won't find
    too much already created that you can use.

  5. #4
    Junior Member
    Join Date
    Jun 2007
    Location
    Los Angeles
    Posts
    25
    Member #
    15371
    I wouldn't use Ajax at all unless you are an experienced programmer. Ajax just adds complexity and overhead that only experienced coders should face. It will be too much for an inexperienced programmer to have to deal with.
    Next, you need to story board your web pages - lay them out like a blue print - decide what fields go where - fiddle with the layout until your happy with it - take your time because once you've done this, this WILL be your blue print that you will use to code from.
    Once your GUI web pages are designed, you can then map them to your database tables and fields. Remember, you design your database LAST to capture the data on your web pages that you have designed FIRST. Do not make the mistake of designing your DB first!!
    I would use a server-side language like PHP to do the actual coding - it marries extremely well with MySQL for your database on a Linux server.
    It sounds like your web page will have to use lots of drop down list boxes so your customers can choose and select their options. Listbox selections will be fairly easy to capture using PHP and write to a DB record. Let's work on your web page designs first, then the mapping to your database - report back here how you're doing. When your ready to start coding to read the form data and store it into a DB let us kow and we'll help you more - but for now, you'll have your hands full with story boarding your layout for your web pages and then mapping to a DB.

  6. #5
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,715
    Member #
    5580
    Liked
    717 times
    In this case, I think you need the database first.
    The reason why is because PHP will be using the database to create the form.

    As you add more items, options, combinations to the database, the form
    will change as well, and if the user logs in, the form will reflect their preferences also.

    In a case where your form is "hard-coded", you would create the form first.

    Your form is "dynamic", and is generated because of MySQL.

    The very hardest part of your project will be creating the administrative section
    where someone (like yourself) needs to be able to add/edit/delete items from
    the database.

    I know very little about the clothing industry, but make sure you do a thorough
    check to see if anything exists that is similar to what you are trying to do.

    as Rfresh states ... this is going to be a big project.


  7. #6
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    AJAX is definitely something to tack on at the end, but there are many frameworks that ease the task of actually using it so that it isn't as painful and complicated as it once was. Nonetheless, it should be an afterthought, and your site should operate well even if the AJAX doesn't work.

  8. #7
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,715
    Member #
    5580
    Liked
    717 times
    I just mentioned AJAX because it would allow the form page to dynamically
    change depending on the options selected ... and the form page is determined
    by the MySQL database, so it seemed to make sense using AJAX. A smooth
    transition of changes without page refreshes, although maybe having the page
    refresh is no big deal.

    It just seemed like the "cool" thing to do.


  9. #8
    Member
    Join Date
    Jun 2007
    Location
    Scotts Valley, CA
    Posts
    49
    Member #
    15405
    Hi all,

    Still slogging. My method is this, at the moment (I think you all are thinking of something somewhat fancier than what I'm after):

    1) I set up a database with every piece of information that's going to be necessary to create the order form.
    2) I set up a working php page, which I'm using to pull the information from the database. Later, I'll pull out the functions that will be used on other pages and separate them out.
    3) I'm working through the database to get the right output by trial and error. (Somewhat brute-force, I know, but I'm not rad enough to finnesse it yet).
    4) Once I've got the order form out of the database, I'll hunt down (or write) the correct JS to validate the finished form.
    5) Then I have to figure out the best way to get this back into the database for upload into our order management system.


    So far, it's going fairly well. I'll post more details as I come up with them. In the meantime, thanks to everyone for your thoughts and moral support :-).

    Cheers,

    K.

  10. #9
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Your approach made sense, mlseim, I wasn't slamming it or anything I was just pointing out it would probably be easier to add it on to the end, plus it'd give the added bonus of knowing it would work without JS.

  11. #10
    Member
    Join Date
    Jun 2007
    Location
    Scotts Valley, CA
    Posts
    49
    Member #
    15405
    Hi all,

    // Oops! Looks like I went from step 1 to step 3 (per Shadow's suggestion :-))

    So I've gotten through step 1. I now have code that goes into the database, pulls out the correct values and spits out an order form.

    Now to step 2. How do I get the values from the form into the database in the right spots? I think I understand what's going on in this tutorial pretty well:

    http://www.php-mysql-tutorial.com/us...n/database.php

    and it works great for forms that submit a single record per form. I'm looking, though, to submit multiple records with a form, to represent each SKU (style#/colorway#) that my customer orders.


    Any thoughts on how I might start to look for a way to go about doing that?

    Cheers,

    K.


Page 1 of 3 1 2 3 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:05 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com