Checkbox terms and ...
 
Notifications
Clear all

[Solved] Checkbox terms and condition text bigger

3 Posts
3 Users
1 Reactions
1,118 Views
(@ilyeszoltan)
Estimable Member
Joined: 4 years ago
Posts: 80
Topic starter  

Hi Katrine,

Can you help me to make the text and the check box a little bit bigger for the terms and condition checkbox.

I attach the code you gave me:

In order to add the checkbox (agree with terms and conditions) please follow these steps :

 

  • From your Shopify dashboard, click Online Store > Actions > Edit code.
  • Open the file vendor.js
  • At the bottom of the file, paste the following code:
 $(document).ready(function() {
$('body').on('click', '[name="checkout"], [name="goto_pp"], [name="goto_gc"]', function() {
if ($('#agree').is(':checked')) {
$(this).submit();
}
else {
alert("You must agree with the terms and conditions of sales to check out.");
return false;
}
});
});
  • Click Save
  • Now open the file cart-template.liquid and find this code
<div class="cart__submit-controls">
  • Add this code just below it
<p style="float: none; text-align: right; clear: both; margin: 10px 0;">
<input style="float:none; vertical-align: middle;" type="checkbox" id="agree" />
<label style="display:inline; float:none" for="agree">
I agree with the <a href="/pages/terms-and-conditions">terms and conditions</a>.
</label>
</p>
  • Click Save

     

Replace /pages/terms-and-conditions  with the URL of your terms and conditions page.

Note: You will need to create a terms and conditions page if it doesn't already exist.

Kind regards,
Katrine

 

Thank you


   
Quote
Jasmine Keinsh
(@plakadmin)
Estimable Member Admin
Joined: 4 years ago
Posts: 131
 

Hi @ilyeszoltan

Jasmine here from Plak theme to assist you with the resizing of the Agree with conditions features.

In order to make the text and the checkbox bigger, please follow these steps :

 

  • From your Shopify dashboard, click Online store > Actions > Edit code
  • Open the file theme.scss.liquid
  • At the very bottom paste this code
 .cart__submit-controls p {
font-size : 20px; // text size
}
.cart__submit-controls .agree-input {
width : 20px; // checkbox with
height : 20px; // checkbox height
}
  • Click Save
  • Now go to cart-template.liquid and change this line
<input style="float:none; vertical-align: middle;" type="checkbox" id="agree" />
  • To
<input class="agree-input" style="float:none; vertical-align: middle;" type="checkbox" id="agree" />
  • Click Save

 

Let me know if you have any other questions.

Jasmine

Jasmine | Plak theme support
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as a Solved Solution


   
ilyeszoltan reacted
ReplyQuote
Alan Kane
(@alankane)
Eminent Member
Joined: 5 years ago
Posts: 0
 

thanks for posting this thread, I used that code in my Shop and it is working great 🙂

Owner of Iheadrest


   
ReplyQuote
Share:

Welcome to the Shopify Forum Community provided by Plak ThemeLLC, a place where you can discuss about eCommerce and Shopify, solve technical issues, get help with Shopify Design, Apps integration, Marketing, Facebooks ad, Google ads and more.

Before posting, we invite you to read and follow the forum rules | We also support any questions related to Free Shopify themes :Dawn, Express, Minimal, Brooklyn, Narrative, Supply, Debut, Venture, Boundless and Simple