Jump to content

checkout page auto give check


dewdropz

Recommended Posts

the quick way would be to edit checkout/tpl and change...

{$customfield.input}

to...

{$customfield.input|replace:'type="checkbox"':'type="checkbox" checked'}

that would auto-tick all customfield checkboxes... if you only wanted to tick the SMS checkbox, then I would wrap the above in an if statement using the customfield ID for that specific field.

{if $customfield.id eq '14'}{$customfield.input|replace:'type="checkbox"':'type="checkbox" checked'}{else}{$customfield.input}{/if}

and then change '14' for the ID of your customfield.

the other way would be to use a ClientAreaPageCart action hook, manipulate the $customfields array to make the above changes and then return the array to the cart.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated