Custom button for e-commerce cart?

Discussion in 'HTML & Website Design' started by clarkmilark, Aug 1, 2011.

  1. #1
    How do I integrate the add to cart code into the button so that it functions as a custom button rather than the button used by the ecommerce solution?

    Here is the "Add To Cart" button generated by Cart66:

    <form id='cartButtonForm_2' class="Cart66CartButton" method="post" action="http://www.myurl.com/?page_id=1" >
    <input type='hidden' name='task' id="task_2" value='addToCart' />
    <input type='hidden' name='cart66ItemId' value='2' />
    <p> <span class="Cart66Price">Price: $49.00</span></p>
    <input type='submit' value='Add To Cart' class='Cart66ButtonPrimary purAddToCart' name='addToCart_2' id='addToCart_2' /></form>

    Here is the custom button code from my site:

    [button size="large" width="121" link="http://www.myurl.com/?page_id=1" bgColor="#f6fafa" textColor="gray"]SILVER[/button]

    Thanks!
     
    clarkmilark, Aug 1, 2011 IP
  2. clarkmilark

    clarkmilark Member

    Messages:
    88
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #2
    I hope there is someone out there that can help me with this fix..
     
    clarkmilark, Aug 2, 2011 IP
  3. lithicstudios

    lithicstudios Peon

    Messages:
    5
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The button markup you provided is not html. It appears to be markup provided by a forum.
    You can try this and see if it works. It may not if the ecommerce solution only accepts POSTs (not GETs, which is the request that would be sent below):
    [button size="large" width="121" link="http://www.myurl.com/?page_id=1&task=addToCart&cart66ItemId=2" bgColor="#f6fafa" textColor="gray"]SILVER[/button] 
     
    lithicstudios, Aug 4, 2011 IP
  4. Toycel

    Toycel Peon

    Messages:
    243
    Likes Received:
    11
    Best Answers:
    4
    Trophy Points:
    0
    #4
    You need to integrate the two codes together as the last line of the generated code is the button for submit. The value is the text on the button and the class probably refers to a css function in one of the stylesheets
     
    Toycel, Aug 7, 2011 IP