Announcement

Collapse
No announcement yet.

Can we Fix the minimum purchase of £15?

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

    Can we Fix the minimum purchase of £15?

    Hello,

    We have our company policy; due to cost considerations we will not process orders below £15 of total value. Even we have clearly mentioned on our home page, still lot of people send orders below £15.

    So we are looking for an alternative, weather the Actinic has any alert, when the user check out and the order falls below £15, there it self should throw an error message to the users.

    Can some one help me in this regard?

    Thanks & Regards,

    JAG
    Jag

    #2
    Dear Jag

    This is covered by the Actinic Advanced User Guide. I have pasted the relevant section below.

    "It is possible to set a minimum order value for the store, but you'll have to change the Perl scripts that control the checkout so it's not advised to try this unless you are familiar with Perl.

    Please note: Actinic Support may not be able to support you with this if you try it. Also note that you will have to reapply this change to the scripts if you upgrade your copy of Actinic Ecommerce.

    Open 'OrderScript.pl' within your site folder and search for 'DisplayPaymentPhase'. The second instance of this will be the headers of a function called 'DisplayPaymentPhase' that will be around line 3037. Just below it, you'll find code like:
    $nTotal = $SummaryResponse[6];
    #
    # 1) If (total == 0 || prices are off)
    # If (user defined field is hidden)
    #
    # mark payment complete
    # mark method pre-pay
    # skip processing
    #
    # else If (user defined is not hidden)
    #
    # mark method pre-pay
    # hide payment stuff
    You then insert the following code straight after it...
    # Changes to enforce minimum order value
    #
    # Put the amount scaled in pence (or cents)
    #
    if ($nTotal < 10000) # Is the total order less than our minimum?
    { # Yes - reject the order
    return ($::FAILURE, "Order value is too low - minimum is £100");
    }
    #
    # End of changes
    #
    The amount to compare against needs to be in the minimum units for that currency (pence for UK pounds, cents for US dollars). When the user tries to pay, it will not offer a payment method, but will give the "Order value is too low" error. You should obviously make your minimum order value visible in your terms & conditions and on your order pages.

    If you want the minimum value to exclude tax and shipping then use $SummaryResponse[2] in place of $nTotal. e.g.
    if ($SummaryResponse[2] < 10000) # Is the total order less than our minimum?"

    Hope that helps, best wishes

    Helen

    Comment


      #3
      Thanks..

      Thanks Helen,

      I have seen it in the Advanced User Guide for version 6
      Thanks a lot for the deed.

      Cheers!
      Jag

      Comment


        #4
        does anyone know if this method of setting min order value is the value of the item ordered with or without VAT and postage?

        Comment


          #5
          I believe that by default the fix uses the order 'Total' value (inc tax and shipping). However, quoting from the Advanced User Guide...
          If you want the minimum value to exclude tax and shipping then use $SummaryResponse[2] in place of $nTotal. e.g.
          if ($SummaryResponse[2] < 10000) # Is the total order less than our minimum?

          Comment


            #6
            MINIMUM ORDERS V7

            Is the option to set a minimum order level going to be in the version 7 release - without the need to be a perl guru ?

            It seems like pretty basic functionality that most card taking merchants would want, I can't believe it has not been there since version 4.

            Comment


              #7
              Chaning currency symbol

              I've added the minimum order perl code, but cannot find the correct symbol to disply the U.S. dollar - $ to appear in the error message described in this thread.

              The dollar symbol is a part of Perl.

              Comment


                #8
                I think you're talking about the line

                return ($::FAILURE, "Order value is too low - minimum is $15");

                change the line to use single quotes (Perl tries to expand variables within double quoted strings) - e.g.

                return ($::FAILURE, 'Order value is too low - minimum is $15');

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

                Comment


                  #9
                  Thank you.

                  Perfect.

                  Comment


                    #10
                    I have implemented this fix, but I dont get the message coming up, just a page refresh of the order page.... have I killed a varaible or netquotevar etc????

                    any ideas ?

                    andy
                    Andy Warner

                    www.legendgames.co.uk - rpgs, boardgames, dice and other geeky stuff
                    www.RPGMiniatures.com D&D and Star Wars Miniatures

                    Both running the Cart from Search Page hack

                    Also www.mainlymurder.co.uk www.thegamesplace.co.uk and www.thediceplace.co.uk

                    All running V8.5.2 Multisite on a windows 7 quad PC, augmented by Mole End automation, from a single shared database, using actinic specific hosting from Host-IT.

                    Comment


                      #11
                      I suggest you restore the original OrderScript.pl from the 'Original' folder (in 'Actinic Ecommerce v6') and then try the perl edit again.

                      Get the code from the Word doc version of the latest v6 Advanced User Guide in order to ensure you have all the correct line breaks etc.

                      Comment

                      Working...
                      X