Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Add Button To Cart Page


Bain

Question

5 answers to this question

Recommended Posts

  • 0

Add to Code Injection Header

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
$(document).ready(function() { 
		$('.CartFooter-checkout-28MW2').append('<div class="tuan"><a href="https://beaverhero.com">Button text</a></div>');
	});
</script>
<style>
  .tuan a {
    display: inline-block;
    height: auto;
    color: #ffffff;
    background-color: #272727;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 12px;
    line-height: 1em;
    font-weight: normal;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0;
    text-align: center;
    text-decoration: none;
    letter-spacing: 0.1em;
    padding: 1.4em 2.8em;
    margin: 40px 0;
}
</style>

replace with your text, url

Link to comment
  • 0

Thank you so much, @tuanphan!!

One more ask if you could help... I've included a "Continue Shopping" button on the cart page and I'd like to style it like the other buttons. Here is the coding that I've used to insert the button. Not sure where the styling code would need to be entered.

<script>
 var d1 = document.getElementById('sqs-cart-container');
 function goBack() {
 window.history.back();
}
 d1.insertAdjacentHTML('beforebegin', '<p><button onclick="goBack()"align="left">← Continue Shopping</button></p>');
</script>

Link to comment
  • 0

@tuanphan

How do I put the "continue shopping" link on the same row as the subtotal texts? Below is the code I used.

Thank you!!

<script>
  $(document).ready(function() { 
		$('<p style="text-align:left"><a href="http://www.fortsferryfarm.com/pickup-delivery">Continue Shopping</a></p>').insertBefore('.CartTable-subtotal-2nJjm');
	});
</script>

 

Screen Shot 2020-07-24 at 5.27.21 PM.png

Link to comment
  • 0
16 hours ago, siweisong said:

@tuanphan

How do I put the "continue shopping" link on the same row as the subtotal texts? Below is the code I used.

Thank you!!


<script>
  $(document).ready(function() { 
		$('<p style="text-align:left"><a href="http://www.fortsferryfarm.com/pickup-delivery">Continue Shopping</a></p>').insertBefore('.CartTable-subtotal-2nJjm');
	});
</script>

 

 

Can you share link to cart page? We can check easier.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...