Announcement

Collapse
No announcement yet.

Form validations on products

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

    Form validations on products

    Hi everyone, were are in the process of building a site, and have run into a problem.

    What we are trying to do is make it so that when we click an add to cart button, if the sum of the products does not add up to 12, the customer will recieve an error message, and prompted to try again.

    The page we are working on is here.

    We have tried placing a java validation script in the product description, with the code by the cart button, but it didn't work.

    We are hoping someone can guide us in the right direction, and maybe come up with a solution.

    Thanks in advance,
    Pete.
    Pete Crewdson - Web Developer,
    WNW Design Ltd. Web Design and Search Engine Optimisation for the Devon, UK area.
    <a href="http://www.wnwdesign.co.uk/" target="blank" title="WNWDesign.co.uk - Web Design And Search Engine Optimisation From WNW Design Based In Devon, UK">http://www.wnwdesign.co.uk</a>

    #2
    Hi Pete

    I'm verifying with my senior colleagues if this can be done. As soon as I hear from them I'll get back to you.
    Kiran Chandran
    Technical Support - SellerDeck
    http://www.sellerdeck.co.uk/

    Further help can also be found at http://community.sellerdeck.com/forumdisplay.php?f=27

    Comment


      #3
      This has already been covered on this Forum. See http://community.actinic.com/showthr...=&threadid=384

      There may be other posts that cover the same. Try searching.

      Norman
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Hi Pete

        Just wanted to make sure this is exactly you want to do. If a customer does not have 12 or more products in the shopping cart they should not be able to check out. Is this right? Then solution is as follows

        ______________________________________________________________

        Edit Act_Order00.html and look for the line:-
        <input type=SUBMIT name=ACTION value="NETQUOTEVAR:NEXTBUTTON">
        REPLACE it with:-
        <script language=JavaScript>
        <!--
        /************************************************************/
        *
        * getCartItem - Gets the Actinic Cart Value & No of Items
        *
        *************************************************************/

        //CART_CONTENT = Cookie name
        //1 = TOTAL_VALUE
        //3 = CART_COUNT

        function getCartItem(index)
        {
        var act_cart= getCookie("CART_CONTENT")
        temp =(act_cart != null) ? temp=act_cart.split("\t"):0;
        return (temp.length > 0) ? temp[index] : 0;
        }
        // -->
        </script>

        <input type=SUBMIT name=ACTION value="NETQUOTEVAR:NEXTBUTTON" onclick="if (getCartItem(3) >= 2) {return true;} else {alert('Minimum order is 2 items');return false;}">
        <!-- <input type=SUBMIT name=ACTION value="NETQUOTEVAR:NEXTBUTTON"> -->

        Where it says
        if (getCartItem(3) >= 2)
        the '2' can be replaced with another minimum quantity


        _______________________________________________________________________

        Hope this helps
        Kiran Chandran
        Technical Support - SellerDeck
        http://www.sellerdeck.co.uk/

        Further help can also be found at http://community.sellerdeck.com/forumdisplay.php?f=27

        Comment


          #5
          Not quite, the solution we're looking for is just on the one page of the website, and it is if the customers total of the 3 drop down boxes does not add up to 12, then they will not be able to add the product to their cart until it does.

          Hope that makes sense.
          Pete Crewdson - Web Developer,
          WNW Design Ltd. Web Design and Search Engine Optimisation for the Devon, UK area.
          <a href="http://www.wnwdesign.co.uk/" target="blank" title="WNWDesign.co.uk - Web Design And Search Engine Optimisation From WNW Design Based In Devon, UK">http://www.wnwdesign.co.uk</a>

          Comment

          Working...
          X