We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38290
    • 712 Posts
    I've recently come across SimpleCart(js) and even though I'm usually known as a Flash developer who preaches all sites should degrade down to (or rather start with) raw HTML support, I've taken a liking to it despite it's dependency on JavaScript.

    With it's "no database just HTML and JavaScript" philosophy it is very simple to implement.
    http://simplecartjs.org/documentation/setup_initialization

    Of course, since all you need to do to get started selling products is include the JavaScript file and add a few CSS classes to your markup for your products it's a great candidate for becoming a MODX Addon.

    I've started creating a MODX Addon that aims to make building dynamic SimpleCart(js) powered carts as fast as possible. It's not on GitHub yet but annoy me enough and it will be.

    One of the main topics of MODXpo was E-Commerce (or lack there of). I learned that payment gateways are often a problem in areas like Holland, where banks are used rather than credit card processing. I'm not sure if the SimpleCart(js) Email Checkout feature could be helpful for those scenarios, but it seems like it may be. Note that Email Checkout is supported yet but PayPal, Google, and Amazon are.
    http://devries.jp/blog/2012/11/10/modx-cloud/
    http://simplecartjs.org/features/

    The main idea behind this addon is, similar to boilerX, making clever use of System Settings and Elements to make controlling and pricing piecing together simple e-commerce website something that can be done quickly with no coding.

    Here's some of the current key features being worked on:

    • System Settings for config options (see attached screenshot)
    • Options to represent config options set as System Settings as either HTML data attributes or global JS variables
    • Example Template with some Template Variables to use for product data
    • Dynamic JS file (MODX Static Resource)
    • Example elements to use as templates for formatting markup correctly (from SimpleCart) documentation

    Some features being considered:

    • Basic no-js support via linking to associated checkout service page (Google Checkout, PayPal)
    • 3PC View to more easily edit and control Addon options (System Settings)
    [ed. note: dinocorn last edited this post 11 years, 5 months ago.]
      jpdevries
      • 18608
      • 112 Posts
      Great initiative! e-Commerce is truly needed so i'm sure it will be a very popular addon. Let me know if there is something that I can help with!
        Mathias Dannevang | Webdesigner at dannevang.org | Tweets @dannevang
      • I also come across SimpleCartJS some weeks ago and think that this will be suitable for MODx. If you created a GitHub project for this addon, please let me know. I really would like to help.

        Github account: @lokamaya
          zaenal.lokamaya
          • 38290
          • 712 Posts
          Quote from: lokamaya at Nov 26, 2012, 08:45 PM
          I also come across SimpleCartJS some weeks ago and think that this will be suitable for MODx. If you created a GitHub project for this addon, please let me know. I really would like to help.

          Github account: @lokamaya

          I'll try and get it on GitHub as soon as I can, it's just not far along yet to package up. I can send a MODX Cloud Snapshot of it though wink

          It would be great to get some help on this one. It seems like SimpleCart(js) is going to be adding a lot of features down the line and it would be important to keep up with the change they make. Also, what exactly this thing does is still totally up in the air.

          What are the types of things you'd expect it to do? I'm really curious. Right now it focuses on getting up and running, modifying the JS configs through the Manager, and providing some example and usable Templates, Chunks, Snippets, Template Variables that would be useful when managing your content.

          Right now a 'product' only comes with two template variables Price and Qty. That's all they seem to really need to fulfill the minimal requirements of setup (qty may not even be needed).
          http://simplecartjs.org/documentation/setup_initialization

          Another philosophy I'm trying to hold true is creative freedom so keeping the markup in the developer's hands is important. For this reason Chunks use the 'sample.' naming convention similar to what Articles uses. Idea being you should duplication these elements and rename them, removing the sample., so that when the package is updated conflicts are handled gracefully.

            jpdevries
            • 27022
            • 47 Posts
            This looks awesome! I'm loving this idea, as I was just looking into using simplecart on a Site I'm currently working on implementing into modx. The client needs some simple selling functionality, and simplecart looked like the solution. I'm fairly green on the php/js development end of things, but I'll look more into it this weekend if I get the time and hopefully I can contribute something to the project. I'll be anxiously keeping an eye on this topic!
            • I've done it and it's really pretty easy. The only problem I have with the actual implementation now is getting the client to standardize the products so I can use MIGx for input and generate nice consistent output to make the Javascript happy. I'm pretty sure this goes to my PayPal sandbox, but I wouldn't complete an order just in case I did something to it that I've forgotten about.

              http://chamomile.sottwell.modxcloud.com/yarn/sample.html
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 38290
                • 712 Posts
                Quote from: sottwell at Nov 27, 2012, 08:07 AM
                I've done it and it's really pretty easy. The only problem I have with the actual implementation now is getting the client to standardize the products so I can use MIGx for input and generate nice consistent output to make the Javascript happy. I'm pretty sure this goes to my PayPal sandbox, but I wouldn't complete an order just in case I did something to it that I've forgotten about.

                http://chamomile.sottwell.modxcloud.com/yarn/sample.html

                I get a PayPal error message that looks like this on attempt to checkout but it could just be the account not being setup or something?
                http://j4p.us/image/0h1I1G101c3S
                  jpdevries
                • Yes, that's a configuration problem... I'm getting that at the moment, and just haven't had the time to poke at it. Probably because I've moved the original beta cloud to a proper development cloud, and I presume I'll have to edit that somewhere in my PayPal sandbox configuration (has nothing to do with my sottwell cloud!).
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 38290
                    • 712 Posts
                    Quote from: sottwell at Nov 27, 2012, 04:12 PM
                    Yes, that's a configuration problem... I'm getting that at the moment, and just haven't had the time to poke at it. Probably because I've moved my original free.sottwell.modxcloud.com beta cloud to a production cloud sottwell.sottwell.modxcloud.com, and I presume I'll have to edit that somewhere in my PayPal sandbox configuration.

                    That makes sense. Good to know there's some level of security with PayPal!
                      jpdevries
                    • Here what I've done with backend manager for creating/updating product (see the attachment). But there's still much to do, i.e. order management if we want to track user order.

                      The backend manager simply use standard modx webDocument resource. With the help of a plugin, I attach javascript (custom MODext) to redraw the outlook of resource panel.

                      I did not use form customization at all.


                      Label changed:

                      • Pagetitle -> Product Title
                      • Longtitle -> SKU/ISBN
                      • Menutitle -> Short Title
                      • Template -> hidden

                      TVs added (all hidden type):
                      All tvs are hidden type. Then I add some custom field and relate it to hidden tv.

                      • Price
                      • Discount Price
                      • Stock
                      • Author/Artist/Director
                      • Publisher/Merk/Company
                      • Category
                      • Total Ordered

                      There are two options to add image product. First using image's tv; or second, using content editor (tiny mce). I guess I will go to the second option, because introtext will be enough for product description and we can use content field to store an image or multiple images.

                      [ed. note: lokamaya last edited this post 11 years, 4 months ago.]
                        zaenal.lokamaya