Announcement

Collapse
No announcement yet.

variant pricing .. permutations

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

    variant pricing .. permutations

    bit of an odd one here maybe?

    New site, selling lots of small components ..

    example:
    One product image, with a drop down of several version (4mm, 6mm, 10mm etc.,). Each version has a different price (currently I have this in brackets within the drop down) .. so far so good.

    The client wants to display the unit price .. but they are despatched in bags of five or ten (depending on the product).

    How do I go about showing the unit price in the drop down, but when customer adds to basket it adds the item (but with the quantity - and value - in the shopping basket multiplied by the bag quantity? .. say unit price x10?)

    #2
    Have the unit price in the product description field is all i could think of. How bizarre though, surely it's going to be one of the most confusing lists you could imagine?

    Comment


      #3
      Create a product level Variable "BagCount" with the default set to 1.

      Change this to the appropriate value on these products.

      Tweak the code that displays said price to check BagCount and if it's not 1 to divide by that value and replace price by something like "£n.nn each".

      Actinic's built in PHP will allow you to do this.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Like the idea Norman, nice one. Only problem with that is the rounding off issues i expect, where mystery pennies will get added or removed so things don't tie up. I guess having round figures exactly divisible by the number of items is the answer to that though.

        First goat point of the year for the lateral thinking.

        Comment


          #5
          Originally posted by NormanRouxel View Post
          Create a product level Variable "BagCount" with the default set to 1.

          Change this to the appropriate value on these products.

          Tweak the code that displays said price to check BagCount and if it's not 1 to divide by that value and replace price by something like "£n.nn each".

          Actinic's built in PHP will allow you to do this.

          Coo .. I see steep learning curve ahead! (I love the work 'tweak' there ..! .. makes it sound so simple). Thanks for the pointers though .. at least I can head in vaguely the right direction as I lash about wildly in the code causing all sorts of misery ..

          Comment


            #6
            Goat point, eh! Best I really earn it:-

            If you're using layout Additional Price In Brackets to display these permutation prices, then changing it to:
            Code:
            <actinic:block if="%3cactinic%3avariable%20name%3d%22PermutationAssociatedPricesAreUsed%22%20%2f%3e%20%3d%3d%20FALSE" >
               (+<actinic:block PHP='true' SELECTABLE='false'>formattedcurrency(<actinic:variable name="PermutationPriceRaw" /> / <actinic:variable name="BagCount" />, <actinic:variable name="CurrencyDigits" />, '<actinic:variable name="MoneyDecimalSeparator" />', '<actinic:variable name="MoneyThousandSeparator" />', '<actinic:variable name="DefaultCurrency" />');</actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22BagCount%22%20%2f%3e%20%21%3d%201"> each</actinic:block>)
            </actinic:block>
            <actinic:block if="%3cactinic%3avariable%20name%3d%22PermutationAssociatedPricesAreUsed%22%20%2f%3e" />
               (+<actinic:block PHP='true' SELECTABLE='false'>formattedcurrency(<actinic:variable name="AssociatedProduct::ProductPriceRaw" /> / <actinic:variable name="BagCount" />, <actinic:variable name="CurrencyDigits" />, '<actinic:variable name="MoneyDecimalSeparator" />', '<actinic:variable name="MoneyThousandSeparator" />', '<actinic:variable name="DefaultCurrency" />');</actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22BagCount%22%20%2f%3e%20%21%3d%201"> each</actinic:block>)
            </actinic:block>
            Should be job done.

            Don't forget to create variable BagCount as well.

            Make sure that BagPrice is never set to 0 as you'll be dividing by it and smoke would pour out the back of your computer.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              thanks Norman, you're a star!

              I don't suppose you know how I might be able to populate the bag quantity into the drop down list, in the same way the price is dropped into brackets there do you?

              I'm just thinking for the future, to streamline any updates or changes.

              Comment


                #8
                Originally posted by davidfarndon View Post
                thanks Norman, you're a star!

                I don't suppose you know how I might be able to populate the bag quantity into the drop down list, in the same way the price is dropped into brackets there do you?

                I'm just thinking for the future, to streamline any updates or changes.
                Replace the two ocurrences of "each" with
                Code:
                each - packed in bags of <actinic:variable name="BagCount" />
                Norman - www.drillpine.biz
                Edinburgh, U K / Bitez, Turkey

                Comment


                  #9
                  not sure what I'm doing wrong here .. but obviously something's not working.

                  I set up a BagCount variable, and a Product Code variable .. so the client can add this in when they are adding products.

                  I can see the idea of having the raw price divided by the bag cound to display the per unit price. It's just a thought but can it work the other way around ..i.e. the raw price is the unit price, multiplied by the bag count to create the value in the basket?

                  I really would like the drop down box to have the product name and the per unit price, the bagCount details AND the reference number displayed .. i tried adding this into the code .. but it seems to be not making any changes to the 'additional price in brackets' .. it would be quite nice to format it somehow to display something like "XYZ123 at £0.79 each, QTY 10 per bag, ref 12345XYZ" at the moment, it seems to be ignoring everything and it's just showing the unit price straight out of the permutations table.

                  Code:
                  <actinic:block if="%3cactinic%3avariable%20name%3d%22PermutationAssociatedPricesAreUsed%22%20%2f%3e%20%3d%3d%20FALSE" >
                     (<actinic:block PHP='true' SELECTABLE='false'>formattedcurrency(<actinic:variable name="PermutationPriceRaw" /> / <actinic:variable name="BagCount" />, '<actinic:variable name="CurrencyDigits" />', '<actinic:variable name="MoneyDecimalSeparator" />', '<actinic:variable name="MoneyThousandSeparator" />', '<actinic:variable name="DefaultCurrency" />');</actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22BagCount%22%20%2f%3e%20%21%3d%201"> each - packed in bags of <actinic:variable name="BagCount" /> : product code = <actinic:variable name="Product Code" /></actinic:block>)
                  </actinic:block>
                  <actinic:block if="%3cactinic%3avariable%20name%3d%22PermutationAssociatedPricesAreUsed%22%20%2f%3e" />
                     (<actinic:block PHP='true' SELECTABLE='false'>formattedcurrency(<actinic:variable name="AssociatedProduct::ProductPriceRaw" /> / <actinic:variable name="BagCount" />, '<actinic:variable name="CurrencyDigits" />', '<actinic:variable name="MoneyDecimalSeparator" />', '<actinic:variable name="MoneyThousandSeparator" />', '<actinic:variable name="DefaultCurrency" />');</actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22BagCount%22%20%2f%3e%20%21%3d%201"> each - packed in bags of <actinic:variable name="BagCount" /> : product code = <actinic:variable name="Product Code" /></actinic:block>)
                  </actinic:block>

                  Comment


                    #10
                    You have guessed a variable name <actinic:variable name="Product Code" />. There's no such beast in Actinic.

                    Best use one that exists like ProductRef or ProductReference.

                    See the Help / Variable Reference Guide / Contents / Variables By Product Area / Product.
                    Norman - www.drillpine.biz
                    Edinburgh, U K / Bitez, Turkey

                    Comment


                      #11
                      I found the ProductRef and ProductReference variables listed in the help file, but they don't appear in the library listing .. not sure why that might be. I tried to create a ProductRef variable and Actinic tells me there's already one with that name .. but where is it then?

                      also .. the reference field at the top of each new product (I am assuming this is what the ProductRef is referring to) covers the product .. but each product has several permutations (to do with various sizes) .. how can I give each variation a unique product reference? I could do with it as a field in the permutations table .. or at worst where in the choices tab.

                      I'm floundering a bit here .. am I wrong to use product > component > attributes > choices (I was sort of copying the idea from the default data).

                      I'm trying to get one product image, with a drop down box of variations on that product (showing, hopefully the unit price and quantity in each bag) .. selecting one of the variations (and a quantity) to add to the basket and the resulting addition to the basket gets the BagCount involved .. so the right amount of money is calculated (so a unit price of 0.79, bag qty of 10 results in adding £7.90 to the basket .. the product reference for THAT variant AND the BagCount confirmed in the resulting paperwork).

                      Am I going about this all wrong? .. it seems logical, but I am not there yet!

                      Comment


                        #12
                        Just paste in

                        <actinic:variable name="ProductRef" />

                        or

                        <actinic:variable name="ProductReference" />

                        and see what happens.

                        Actinic doesn't know that you're in the middle of laying out a product so may not offer these variables automatically.
                        Norman - www.drillpine.biz
                        Edinburgh, U K / Bitez, Turkey

                        Comment


                          #13
                          Originally posted by NormanRouxel View Post
                          Just paste in

                          <actinic:variable name="ProductRef" />

                          or

                          <actinic:variable name="ProductReference" />

                          and see what happens.

                          Actinic doesn't know that you're in the middle of laying out a product so may not offer these variables automatically.
                          thanks Norman, appreciate your guidance here .. I'll try that and see what happens (if you hear a bang ..)

                          Comment


                            #14
                            ok .. the product reference it pops in is the value of the reference field .. that's ok if the product is unique .. but here each product has multiple variations... each with it's own unique reference number. For the moment, I am adding the reference into the choice name (so it's displayed within the drop down). That may have to do for now, or else I'm never going to get this b****y thing finished!

                            Your code incidentally works (no surprise to you perhaps - but I was getting myself in a muddle for sure) .. useful to note, it only seems to work when I put the new variable BagCount input field on the permutations tab .. when I had it on the choices tab (or anywhere else I tried it) .. it didn't pick up the info for some reason. So that's all working very nicely now.

                            Thanks a million Norman .. it's been an interesting few hours.

                            David

                            Comment


                              #15
                              this is all working pretty well .. I have found (on the test site) adding a product results in everything adding ok .. but I would rather like to have a reference on the shopping cart (and beyond through the checkout stage, receipt etc.,) which confirms that BagCount quantity.

                              I tried adding the BagCount into the layout of the shopping cart, but it is displaying a 1, when (say) it should read 10 .. I think (and it's a guess) it's displaying the default number rather than the figure inserted into the BagCount field.

                              do I have to add it in a different way so the correct value from the BagCount variable is displayed?

                              Comment

                              Working...
                              X