07-21-2011, 08:53 PM
I have a shopping cart form which works fine. What I need is a bit of text linked to that cart. Sounds simple enough, but for the fact that the text is suggesting a customer "order this product", other wise "order this product".
What I mean is, one product we sell has two options. The customer would figure out which option they need and then select the correct application and click the link. The links are provoded in a bit of text that tells the customer to make sure of which option they need, then order one or the other.
Is there a way to link some text to a shopping cart even if the linked text is not in the cart form? Doesn't seem very possible, since the link has no way of passing the product values.
If anyone has any suggestions or needs more info, let me know. I'd rather not post any url links, but would provide the code privately.
07-22-2011, 06:56 AM
what is the backend of your cart app? I assume you are using php or asp... if asp PM me and i may be of some help... php I'm stumped
07-22-2011, 03:33 PM
lol thats the problem. We're using a standard html form that passes the product info to the shopping cart(auctioninc.com).
I know I can use the type attribute and set its value to text and then specifiy the value attribute with the text I want, but that doesnt seem to work.
<input name="cmd" value="_cart" type="hidden">
<input name="business" value="1808" type="hidden">
<!-- Item Information -->
<input name="item_name" value="Some Product" type="hidden">
<input name="item_number" value="Some Product Number" type="hidden">
<input name="amount" value="124.50" type="hidden">
<input name="quantity" value="1" type="hidden">
<input name="taxable" value="1" type="hidden">
<input name="undefined_quantity" value="1" type="hidden">
<!-- Shipping Information -->
<input name="calc_method" value="C" type="hidden">
<input name="lot_size" value="1" type="hidden">
<input name="weight_lbs" value="3" type="hidden">
<input name="weight_oz" value="0" type="hidden">
<input name="length" value="9" type="hidden">
<input name="width" value="7" type="hidden">
<input name="height" value="6" type="hidden">
<input name="package" value="T" type="hidden">
<input name="insure" value="1" type="hidden">
<input name="supp_handling_fee" value="" type="hidden">
<!-- Carrier Special Services -->
<!-- Add To Cart Button -->
<input name="cart_btn" value="Add To Cart" type="submit">
So, he wants a paragraph somewhere else on the page something like:
This product has two options. Please check your product to determine which option you need. If you have option A, then order this product, if you need option B, then order this one.
He want the text "order this product" to be a link to the shopping cart. That means I would need to use the same form above AROUND the text to be linked so the product values and business ID info can be passed to the shopping cart. But again, instead of a button, he want the text linked.
I tried using this input:
<input name="cart_btn" type="text" value="order this product">
which doesnt seem to work. I'm thinking this isnt possible at all?
07-22-2011, 04:33 PM
can you at least js? i am not seeing anything off the bat that will be do-able strictly html/CSS... at least... the if statements are telling me you need js at the least :(
07-22-2011, 04:38 PM
No, its not utilizing if statements...lol I currently have on this particular page three "Add To Cart" buttons. One for the main Assembly, one for option A and one for option B. Three different forms, but all with form action to the shopping cart. All I'm wanting to do is instead of having a form submit button for option A and option B, I want text, when clicked will submit the form data to the shopping cart.
Text "Option A" will be one form submit...and then the text "Option B" will be another form submit.
07-22-2011, 04:44 PM
sry, i was readin that as if statements... still though can u use js? you still have an onclick event so you need to either post (not an option) redirect to new page (A a pain an B you'll still need server l;ang to pass variables or js) or a client side onclick event... the only thing i can even begin to think of is :hover but that will be a pain as you'll have to have it somehow not unhover... or i guess you could make some crazy absolute slider and move it based on <a>'s? would that work... idk... honestly my head is wrapped around database stuff at the moment (been creating stored procs all week) and any non server side handling is eluding me (aside from a js function). i might be reading it wrong still XD