Help - Search - Members - Calendar
Full Version: retooling html template
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
carljr
hello all. i ran across a super simple shopping cart template that i really like. the html have no text fields only drop downs and selections with 4 values to pass but i'm having a difficult time changing the code side of the template. there are only 4 values that i need to be passed on to the php script. my question is am i right in supposing that i can merely substitute the field names in the html code, with the 4 names that i would like to use? the database has been set up and a connection is established via php. this is actually the last piece of the puzzle. lol. until i get the html right i can't see what values are being passed to the db. i think the template that there are 5 form fields with the following names: " prod2_color1, prod2_qty1, prod2_color3, prod2_size1 and prod2_size3", but i'm not sure. please correct me if i'm wrong. what i want to do is substitute my 4 field names "description, temple, quantity and price" but i get turned around because i'm not sure of field names. i'm not totally new to html and have created my own forms but this is like "retro-fittng". this is the url: http://solutionm3.com/ordertest.html

i'm not looking for a handout or for anyone to do my work. just to be pointed in the right directions. i'm kinda slow so please, if you can, reply as if i were in the 2nd grade. thanks, i appreciate yall.

the html is rather lengthly so i'm thinking that's why i am unable to post the entire code. however, the view source url is here: view-source:http://solutionm3.com/ordertest.html

thanks again, all.
CharlesEF
Yes, the HTML element name and value attributes pair is what gets passed during a post. Did I understand your question correctly?
carljr
QUOTE(CharlesEF @ Jan 17 2016, 06:13 PM) *

Yes, the HTML element name and value attributes pair is what gets passed during a post. Did I understand your question correctly?

yes sir, in part. i now understand that it is just a matter of substituting my 4 names for their's but what i don't get is which form field names will i need to change? it's a bit confusing on which to change out....it's kinda murky out there. i believe that the field names i thought were correct are actually wrong. i keep getting turned around. thanks.
CharlesEF
QUOTE(carljr @ Jan 17 2016, 05:29 PM) *

QUOTE(CharlesEF @ Jan 17 2016, 06:13 PM) *

Yes, the HTML element name and value attributes pair is what gets passed during a post. Did I understand your question correctly?

yes sir, in part. i now understand that it is just a matter of substituting my 4 names for their's but what i don't get is which form field names will i need to change? it's a bit confusing on which to change out....it's kinda murky out there. i believe that the field names i thought were correct are actually wrong. i keep getting turned around. thanks.

The sample link you posted show 4 items in the basket. Each of those items uses the id and names "prod2_size1, prod2_color1, prod2_qty1 and prod2_remove1" so you will see them used 4 times. But are you sure that is the page you want to modify? I mean there should be some template that has only 1 item and that template is used once for each item purchased. I think that 1 template is the page you should change not the page with 4 items.
carljr
QUOTE(CharlesEF @ Jan 17 2016, 07:01 PM) *

QUOTE(carljr @ Jan 17 2016, 05:29 PM) *

QUOTE(CharlesEF @ Jan 17 2016, 06:13 PM) *

Yes, the HTML element name and value attributes pair is what gets passed during a post. Did I understand your question correctly?

yes sir, in part. i now understand that it is just a matter of substituting my 4 names for their's but what i don't get is which form field names will i need to change? it's a bit confusing on which to change out....it's kinda murky out there. i believe that the field names i thought were correct are actually wrong. i keep getting turned around. thanks.

The sample link you posted show 4 items in the basket. Each of those items uses the id and names "prod2_size1, prod2_color1, prod2_qty1 and prod2_remove1" so you will see them used 4 times. But are you sure that is the page you want to modify? I mean there should be some template that has only 1 item and that template is used once for each item purchased. I think that 1 template is the page you should change not the page with 4 items.

my partner and i like the layout. yes there are others but we liked this one because it shows all products we offer at the shopping cart and will prevent the user from having to return to the gallery. plus we thought it was kinda unique.
sir, i don't believe that i can alter the "prod2_remove1" because when viewing the code it reads,
CODE
<button class="btn btn-danger btn-mini" type="submit" name="prod2_remove1" value="remove_item" rel="tooltip" data-placement="left" data-original-title="Be careful! This item will be entirely removed from the basket!">
. so i'm still trying to track down the right set of id's and names. once i do that i can really test the site. thanks you much, CharlesEF.
CharlesEF
If you like the layout than that's fine. But I wouldn't feel comfortable suggesting anything to change because I can't see how the HTML interacts with the code. Anything I suggest could end up breaking the template. Sorry I can't be of more help.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.