Announcement

Collapse
No announcement yet.

checkbox instead of quantity

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

    checkbox instead of quantity

    What is the best way to implement checkboxes instead of quantity fields for a single addtocart page? We specifically do not want to use components.
    thanks

    #2
    Are you only selling 1 of each item?
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Yes - just one per checkbox. thanks

      Comment


        #4
        Copy your usual Product Layout (right-click it in the Library and choose "Copy").

        Rename that layout to something like "Checkbox Quantity Layout ...".

        Amend that layout to replace the existing Quantity code with:
        Code:
        <input type="checkbox" name="Q_<actinic:variable name="ProductID" />" value="1" />
        Use this layout for all such products on the page (set it for the Section and all products will use it).

        Test and see if it works.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          thank you for this excellent answer.

          Comment


            #6
            If you had a list of products on a page using this checkbox style, could you make it that clicking an add to cart would add all checked items?
            Dave

            Comment


              #7
              Yes, as long as you used this layout for all products on the page and you changed the page's shopping mode to "Single Add to Cart On Page".
              Fergus Weir - teclan ltd
              Ecommerce Digital Marketing

              SellerDeck Responsive Web Design

              SellerDeck Hosting
              SellerDeck Digital Marketing

              Comment


                #8
                This is what I have used it for. I have implemented actinic code outside of the cart for babycareTENS. I have used a single add to cart button. Components were not ideal, as the customer would not be able to uncheck individual products.

                http://www.babycaretens.com/redeemhire/

                Comment


                  #9
                  Q_ added to code got it working for me

                  Originally posted by NormanRouxel View Post
                  Code:
                  <input type="checkbox" name="<actinic:variable name="ProductID" />" value="1" />
                  Code:
                  <input name="Q_<actinic:variable name="ProductID" />" type="checkbox"  value="1" />
                  Firstly thanks to Norman for pointing me in the right direction but his code wouldnt work for me until I added the "Q_" in my code.

                  I am using v11
                  Paul Hesford
                  Web Design Wigan

                  Based in the Northwest of England UK, provides web design, programming, e-commerce and web hosting services

                  Cheap Whey Protein from Powerbeck
                  Web Designer in Wigan
                  Actinic Hosting
                  Dog Kennels and Runs

                  Comment


                    #10
                    Whoops. I've amended my original post to correct that omission.

                    Many thanks for pointing it out. Sorry for the trouble it must have caused.
                    Norman - www.drillpine.biz
                    Edinburgh, U K / Bitez, Turkey

                    Comment

                    Working...
                    X