Announcement

Collapse
No announcement yet.

Is it possible to add a quantity box to a product in V5?

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

    Is it possible to add a quantity box to a product in V5?

    Is it possible to add a quantity box to a product in V5? I can't seem to work out how to do it.
    I get these blue lights in my mirrors, but when I put my foot down they go away

    #2
    I guess you're all as stumped as me
    I get these blue lights in my mirrors, but when I put my foot down they go away

    Comment


      #3
      All this is in V6. If you want to stick with V5 you'd have to add something like patch ShoppingCart.pl to pick up a quantity from the submitted text.

      I had a patch that extended this by using an attribute called QTY:nnnn with a range of numeric choices. This summed all those choices and presented them to the Cart script.

      Thus you could have attributes called QTY:Red, QTY:Green, QTY:Blue each with choices of (say) 1 to 10. And the appropriate sum of all these choices would get passed to the cart.


      The last release of V5 I did these for was V5.14Beta so if you're using anything prior I could send the patched scripts. For later versions you's have to look through the patches and fix them yourself as It's quite a bit of work and I've no need to do this as I'm on V6 now.

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

      Comment


        #4
        Thankyou
        I get these blue lights in my mirrors, but when I put my foot down they go away

        Comment


          #5
          What version of V5 are you using?

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

          Comment


            #6
            5.1.3.0.0.33.CFJA
            I get these blue lights in my mirrors, but when I put my foot down they go away

            Comment


              #7
              Here are a set of replacement Perl scripts for V5.1.3. They're from a site with several patches and they implement the following (you won't need all of these but they're won't do any harm to leave them in):-

              Here are details of the Perl patches.

              I've attached a zip containing the 5.1.3 patched scripts. Just backup
              your original scripts (from the Site1 folder) before overwriting with these.
              Note that these patches contain 4 different mod's to Actinic. You'll
              probably only be interested in the Quantity one. All patched lines contain
              the string "Norcat" somewhere.

              1. Product images in checkout. This only works if you embed the image
              code in the attribute name. It uses "{{imagename:width:height}}" embedded
              in the attribute name to pass said image to shopping cart. This also works
              for components, where the "{{imagename:width:height}}" is embedded in the
              component name.

              2. If you select the Euro format "n.nn (?e.ee)" it will be displayed over
              two lines at the checkout (to save some space in the Cart pages).

              3. Quantities on the product page. Includes summing multiple quantities
              for different varieties of that product.

              3. Multiplying of quantities on the product page. Allows area, volume,
              etc calculations.

              Remember that this is a perl
              script hack and that Actinic are (rightly) unhappy at supporting modified
              scripts. It comes with all the usual disclaimers and you'll have to amend
              it (or wait for me to do so) whenever you update to a version of Actinic
              that has altered those scripts. Indeed this hack requires modifications to
              4 of the Actinic scripts.



              *****************************************************

              Multiplying quantities together:-

              This allows any number of attributes that begin with the word "Times " to
              have
              their selected choice's multiplied together and passed to the cart as a
              single quantity. This would only be useful for you if the dimensions you
              want the customer to enter can be predefined and wouldn't cause a crazy
              length list (you wouldn't want a drop down box with hundreds of selections
              in it).

              e.g.

              Attribute,Times Width (cm)
              Choice, 5
              Choice, 10
              Choice, 15
              .
              .
              .

              Attribute,Times Depth (cm)
              Choice, 10
              Choice, 20
              Choice, 30
              .
              .
              .

              This would allow you a product (priced per square cm) and you could choose
              (say) Width 10 and Depth 20 and thus order 200 of that item. The choices
              appear on the order so you'd know exactly what to ship.

              This isn't just restricted to area - you could have another attribute "Times
              Depth" and sell by volume.



              *****************************************************

              Quantities and summing quantities (selecting lots of varieties of the same
              product) on the product page.

              It is possible to have a Quantity box per product, and several for
              variations (colours, sizes, etc) of a product via some perl patching:-

              The patched perl scripts that allows an attribute called "Qty
              Reqd" to pass the selected value from its list of numeric choices (zero
              allowed and optional) to the cart stage.

              This also is expanded to allow a product to have many attributes called Qty
              <anything but Reqd>, again with a list of numeric choices. In this case
              all the selected choices are summed and passed to the cart stage as the
              total quantity requred. The nonzero descriptions and their counts are
              displayed and any zero quantities are suppressed from being displayed.

              Remember that this is a perl
              script hack and that Actinic are (rightly) unhappy at supporting modified
              scripts. It comes with all the usual disclaimers and you'll have to amend
              it (or wait for me to do so) whenever you update to a version of Actinic
              that has altered those scripts. Indeed this hack requires modifications to
              4 of the Actinic scripts.

              Note that this hack allows you to use an attribute and its list of choices
              as the required quantity. It doesn't let the user type in a number (and
              likewise prevents them from making a crazy selection). This is only useful
              if the quantity you require fits into a sensible size range.

              Implementation:- An specially named attribute called Qty Reqd can have a
              list of numeric choices. Whichever choice is selected will be the one
              presented at the cart stage. The Qty Reqd attribute is hidden at cart as
              it's only needed to get the number into the quantity box.

              I.e. for a hotel booking you could have

              Attribute, Qty Reqd
              Choice, 1
              Choice, 2
              Choice, 3
              Choice, 4
              .
              .
              Choice, 32

              Assuming no-one stays more than 4 weeks and a minimum of 1 day.

              Now at the Cart stage you get the product as with the Quantity
              field set to whatever number was previously selected. If the user wants
              they can amend the count at the Cart as usual.

              **********************************

              That was the simple case.

              This is further enhanced by any number of
              attributes named Qty <anything but Reqd> again with a list of numeric
              choices.
              In this case all the Qty <whatever> selections are summed and presented as
              the total quantity at the cart.

              Thus if you were selling Smarties you could have:-

              Attribute, Qty Red
              Choice, 0
              Choice, 1
              Choice, 2
              Choice, 5
              Choice, 10
              Choice, 50
              Attribute, Qty Green
              Choice, 0
              Choice, 1
              Choice, 2
              Choice, 5
              Choice, 10
              Choice, 50
              Attribute, Qty Yellow
              Choice, 0
              Choice, 1
              Choice, 2
              Choice, 5
              .
              .
              and so on

              Now you could select 10 Red, No Green and 5 Yellow and at the Cart you'd see

              Smarties
              Qty Red: 10
              Qty Yellow: 5

              and the Actinic supplied Quanity box would contain 15. The quantity field
              is no longer editable in this case. The forms Quantity entry field is
              suppressed; and when you display the cart the "Edit" button is unavailable.

              Because the total quantity is a complex selection the user is unable to
              amend
              this. If they changed the quantity to 16 - what colour extra is needed!?*.
              They have to delete the entire line and re-order.

              OOPS. The forum won't let me attach these as the Zipfile is bigger than 100K and it seems to have a limit on attachment size. You'll need to give me an e-mail address to send them to.

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

              Comment

              Working...
              X