Announcement

Collapse
No announcement yet.

Hide Add to Cart button for those not logged in...

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

    Hide Add to Cart button for those not logged in...

    Hi All!

    I want to hide the "Add to Cart" button ONLY for customers who are not logged in - is this possible/easy??

    Thanks

    #2
    Hi,

    Yes, it is easy. In Actinic go to View | Business Settings | Ordering | Customer Login & Ordering.. Untick 'Allow orders from unregistered Customers'. Click on Apply then OK and do an update of the site.

    Kind regards,
    Bruce King
    SellerDeck

    Comment


      #3
      Already tried that, the box is unticked and yet the Add to Card buttons still appear!!

      Comment


        #4
        The solution Bruce gave has meant that when customers who are not logged in click the 'Add to Cart' buttons, they receive an error message.

        If you want to hide the add to cart buttons, then you can edit Act_CartButton.html (or Act_CartButtonImage.html if you have images as your cart buttons)

        Then you can place this line...

        <Actinic:NOTINB2B><!--</Actinic:NOTINB2B>

        before the code for the cart button, and then place this line...

        <Actinic:NOTINB2B>--></Actinic:NOTINB2B>

        after it.

        Comment


          #5
          Solution not complete...

          This solution would be ideal apart from it hides the Add to Cart button for everyone, including those who log in under another customer group.

          HELP!!!!!!!!!!!!!

          Comment


            #6
            Please paste up the code you have edited in your cart button template.

            Comment


              #7
              Actually - much better idea.

              First of all, put the template back how it was. Then...

              De-select the 'Enabled' checkbox for 'Retail' in the 'Prices' tab of your products. This will replace the cart buttons with a message saying 'This product is only available for registered customers' for your retail customers. You can edit the text of this message in 'Design | Text'.

              Comment


                #8
                An interesting idea but the text 'product is only available for registered customers' replaces the price, not the add to cart button. I really need to hide the add to cart buttons.

                Your previous solution hid the buttons for everyone including those logged in. The code in Act_CartButtonImage.html looks like this:

                <!-- CartButtonImage HTML begin -->
                <!-- This template is used for the add to cart button image. -->
                <P>
                <Actinic:NOTINB2B><!--</Actinic:NOTINB2B>
                <INPUT TYPE="IMAGE" SRC="NETQUOTEVAR:BUTTONIMG" NAME="NETQUOTEVAR:BUTTONNAME"
                WIDTH="NETQUOTEVAR:IMAGEWIDTH" HEIGHT="NETQUOTEVAR:IMAGEHEIGHT" BORDER="0" ALT="NETQUOTEVAR:BUTTONLABEL">
                <Actinic:NOTINB2B>--></Actinic:NOTINB2B>
                </P>
                <!-- This template is used for the add to cart button image. -->
                <!-- CartButtonImage HTML end -->

                Looks ok doesn't it??

                Comment


                  #9
                  The problem with the solution I gave is that it had a weird side-effect of not replacing the NETQUOTEVARs of any code within the comments - I had not tested it as thoroughly as I should have done before sending it to you. Sorry about that.

                  Try using this code in Act_CartButtonImage.html:

                  Code:
                  <Actinic:ShowForPriceSchedule Schedules="2,3,4,5,6,7,8,9" HTML="
                  <p><INPUT TYPE=image SRC=NETQUOTEVAR:BUTTONIMG NAME=NETQUOTEVAR:BUTTONNAME
                  WIDTH=NETQUOTEVAR:IMAGEWIDTH HEIGHT=NETQUOTEVAR:IMAGEHEIGHT BORDER=0 ALT="NETQUOTEVAR:BUTTONLABEL"></p>
                  ">
                  I've tested it and it seems to work fine.

                  Comment


                    #10
                    You had me soooo excited then BUT when I use this code, I get...

                    ">

                    ...instead of an Add To Cart button (AND for ALL customers!!!! Grrrrrrr!!)

                    Am I doing something wrong??

                    Comment


                      #11
                      The forum had messed up the code - sorry about that. There should be no quote marks within the 'HTML' part of the expression. Try this code...
                      Code:
                      <Actinic:ShowForPriceSchedule Schedules="2,3,4" HTML="
                      <p><INPUT TYPE=image SRC=NETQUOTEVAR:BUTTONIMG NAME=NETQUOTEVAR:BUTTONNAME
                      WIDTH=NETQUOTEVAR:IMAGEWIDTH HEIGHT=NETQUOTEVAR:IMAGEHEIGHT BORDER=0></p>
                      ">

                      Comment


                        #12
                        I'm having problems getting this code to work too! When I go to upload the site I get the following warning:

                        Unused Variable

                        Warning: Some of the configuration variables were not found in the HTML templates. If you modified these templates, make sure the results are what you want. If you have not modified the templates, the files are probably corrupt. Try restoring them from a backup or contact your Actinic reseller or Actinic Support as appropriate.

                        Template: Act_CartButtonImage.html
                        Variable: ButtonLabel
                        Is there another variable I should have changed elsewhere in the catalog settings?

                        The cart button is removed from the pre-login pages but is unforunately removed from all other pages too.

                        I've tried adjusting the code to include the retail pricing schedule (by adding 1 to the list of Price Schedules shown) but this doesn't appear to work.

                        Is there anything else I should be trying?

                        Comment


                          #13
                          Nothing to worry about - it's just a benign warning - you can choose not to display it again.

                          Comment


                            #14
                            Still no joy with this code. The button is still removed from all pages. Would it be possible to email the editted file to me so I can see where I'm going wrong. It should just be a simple case of copy and paste but I'm just not getting it. I've also tried removing all " and then alternately removing them from those sections that currently show them in your code above.

                            Thanks

                            Comment


                              #15
                              Back to Chris's original idea.

                              You can use
                              Code:
                              <Actinic:NOTINB2B><div style="display:none; visibility:hidden"></Actinic:NOTINB2B>
                              NETQUOTEVAR:ADDTOCARTBUTTON
                              <Actinic:NOTINB2B></div></Actinic:NOTINB2B>
                              However someone else may want to comment on whether such hidden content will annoy search engines. If you're concerned the following ought to suffice
                              Code:
                              <Actinic:NOTINB2B><script type="text/javascript">document.write('<div style="display:none; visibility:hidden">');</script></Actinic:NOTINB2B>
                              NETQUOTEVAR:ADDTOCARTBUTTON
                              <Actinic:NOTINB2B><script type="text/javascript">document.write('</div>');</script></Actinic:NOTINB2B>
                              Norman - www.drillpine.biz
                              Edinburgh, U K / Bitez, Turkey

                              Comment

                              Working...
                              X