Announcement

Collapse
No announcement yet.

How to add Plus and Minus (- +) buttons by quantity box:

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

    How to add Plus and Minus (- +) buttons by quantity box:

    The code below adds (what I think is very useful) plus and minus buttons beside the quantity box. To use this feature, you need to turn on "Quantity On Product Page", found under Design, Options, Shop Defaults tab.


    Open Act_ProductLine.html (or whatever your current Default Product Layout template is - Design, Options, Layouts tab, Default Product Layout, Edit)

    Find:
    NETQUOTEVAR:CARTERRORXMLNETQUOTEVAR:PRODUCTQUANTITY

    And below it, add the following code:
    <input class="q_dec_button" type=button value="-" onClick="javascript:this.form.elements['Q_NETQUOTEVAR:PRODUCTREFERENCE'].value--;">
    <input class="q_inc_button" type=button value="+" onClick="javascript:this.form.elements['Q_NETQUOTEVAR:PRODUCTREFERENCE'].value++;">

    ################################
    ######## WARNING..... ###############
    #### REMOVE THE SPACE BETWEEN THE #####
    #### WORDS java script IN THE CODE #####
    #### ABOVE. (this is a foibal of these #####
    #### FORUMS). ####################
    ################################

    Now open Act_Primary.html, and add the following code within the <head>...</head> tags:

    <style type="text/css">
    <!--
    .q_inc_button { font-family: Arial, Helvetica, sans-serif; font-size: 15px;
    height: 22px; width: 22px; clip: rect( )}
    .q_dec_button { font-family: Courier New, Helvetica, sans-serif; font-size: 16px; font-weight: bold;
    height: 22px; width: 22px; clip: rect( )}
    -->
    </style>



    (The style declarations just get the buttons looking nice. I've tried this successfully in IE6 and NS7.)

    Et voila!

    Nick Morecroft.

    #2
    this is very nice - if i can get it to work

    you say "And below it, add the following code" - my guess is, that i should put it directly after the netquotevar:carterror.... in code view... but that wont work.

    there is apparently missing some ';' in the script (anyway, thats what windows tell me, and im a gullible one, so i trust that)

    The buttons are looking fine, but the function is missing

    hope u see this soon
    cheers
    rasmus landgreen, dk
    rasmus e landgreen
    Work: <a href="http://www.net4you.nu">net4you.nu</a>
    Personal: <a href="http://www.weblike.dk">weblike.dk</a>

    Comment


      #3
      The forum sometimes munges pasted in text. The code above and below should have "java script" as one word without the space in the middle and the lines starting with < should be one long line 'till the >.




      Code:
      <input class="q_dec_button" type=button value="-" onClick="javascript:this.form.elements['Q_NETQUOTEVAR:PRODUCTREFERENCE'].value--;"> 
      <input class="q_inc_button" type=button value="+" onClick="javascript:this.form.elements['Q_NETQUOTEVAR:PRODUCTREFERENCE'].value++;">
      Norman
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        supercool

        thx once again jo and norman.

        now, another one...is it possible to add likewise functions to the viewcart-javascript? You know, the one that constantly displays quantity and value. So it would be possible to remove products from any page displaying the cart contents? And adding more of the products u already ordered?
        rasmus e landgreen
        Work: <a href="http://www.net4you.nu">net4you.nu</a>
        Personal: <a href="http://www.weblike.dk">weblike.dk</a>

        Comment


          #5
          and yet another thing - is it possible to have the products displayed in the cart content thingie, instead of the quantity of products ordered?
          rasmus e landgreen
          Work: <a href="http://www.net4you.nu">net4you.nu</a>
          Personal: <a href="http://www.weblike.dk">weblike.dk</a>

          Comment


            #6
            hi all

            I have followed what you guys have done and i cant seem to make this work?

            the only difference is i use left aligned templates but i edited these

            any ideas or do i have a space where i should not?

            cheers
            darren

            Comment


              #7
              sorry to be a pain

              I have some how managed to use different template throughout my shop so some had this function and some did not.

              Cheers
              Darren

              Comment


                #8
                now, another one...is it possible to add likewise functions to the viewcart-javascript? You know, the one that constantly displays quantity and value. So it would be possible to remove products from any page displaying the cart contents? And adding more of the products u already ordered?
                It's not worth going there. This would mean that all your product pages would have to be generated as the customer browses by a perl script which included the shopping cart html. It is technically feasible but would be quite a drain on the server.

                One thought for the Actinic designers would be that the cart scripts could generate and maintain an html page containing that customers cart details (like the View Cart page). This could be included on any other pages via an iframe type tag.


                Norman

                p.s. Rasmus. How did you acquire "Superman" status?
                Norman - www.drillpine.biz
                Edinburgh, U K / Bitez, Turkey

                Comment


                  #9
                  ok norman.

                  thats too bad. Ive seen it in a lot of asp-based shops, and think it's pretty neat.

                  anyways, about the superman status, you edit profile, and somewhere in the bottom, u can change it. But superman is already taken!

                  rasmus landgreen, dk
                  rasmus e landgreen
                  Work: <a href="http://www.net4you.nu">net4you.nu</a>
                  Personal: <a href="http://www.weblike.dk">weblike.dk</a>

                  Comment


                    #10
                    I think Norman was asking what had done to call yourself superman ie save the world, not how to change your profile!

                    Comment


                      #11
                      Darren

                      Have you checked the template defined on a product which works against a product that doesn't.

                      I suggest you have 2 templates?

                      Comment


                        #12
                        Hi all,

                        I think Norman was asking what had done to call yourself superman ie save the world...
                        No I just wondered how that got in there. I didn't change anything and it went Automatically from New member, to Member, and now Senior member after I'd posted 100 times. I didn't know you could spoof it.


                        Anyway isn't it up to Actinic support to save the world (or do we need Cover for that)?

                        Norman

                        p.s. Jo, Nick. Congratulations for a really elegant hack.
                        Norman - www.drillpine.biz
                        Edinburgh, U K / Bitez, Turkey

                        Comment

                        Working...
                        X