Announcement

Collapse
No announcement yet.

Order of Products Added To The Cart

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

    Order of Products Added To The Cart

    I've had a question from a client and i haven't the foggiest what the answer is, so i said i'd raise it on here to see if anyone did know. Any help greatly appreciated.

    A section containing multiple products, with a single add to cart button, does not add the products into the cart in the order in which things are listed on the page. This probably doesn't present too many problems in general, however if you have setup the products to be like a wizard or a stepped approach to choosing things, then when they all get jumbled up in the cart, it is somewhat negating the facility that you have offered and confusing things a little.

    To clarify, imagine you have a section with 5 products:

    Step1
    Step2
    Step3
    Step4
    Step5

    you click on add to cart (single add to cart setup) so they all get added to the cart, but they show in the seemingly random order something like:

    Step3
    Step1
    Step5
    Step2
    Step4

    What denotes the order in which they are added/show and can it be altered to show things in the order they are on page?

    #2
    Good one. Cat file number maybe, otherwise Prod Ref perhaps.

    Comment


      #3
      Off the top of my head I cannot quite remember what orders them - in fact, I'm not even sure they are ordered.
      I do know that one of our clients required an amendment to a script file to try and get some order to the "order". They had over 300 products on a page, all numerically ordered and reflected in their warehousing. Picking the stock for order became a nightmare with randomly printed "picking notes".
      I think the fix only allowed alpha-numeric ordering by product reference.

      If you want I'll see if I can dig out the tweak and see if it is relevant for you?
      Fergus Weir - teclan ltd
      Ecommerce Digital Marketing

      SellerDeck Responsive Web Design

      SellerDeck Hosting
      SellerDeck Digital Marketing

      Comment


        #4
        Thanks Sharkey, i'd appreciate any info you can provide. I have linked client to this thread too, so he can keep up to date with anything i get to find out.

        Comment


          #5
          I've traced back through the records and I've found that it was the orders.rpt file that Actinic made an amendment to - this orders the items in a "picking list" report alphanumerically.

          Here's the rpt file anyway - in case it's of any use.
          orders.zip

          It was made in Feb '08, so it's most likely either a V7 or V8 rpt file.......
          Fergus Weir - teclan ltd
          Ecommerce Digital Marketing

          SellerDeck Responsive Web Design

          SellerDeck Hosting
          SellerDeck Digital Marketing

          Comment


            #6
            You would expect items to be listed in the cart in the order they get added. I guess the problem is when multiple items get added at the same time.

            I haven't looked at the code, but where multiple products are ordered with a single add to cart button then I wouldn't be surprised if actinic sorts that product list alphabetically by product reference. This would probably be the most effecient method of looking up the items in the cat files.

            Your client might find that pre-fixing each product ref with a character in the order in which he's listing them will get them listed in the correct order. It's a relatively easy thing to test.

            Of course this might not be a great solution from other aspects of his business. It depends on what he does with the product references. In my case I use the first character as a supplier reference.

            Mike
            -----------------------------------------

            First Tackle - Fly Fishing and Game Angling

            -----------------------------------------

            Comment


              #7
              Looking at the relevant subroutine in the ShoppingCart.pl script, it looks like the products are processed using a hash array from the form on the product list page. It then uses a 'foreach' loop on this hash array which, unfortunately in perl is a random order for the array. To get an ordered list, you would have to us the 'sort' function on the keys. So, for example the line:
              Code:
              foreach $sItem (keys %::g_InputHash)
              would need to be:
              Code:
              foreach $sItem (sort(keys %::g_InputHash))
              The Product Reference is used as the key in this case so this should add to the cart in order of product reference.

              *This is only a suggestion and hasn't been tested!!
              ActiveStock
              On-line, real-time stock control plug-in for Actinic V7, V8 and V9
              **New - Captcha plug-in for your Contact Us form**

              ActiveStock website
              Free 30 Day Trial
              ActiveStock Blog (including a new tutorial on a 'Sort By' function for long section pages)

              Comment


                #8
                Thanks alot for the help and ideas guys, much appreciated. I'll update the thread if a concrete answer has been found.

                This isn't the site in question, but the same thing occurs on this site with a very similar approach - http://www.quantumelectronics.co.uk/...m_Builder.html - not sure whether permutations will confuse things further, hopefully it is the product reference of the parent product that is used, if not then it really could be a problem.

                Comment


                  #9
                  This is a solution I used to order items in the cart alphabetically - works perfectly for my situation

                  http://community.actinic.com/showpos...6&postcount=12

                  Comment

                  Working...
                  X