• Luke

    (@lukejongibson)


    Hi, I would like my Add To Cart Buttons to redirect directly to the checkout/cart page. My Code is below, I’m editing the code by hand not using short codes.

    I would be very grateful for any help.

    Thanks

    <!-- Product 1 -->
    
    <div class="product-border">
      <div class="product"> <img src="<?php bloginfo("template_url");?>/images/ceramic-straightener.png" alt="" title="Ceramic Straightener" width="255" height="160" />
        <div class="product1">Ceramic Straightener<br />
          <br />
          <span class="product2">Heatmat</span></div>
        <br />
        <div class="product-bottom">
          <div class="product-bottom-left">
            <div class="product-price">$99.95<br />
            </div>
            <br />
            <span style="color:#2C2C2C; font-size:16px; font-weight:normal;">Free Delivery</span>  </div>
          <!-- product-bottom-left end -->
    
          <div class="product-bottom-right">
            <form id='cartButtonForm_1' class="Cart66CartButton" method="post" action="<?php bloginfo("url");?>/store/cart/" style="color:#000; ">
              <input type='hidden' name='task' id="task_1" value='addToCart' />
              <input type='hidden' name='cart66ItemId' value='1' />
              <input type='hidden' name='product_url' value='<?php bloginfo("url");?>' />
              <div class="product-quantity">
                <label for="Cart66UserQuantityInput_1">Quantity:</label>
                <input id="Cart66UserQuantityInput_1" name="item_quantity" value="1" size="1">
              </div>
              <input type='submit' value='Add to Cart' class='buybutton' name='addToCart_1' id='addToCart_1' />
            </form>
          </div>
          <!-- Product bottom right end -->
    
          <div id="response_warning" class="Cart66AjaxMessage Cart66Warning warning_1" style="display: none;">
            <h2>Inventory Restriction</h2>
            <div id="message_warning" class="warning_message_1"></div>
            <input type="button" name="close" value="OK" class="Cart66ButtonSecondary modalClose"/>
          </div>
          <div id="response_error" class="Cart66AjaxMessage Cart66Error error_1" style="display: none;">
            <h2>Inventory Failure</h2>
            <div id="message_error" class="error_message_1"></div>
            <input type="button" name="close" value="OK" class="Cart66ButtonSecondary modalClose"/>
          </div>
          <div id="response_success" class="Cart66AjaxMessage Cart66Success success_1" style="display: none;">
            <h2>Success!</h2>
            <div id="message_success" class="success_message_1"></div>
          </div>
        </div>
        <!-- Product bottom end -->
        <script type="text/javascript">
    /* <![CDATA[ */
    
    (function($){
        $(document).ready(function(){
        $('.Cart66AjaxWarning').hide();
        $('#addToCart_1').click(function() {
          $('#task_1').val('ajax');
                            buttonTransform('1', '<?php bloginfo("url");?>/?cart66AjaxCartRequests', 'Ceramic Straightener', '<?php bloginfo("url");?>/', 'Adding...', '<?php bloginfo("url");?>/store/cart/');
                        return false;
        });
      })
    })(jQuery);
    
    /* ]]> */
    </script>
        <div class="clear"></div>
      </div>
      <!-- Product end -->
    </div>
    <!-- Product border end -->
  • The topic ‘Cart 66 Professional, Add to Cart Redirect’ is closed to new replies.