|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Correction to notes
Under Step 2 Creating the product catalog, under 2. products, you have a table with fieldname, type, description and a breakdown of each field in the products table. I think that the description of the field should read
<br> <br> name - a name for this product (not category as per the previous table) <br> description - a description of this product (not category). <br> <br> I am looking forward to the next sections <br> Thanks |
|
#2
|
|||
|
|||
|
a spelling mistake
This will add an entry into the appropriate MySQL security tables that tell MySQL to create a user called mysql who uses the password mypassword. ^^^^^(I think it should be myuser) myuser can only connect from localhost, and once properly authenticated will be able to issue SELECT, INSERT, UPDATE and DELETE queries on all the tables in the mymarket database (mymarket.*).
Next we have to make mymarket the current database: |
|
#3
|
|||
|
|||
|
Complicated Products?
Excellent article - am really looking forward to the next two.
<br> <br> I haven't really had time to digest the first part fully, put the product description in MySQL (name,desc,price) is obviously very simplified, as stated in the article. I was wondering if anyone has any idea of how much work it would be to incorporate slightly more complicated products (i.e. with colour/size variations, etc.). <br> <br> I guess at the moment they have to go in as seperate products. <br> |
|
#4
|
|||
|
|||
|
excellent
The article is really great. I am looking forward to see the next two articles. And I hope this helps people like me to understand the mysql/php in depth.
keep it up |
|
#5
|
|||
|
|||
|
Re: a spelling mistake
Sorry, missed that one. Thanks.
|
|
#6
|
|||
|
|||
|
Re: Correction to notes
Thanks. I guess I overlooked that one.
|
|
#7
|
|||
|
|||
|
Re: Complicated Products?
Storing them as separate products probably is one of the easiest thing to do, and then have fields that store colour, size, or whatever.
<br> <br> It depends on how you are going to use the data (eg. reporting, etc.) and if you're going to let people search (eg. just look for small sized clothing). <br> <br> If you don't need to report and don't need to search, you can even put that information into the description :) |
|
#8
|
|||
|
|||
|
Enter data
I am just learning how php/mysql work, so I appreciate these tutuorials. One thing that I was looking for was how to enter data into mysql from a webpage form and also how to search for material in my database from a search form (or similar) on a html page.
thanks for the assistance. |
|
#9
|
|||
|
|||
|
undefined variable error
Using the suggested set-up and files provided, I'm getting an error saying that HTTP_POST_VARS doesn't exist in lime 39 of admin/products.php. Is this error an Apache or PHP4 problem?
|
|
#10
|
|||
|
|||
|
Problem solved
OK, just call me stupid. track_vars was set to off in my php.ini. If like me you're using the default configuration, watch for this.
|
|
#11
|
|||
|
|||
|
Shipping Calculator / UPS Link
It would be helpful if part 3 also tied in how to link to UPS to pull REAL TIME Shipping
|
|
#12
|
|||
|
|||
|
Code listing error
From http://www.devshed.com/Server_Side/PHP/Commerce1/page5.html
<!-- Code --> <p><pre><font color=#008000><xmp>mysql> /* create the categories table */ -> CREATE TABLE categories ( -> id int, -> auto_increment not null,</xmp></font></pre><p> <!-- Code --> Oops...but maybe it should be left that way. If someone doesn't notice that problem instantly and correct it, then they haven't worked through the (excellent) beginner sql tutorials here at devshed O:) |
|
#13
|
|||
|
|||
|
Re: Complicated Products?
Along the same lines, how do I put images in product tables? I mean can there be a field like productImage or does it have to be productImgLocation? This is an excellent article, looking forward to the next part.. thanks, srinivas |
|
#14
|
|||
|
|||
|
Re: Complicated Products?
If you're using MySQL, as in the article, and your images are under 64kb, you could use the BLOB data type to store binary data, such as product images. Try looking at http://www.mysql.com under documentation, for more on the BLOB datatype. I guess it would be easy just to add an extra column for each product which stores the image.
|
|
#15
|
|||
|
|||
|
Re: Complicated Products?
Yep, BLOBs are one way to do it, and storing the filename as an extra attribute would be another. One more suggestion may be to name your product images according to the database record. So if your product had an ID of 15 you can have a file called
<br> <br> /images/products/15.jpg <br> <br> And when displaying the product, just check that there exists such a file and if it does exist display it, otherwise display a "no image" picture. <br> <br> There's lots of other ways too. |
![]() |
| Viewing: Dev Shed Forums > Other > Development Articles > Building an E-Commerce Site Part 1: Building a Product Catalog |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|