Announcement

Collapse
No announcement yet.

Making an optional component "required"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Making an optional component "required"

    I need to have a confirmation checkbox on my product page, as I want to be able to ask the customer to confirm they have checked their order. ( prescription spectacles so quite complicated)

    I want it to be a checkbox that is clear by default, but must be checked before the product can be added to the cart.

    is there a way to add this at the product stage?

    Thanks

    #2
    You could create a product layout specific for this situation, where the prompt input box is converted to a checkbox and therefore needs to be checked before they can proceed. You are effectively using a field that would normally be requesting mandatory text, changing its format to a checkbox, renaming it to say 'I have read the T&C's etc.' and using it that way to force a mandatory click. You do of course need to not be using prompts already though for this idea. This method will use standard actinic scripting then, meaning nothing complicated to change/add.

    Comment


      #3
      aaahhhh thanks for that.

      I don't use the prompts so i can play with that freely.

      I'll have a look at that in the morning.

      Thanks very much,

      I'll post back when i have cracked it

      Comment


        #4
        Here's how to add that capability to a product.

        Go to Design / Library / Layouts / Products and right-click your product layout.

        Choose "Copy". Rename that copy layout to something of your choosing.

        Edit that new layout.

        Replace
        Code:
              <form method="post" action="<actinic:variable name="OnlineScriptURL" value="Shopping Cart Script URL" />">
        with
        Code:
              <form method="post" action="<actinic:variable name="OnlineScriptURL" value="Shopping Cart Script URL" />"
                onsubmit="if (this.tac.checked){return true;}else{alert('You must confirm that your details are correct!');return false;}" >
        And add this to the layout in a suitable place to provide the checkbox
        Code:
              <input type="checkbox" name="tac" /> I confirm that these details are correct...
        Now use this layout for these type of products.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Thanks very much Norman, your code worked perfectly.

          You are a great help!

          Comment

          Working...
          X