We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33372
    • 1,611 Posts
    Quote from: Jesse at Dec 07, 2007, 07:36 AM

    Given all your experience setting up carts, I am interested to see your take on my implementation, and any insight you might have.
    I’m too swamped right now to really review your code, but the implementation looks very nice. I’m very encouraged by the assorted eCommerce projects that are sprouting up for MODx. We definitely need to establish an "eCommerce Tool Kit" forum or something like that where we can share tips and widgets instead of everyone writing their own code from scratch.
      "Things are not what they appear to be; nor are they otherwise." - Buddha

      "Well, gee, Buddha - that wasn't very helpful..." - ZAP

      Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
      • 14050
      • 788 Posts
      I agree that it is nice to see the spur of development in the e-commerce area and that it underscores the importance of e-commerce being matched with MODx. I second that a subforum for e-commerce should be added.
        Jesse R.
        Consider trying something new and extraordinary.
        Illinois Wine

        Have you considered donating to MODx lately?
        Donate now. Every contribution helps.
        • 7231
        • 4,205 Posts
        Nice progress with the gCart.

        I agree that it is nice to see the spur of development in the e-commerce area and that it underscores the importance of e-commerce being matched with MODx. I second that a subforum for e-commerce should be added.
        I second that thought. Interesting how it seems to have started with a rant about the impossibilities of e-commerce with MODx. Nice to see the community raise up to the challenge and prove this myth to be wrong. What else can’t be done...bring it on! grin
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don't know what it is.
          Do you, Mr. Jones? - [bob dylan]
        • Hmmm ... off to set up some an "eCommerce and SEO" topic I think.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 14050
            • 788 Posts
            Come Monday, I will be working on converting http://www.blueskyvineyard.com/store from osCommerce to my gCart implementation. So you should see a usuable package, by the middle of next week.

            I am going to try and create a nice Wiki article on how to use gCart for such purposes. The documentation will be tailored to my implementation, but hopefully it will be easy enough to follow and the code abstracted enough that everyone will be able to have a bunch of gCart’s going. Once I get it posted, I plan on taking feature requests, code contributions, recommendations, etc.

            Until then, happy coding!
              Jesse R.
              Consider trying something new and extraordinary.
              Illinois Wine

              Have you considered donating to MODx lately?
              Donate now. Every contribution helps.
              • 14050
              • 788 Posts
              Support for options has been added.

              http://www.cmssandbox.com/MODx095/index.php?id=102

              Right now, all it does is add the options into the description so that the store owner knows what options were selected.  If the same item with different options is added, it just appends it on th end of the description with the quantity for each configuration.  This is a bit wonky and I will likely work out some logic to check the selected options, compare it to the cart, and if that configuration is not in the cart add, if it is, update the quantity.

              Options are simply added by placing them in the chunk for the add to cart form naming them gOption1, gOption2, etc. with a parameter in the snippet of &gOptions=`X`, where X represents the greatest amount of options that any one item may have in your store.
                Jesse R.
                Consider trying something new and extraordinary.
                Illinois Wine

                Have you considered donating to MODx lately?
                Donate now. Every contribution helps.
                • 14050
                • 788 Posts
                Full option support has been added. If the configuration is different, it represents a different item in the cart as it logically should. Also, extra costs based on the configurable options works. With any luck, I will be releasing a package tomorrow or Tuesday.
                  Jesse R.
                  Consider trying something new and extraordinary.
                  Illinois Wine

                  Have you considered donating to MODx lately?
                  Donate now. Every contribution helps.
                  • 14050
                  • 788 Posts
                  I have been steadily working. You can see what the real life implementation looks like here:

                  http://www.blueskyvineyard.com/dry-wine

                  I have some information hard coded in there that I will make parameters in the snippet call. Once I do that, I will release the package and start working on abstracting it more as more people start to use it. If you find any bugs at the above mentioned link, let me know smiley
                    Jesse R.
                    Consider trying something new and extraordinary.
                    Illinois Wine

                    Have you considered donating to MODx lately?
                    Donate now. Every contribution helps.
                    • 1535
                    • 84 Posts
                    Oh, thats just beautiful, Jesse.

                    Really love the look and feel of it.

                    Are you still using a MODX document for each product?

                    If so, can you envision an implementation that uses a separate product table and a MODx document as a template for a large shop?


                    Cheers,

                    Andreas
                      • 14050
                      • 788 Posts
                      Thank you for the compliment smiley I likely won’t head in the direction of using a separate product table with a document as the template.  In doing so you will not be able to leverage the power of ditto, ajaxsearch, wayfinder, etc.  I do not know how large your shop is, MODx can handle roughly 5000 documents/products.

                      Here is the breakdown of have everything gets tied together:

                      The site has a plugin called gSession, which monitors for any items being added to the cart.
                      The site has a template with a call to a snippet named gCart.
                      gCart takes templates contained in chunks to output the cart.

                      The listing of Categories, Items within a category, and Policies is done by using a Wayfinder call.  Categories are a document that is the parent of items.  The category document’s content has a ditto call that grabs the pertinent information from all its children and has a chunk that displays the add to cart form.

                      The items (children of the category documents) contain TVs that hold its weight, price, discount code, etc.

                      I hope as this evolves, it will provide for seamless integrations for anyone that chooses to use it.
                        Jesse R.
                        Consider trying something new and extraordinary.
                        Illinois Wine

                        Have you considered donating to MODx lately?
                        Donate now. Every contribution helps.