problem with opencart add to cart button

4 replies
  • WEB DESIGN
  • |
I found this and added it to my product details page

<a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a>

What do I have to add and/or change to make the add to cart button/text work?

For the past three weeks I've been searching forums and everywhere google finds to get info on what to add or change and where to put it to make this cart thing work. I have found bits and pieces of things but no clear idea of where to put them.
#add #button #cart #opencart #problem
  • Profile picture of the author topnichewebsites
    Did you try this

    <button type="button" onclick="cart.add('43');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">Add to Cart</span></button>

    43 being probably the product ID number

    Mike
    Signature
    http://pixelcovers.com/ <- eBook add eCovers

    https://www.unicommercesolutions.com <- WordPress Websites and Maintenance
    {{ DiscussionBoard.errors[9994482].message }}
  • Profile picture of the author alexiseverson
    Thanks

    I tried that and the button shows up but it still doesn't go anywhere.
    Do I need to put some script in the head of the page?
    {{ DiscussionBoard.errors[9995201].message }}
  • Profile picture of the author topnichewebsites
    Link the page please, or PM it, Mike
    Signature
    http://pixelcovers.com/ <- eBook add eCovers

    https://www.unicommercesolutions.com <- WordPress Websites and Maintenance
    {{ DiscussionBoard.errors[9995643].message }}
    • Profile picture of the author alexiseverson
      here's the link It's a work in progress. I want to get the shopping cart links dealt with so I can add them to the new pages as I go along rather than going back in and changing a gazilion of them all at once.

      Web Store - Product Details

      I'm about ready to give up trying to get opencart to work. I did a bit more searching and I don't think I can just link to cart without changing a lot of code or re-doing my entire site.

      Please let me know if you think it is possible to put the links or maybe I should go with something else like maybe one of those cloud based carts.

      Thanks
      {{ DiscussionBoard.errors[9995672].message }}

Trending Topics