Jump to content

How would you create this type of table?


poolhustler86

Recommended Posts

I am only just starting to get into php... and found this table i like on a major companies website (http://www.signet.net.au/Catalogue/browse.aspx?sid=586)

 

basically i would like to know how they create this dynmaicly only the data table..where the prices are located.

 

i have my ideas on how it would be created.. each in a single row in a database grouped up with a product... but i have no idea how to make sure i have the right qty when the user enters a qty in...to give them the right price...

 

also.. how do you get the add to cart button... to add products to a database table.. if u enter qtys in 2 or more items...

 

just asking how you would go about doing this... solutions / ideas would be most helpful!

Link to comment
https://forums.phpfreaks.com/topic/93478-how-would-you-create-this-type-of-table/
Share on other sites

id rather learn for my own benefits...

 

it would be two tables... one table with product information... like the bullets..for description, and name... and then... another table with the qty breaks... i have down it with qty on each rows... but it doesnt look pretty... i want to know how to get it in that format...

that may help... i will fiddle with that tomorrow... but how do you go about... collecting data from the table... when the user clicks add to cart... and insert it into the database.. it might be only one field.. but it could be 10 different colour variations..etc..

i already know how to build a cart... and creat payment gateways.. but i didnt have a product that has multiple sizes, etc..

 

is it just a loop with the collected data? i just dont know how to give each different row.. a field name different... etc.. thats the part im stuck on.. and how to get it to insert into a table in mysql.. the rows with data in them from one button..

 

i was going to do it.. with multiple add to cart buttons... but im trying to understand loops / foreach statements and everything like that

 

basically i know how to insert / retrieve data and select data from databases... and make my system work.. but for multiple sizes of a product i cant get it to work.. ive tried for months...

i do not believe its beyond my abilities... im just trying to get my head around the logic side of it...

 

and a piece of sample code (cant find on the web) for how to create dynamic fields with different numbers so i can add into database if customer puts more than 1 qty in one different size...

 

 

i need the logic for this part...

 

the table is fine.. i know how to set up that in a way that would be suitable...

 

at the end of the table there is a qty box... however.. there could be 1 qty box.. or there could be 20 qty box per one product.. depends on the number of different sizes / colours or products...

 

how do u do that part.... i could do it all with manual numbers.. at ends of fields and have like 100+ variables already declared.. but thats just ugly!

and, thorpe, i see no reason why not too.  if you can pull it everywhere you need it just the same, and explode it, its like .00000003 ms longer

 

plus, explode and related are used alot of the time for GET and POST, so why not DB?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.