Theme Customisations - Coding
Before you proceed:
The following article contains information that requires you to have some prior knowledge about coding in order to correctly implement the proposed change to your theme. If done incorrectly alterations made to your theme’s code can negatively impact your website causing visual and performance issues. Therefore, we strongly recommend that you only undertake this effort if you are completely confident that you know what you’re doing. If you have no coding experience at all, aren’t entirely comfortable following the instructions in this article or if you simply don’t understand the instructions then we recommend you instead contact our partners, Coding Masters, who will complete the work for you for a set fee.
If you're using Platform Checkout you don't need to edit your theme's files to make this customisation. You simply need to alter this setting with the platform checkout customisation settings.
By default, all ShopWired themes include an ‘I have read and accept the terms & conditions’ tick box on the checkout page. This tick box will look something like the below example, although may vary slightly depending on the theme being used:
Our platform requires that this field be completed before a customer can submit the checkout form to your site. However, if you don’t want this tick box to display you can easily hide it by altering some code within your live theme’s files. To alter your live theme’s files you’ll need to access the page editor for your theme. To do this first select 'Themes' then 'Installed Themes' from the left menu of the admin system. Choose to open the Page Editor on your live theme. Open the Views folder then the Checkout Pages folder to locate the checkout_addresss.twig file. Then follow these instructions:
Find the section in the file that relates to the terms and conditions tick box. The exact coding displayed in this section will vary from theme to theme, but will look similar to the highlight section of the code displayed here:
You should remove (or comment) all of this code.
Then replace the code with a hidden field, such as: <input type="hidden" name="terms" value="1">
You should then have something that looks like the example below:
Once you have finished altering the code make sure you remember to save your changes. Then check your website to make sure the tick box has been removed and that your checkout is still working as it should be.