Custom Shopping cart Button

Discussion in 'Customization & add-ons' started by blueflamman, Apr 29, 2015.

  1. blueflamman

    blueflamman New Member

    Joined:
    Oct 30, 2014
    Messages:
    9
    Hi there,
    I'm a very fresh user to aMember and I have made a site and am wishing to sell video drumming lessons online that will be associated with the users account after purchase. I have created a "Buy it Now " button as part of my site but am having trouble linking said button to my shopping cart.

    Here is a link to my page http://www.in2drums.com/packs/
    (note: page is still under construction so only the first "Buy it now"button is active)

    When I press the button I get a page of script show up.
    I also have placed the aMember HTML link underneath but it seems to do nothing when pressed.

    Any help in getting this to work would be awesome. Please be aware that I'm no coder, I play drums.

    Kind regards
    Last edited: Apr 29, 2015
  2. blueflamman

    blueflamman New Member

    Joined:
    Oct 30, 2014
    Messages:
    9
  3. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Did you copy & paste all code which was generated by amember? In html source I see that there is no javascript code, I see just a link which points to cart.js.
    Can you contact me in helpdesk and show how did you insert button exactly? There could be a problem with wordpress html editor, because it strip <script> tags by default as I remember.
  4. blueflamman

    blueflamman New Member

    Joined:
    Oct 30, 2014
    Messages:
    9
    Hi and thanks for the reply. I am actually using Rapidweaver not Wordpress.
    I will try and contact you shortly.
    thanks
  5. blueflamman

    blueflamman New Member

    Joined:
    Oct 30, 2014
    Messages:
    9
    So I have the aMember button working on the page, but it looks crappy. I am trying to get the same action to happen when I press the green buttons on my page. Is there a way to use my CSS to replace the crappy looking a member button?????
  6. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    aMember adds regular HTML element with type button:
    Code:
    <!-- Button/Link for aMember Shopping Cart -->
    <script type="text/javascript">
    if (typeof cart  == "undefined")
        document.write("<scr" + "ipt src='/amember/application/cart/views/public/js/cart.js'></scr" + "ipt>");
    </script>
    <input type="button" onclick="cart.addBasketExternal(this,60); return false;" value="Purchase">
    <!-- End Button/Link for aMember Shopping Cart -->
    
    You of course can apply any style or CSS class to that element.

Share This Page