Announcement

Collapse
No announcement yet.

Different Next Button Text

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

    Different Next Button Text

    The thread seems to have disappeared asking how to have different text on the next button on page 2 of the checkout.. as I had coded this may as well post in case of use to others:

    Code:
    <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%20%21%3d%20%22Checkout%20Page%202%22">
    	<input type="submit" name="ACTION" value="<actinic:variable encoding="html" name="NextButton" />" />
    </actinic:block>
    <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Checkout%20Page%202%22">
    	<input type="submit" name="ACTION" value="Place Order" />
    </actinic:block>
    The above is placed in layout "Checkout Next Button"


    Bikster
    SellerDeck Designs and Responsive Themes

    #2
    Thread has resurfaced http://community.actinic.com/showthread.php?t=37806


    Bikster
    SellerDeck Designs and Responsive Themes

    Comment


      #3
      Hi Jont,

      Thanks for reply. I removed it as I thought I had found the answer but alas not. I removed the javascript call to check the confirmation email address but then realised that this had not solved it.

      My logic is slightly different from yours but this is what I am using and its still not working:

      Code:
      <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Checkout%20Page%200%22%20OR%20%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Checkout%20Page%201%22" >
      	<input type="submit" name="ACTION" value="<actinic:variable encoding="html" name="NextButton" />" onclick="return checkemailaddress()"/>
      </actinic:block>
      <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Checkout%20Page%202%22" >
      	<input type="submit" name="ACTION" value="Place Order" />
      </actinic:block>

      Comment


        #4
        Hmmm.. just uploaded my code and whilst it displays OK when hitting "place order" on page 2 it bounces straight back to the default page with no receipt!! Need to dig deeper than first appearances suggest....


        Bikster
        SellerDeck Designs and Responsive Themes

        Comment


          #5
          Odd thing is when I look at the rendered html via the browser the submit button looks correct.

          Do you think there may be some kind of check behind the scenes that relies on the name of the button - surely not.......

          I'd be most grateful if you can dig anything up.

          Comment


            #6
            Nothing immediately obvious is there!

            Could be one of the os.pl scripts doing something funky but that may as well be Russian to me


            Bikster
            SellerDeck Designs and Responsive Themes

            Comment


              #7
              Hi Jont,

              I was advised by AS to look at page 133 in the advanced users guide.

              This details how to add some script to define different actions based on the name of the button. It only works when the button type is changed to an image though. I did play around with the script to see if I could get it working with a submit button but no joy. I am stumped at why this should be so and the chap on support couldn't answer me either.

              Cheers,

              Comment


                #8
                Hi,

                It can be done on a submit button by doing the following:

                - use Jont's code with a slight amendment on the 'Checkout Next Button' layout:

                Code:
                <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%20%21%3d%20%22Checkout%20Page%202%22">
                        <input type="submit" name="ACTION" value="<actinic:variable name="NextButton" />" />
                </actinic:block>
                <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Checkout%20Page%202%22">
                        <input type="submit" name="ACTION_NEXT" value="Place Order" />
                </actinic:block>
                - then edit the 'OrderScript.pl' file located in the site folder (take a backup first) with notepad

                - locate:

                # read the catalog blobs

                - you should see:

                Code:
                @Response = ReadAndParseBlobs();                # read the catalog blobs
                ($Status, $Message) = @Response;                # parse the response
                if ($Status != $::SUCCESS)
                        {
                        ACTINIC::ReportError($Message, ACTINIC::GetPath());
                        }
                - add the following directly after the above code:

                Code:
                if(!defined $::g_InputHash{"ACTION"})
                          {
                          if(defined $::g_InputHash{"ACTION_NEXT"})
                                 {
                                 $::g_InputHash{"ACTION"} = ACTINIC::GetPhrase(-1, 502);
                                 }
                          }
                - save and close the file and update your site.
                ********************
                Tracey
                SellerDeck

                Comment


                  #9
                  Nice one Tracey

                  With the checkout they way it is may be worth adding this to the program as a default?


                  Bikster
                  SellerDeck Designs and Responsive Themes

                  Comment


                    #10
                    With the checkout they way it is may be worth adding this to the program as a default?
                    I'll suggest it to development, but no guarantees. I'll also add it to the knowledge base.
                    ********************
                    Tracey
                    SellerDeck

                    Comment


                      #11
                      Checkout buttons on business catalog

                      Hi,

                      My client just upgraded to business catalog.

                      I put the code fix back into their .pl file and it doesnt work.

                      Has anyone hit a similar problem?

                      Ta.

                      Comment


                        #12
                        Hi,

                        I've just applied the fix to a site and it is working fine. I suggest you double-check your changes as per my post.
                        ********************
                        Tracey
                        SellerDeck

                        Comment

                        Working...
                        X