Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts

    link text to shopping cart?

    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.
    Last edited by teedoff; 07-22-2011 at 05:05 PM. Reason: resolved
    Teed

  • #2
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,760
    Thanks
    41
    Thanked 191 Times in 190 Posts
    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

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #3
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    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.

    Code:
    <form action="http://www.auctioninc.com/cart/"
     enctype="application/x-www-form-urlencoded" method="post"> 
    <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"> 
    </form>
    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:

    Code:
    <input name="cart_btn" type="text" value="order this product">
    which doesnt seem to work. I'm thinking this isnt possible at all?
    Teed

  • #4
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,760
    Thanks
    41
    Thanked 191 Times in 190 Posts
    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

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #5
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    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.
    Teed

  • #6
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,760
    Thanks
    41
    Thanked 191 Times in 190 Posts
    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

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •