Jump to content
Larry Ullman's Book Forums

Search the Community

Showing results for tags 'size product'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Single Editions
    • Modern Javascript: Develop and Design
    • The Yii Book
    • Effortless Flex 4 Development
    • Building a Web Site with Ajax: Visual QuickProject
    • Ruby: Visual QuickStart Guide
    • C++ Programming: Visual QuickStart Guide
    • C Programming: Visual QuickStart Guide
    • Adobe AIR: Visual QuickPro Guide
  • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (5th Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)
    • PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (1st Edition)
  • PHP for the Web: Visual QuickStart Guide
    • PHP for the Web: Visual QuickStart Guide (5th Edition)
    • PHP for the Web: Visual QuickStart Guide (4th Edition)
    • PHP for the Web: Visual QuickStart Guide (3rd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (2nd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (1st Edition)
  • Effortless E-commerce with PHP and MySQL
    • Effortless E-Commerce with PHP and MySQL (2nd Edition)
    • Effortless E-Commerce with PHP and MySQL
  • PHP Advanced: Visual QuickPro Guide
    • PHP Advanced and Object-Oriented Programming: Visual QuickPro Guide (3rd Edition)
    • PHP 5 Advanced: Visual QuickPro Guide (2nd Edition)
    • PHP Advanced: Visual QuickPro Guide
  • MySQL: Visual QuickStart Guide
    • MySQL: Visual QuickStart Guide (2nd Edition)
    • MySQL: Visual QuickStart Guide (1st Edition)
  • Other
    • Announcements
    • Newsletter, Blog, and Other Topics
    • Forum Issues
    • Social

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 1 result

  1. I am using MAMP on a Mac for development purposes. It has: Apache 2.2.21 MySQL 5.5.9 PHP 5.3.6 PHPMyadmin 3.3.9.2 In looking at the database design, I decided to only use categories, products and sales tables as that was all that was really needed. There are several sizes for some of the products but only a small or large version. (say 2oz or 8oz) I also added a few description fields to the product like contents, instructions and a small and large image as well as a short and long description so I can display a short version in the listing and a long version in the product description/detail page. For the two different sizes on some of the products I was simply going to title it small or large after the product name and have a size field within the product itself as well indicating its size. The product_type field seemed to be not needed so I took it out. Each product has an id and a category id. This works well - I have each of the categories as a link and the redirect works fine for listing all the products in a category. Click on a product in the category listing view and it pulls up the individual product by its id. I used "sales.php" as the category listing and modified the query appropriately. I used "browse.php" for the individual listing and modified its query to only display the individual product. From there there is the link to add to cart. I modified the HTML/CSS views as well. What I would like to do however, is when the individual product is pulled up, if there is a small and a large size, display both small and large link on the product listing - a link to add the small and a link to add the large. Display both so the user can add either one. Unless I put in another field into the products table that indicates that there is another size available - a logical field that indicates that and then a query to pull up the other one (say matching descriptions) - or go with a separate size database that lists size id and the product id, size and price. For the products that have multiple sizes there would be multiple entries that would match that product id. I would guess that the price would have to go into the size table as well. For products that only had a single size there would be only one entry in the size database that matched that product id. When adding to the cart, the product id would have to have a size id and thus would have a price. The sku would be modified to include a product id and a size id when adding to the cart. The other one is simpler in that I would only need the product id. Does this approach make sense? Anything I am missing? Thanks.
×
×
  • Create New...