We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13207
    • 59 Posts
    I’m still looking into using Modx. Have seen where shopping carts are being worked on to integrate with it.

    Here is what I want to do. I have a book site. Want to have my books integrated with a shopping cart. The updated inventory file is uploaded twice a day via ftp.
    Haven’t seen any carts out there that have modules that work with the inventory file format, which is Homebase, a text based file.

    Have about 4,000 books, so want to dynamically generate pages, organized or searched on by book subject categories, price, title, author.

    The inventory file field headers look like this (with an example entry given):

    HDRS|
    PRCT|HBV3.0
    DATE|07/12/2006 20:43:45
    TIME|20:43:45
    HVER|2.3.15
    USER|FHALDER
    COMM|
    SYST|PROD
    FNAM|
    HPFM|
    HDRE|
    BOOS|
    BOOK|C043I22
    TRAN|D
    STAT|Sold
    SUB1|
    ISBN|051770739X
    TNAM|Downsize This!
    ANAM|Michael Moore
    EDNT|
    DESC|*Brand New* Gift quality. Great Book!
    UPDT|2005-10-06
    BNDC|Hardcover
    PBLS|Crown
    PPRC|0
    SGNT|
    PRIC|1.29
    BOOC|New
    BOOE|
    BOOS|
    BOOK|C106IJB
    TRAN|D
    STAT|Sold
    SUB1|
    ISBN|0253204232
    TNAM|Beyond the Veil: Male-Female Dynamics in a Modern Muslim Society
    ANAM|Fatima Mernissi
    EDNT|
    DESC|Has some underlining. writing in book. Has some highlighting. Has some shelf wear.
    UPDT|2006-07-06
    BNDC|Paperback
    PBLS|Indiana University Press
    PPRC|0
    SGNT|
    PRIC|3.94
    BOOC|Fair
    BOOE|
    TRLS|
    PRCT|HBV3.0
    DATE|07/12/2006 20:43:45
    TIME|20:43:45
    HVER|2.3.15
    USER|FHALDER
    COMM|
    SYST|PROD
    FNAM|
    HPFM|
    TADD|0
    TDEL|2
    TCNT|2
    TRLE|

    Does anyone have tips, suggestions, on doing this with Modx, or indepentently via a recommended open source cart script with Homebase files? Thanks.
      • 21257 MODX Staff
      • 730 Posts
      One approach would be to get a developer to create a custom cart solution for you in MODx, if you have the budget.
      If you don’t have the budget for a custom solution, I believe there are some people around with some experience running an OSCommerce store inside MODx - then you would need some custom OSCommerce work done for your inventory requirements.
      My gut feeling is that you’re not going to find a magic bullet. I’d love to be wrong though, so anyone, please let me know if I am smiley
        Mike Schell
        Lead Developer, MODX Cloud
        Email: [email protected]
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell
        • 4673
        • 577 Posts
        I hate to say it but I agree this is going to be a custom mod, I haven’t seen many carts recently that work with a flat file base, expeccially since SQL db hosting has become common place.

        You do have an option of exporting that file to tab-delimitated or something similar and then do an import to the cart. However, I would expect that with all those fields you are also looking at a custom cart to join in the fun.

        osCommerce would need to be heavily moded to work with your db layout.

        NOTE: I was hoping that in the future there would be a way to create fields to provide this support. I have been thinking about this for a while, however, at the moment I’m working on my fork of an old cvs version to work with modx. At the moment, I’m still at the rebuild stage of the fork, just a tad bit more to go before I take the next step to integrate with modx smiley

          Tangent-Warrior smiley
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          I’ve seen this before; I guess it’s fairly standard book data format.
            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
            • 22815
            • 1,097 Posts
            OK. The first 11 lines are data header. Each book runs from BOOS to BOOE (Book Start to Book End?). There are 16 fields of information between these markers. And there’s some data footer fields at the end.

            It looks like you have a unique ID for each book - eg BOOK|C106IJB - which is good news.

            (ISBN is *not* unique in this instance as you appear to be selling second-hand books and you could easily have two differently priced copies of the same book).

            I believe that what is best to do is to update a MySQL database with information regularly. Having your data in a database makes searching much easier.

            I have previously used an import tool with osCommerce to successfully import thousands of books from a CSV format into the MySQL db. This uses the unique IDs to update products that it already has, or add new products as appropriate. I believe it should be possible to adapt such a script to work with this format with whatever e-commerce system you use.

            Note that while you will need to add fields into the e-commerce system, you don’t actually need to use all of them in the cart. You could concatenate book ID, title and author into one Title field - in addition to having them as seperately stylable elements on the page.

            Finally, if you are selling books online, don’t forget that your inventory changes will work both ways! You will need some report of book sales that you can feed back into the Homebase system.

            For what it is worth, I’m looking at ways of bringing together osCommerce and MODx, although the osCommerce that I use is heavily modded. I am likely to release things like a MODx snippet that displays the top 10 / most recent products from osCommerce db. (An alpha of osCommerce 3 just came out, which I am looking at this weekend before deciding exactly what I’m going to do with my osC stores).
              No, I don't know what OpenGeek's saying half the time either.
              MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
              Forum: Where to post threads about add-ons | Forum Rules
              Like MODx? donate (and/or share your resources)
              Like me? See my Amazon wishlist
              MODx "Most Promising CMS" - so appropriate!
              • 13207
              • 59 Posts
              Thanks all.
              A little more information. The data format is not my choosing. I use a book listing/management service which can only upload my inventory in the Homebase format (which was created by Abebooks). I just point it to my ftp and it uploads a file twice a day. So if I didn’t have to massage the data further into a database, at least on one end, would be great.
              Would be interested in finding out more about that import tool. Would only need to pull in about 8 fields for display in a cart.
              As books sold on the site, I would need to manually account for to adjust my inventory with the book listing service.
                • 22815
                • 1,097 Posts
                The import tool that I have used with osCommerce is "Easy Populate"
                http://www.oscommerce.com/community/contributions,500
                although this has to be run manually. If you need to run the import twice daily, that’s a separate issue; there are various ways to achieve that.

                Can I clarify: you use a service which uploads a file twice a day - is that the upload to Abe, or can you have multiple data uploads twice daily? What is the name of the book listing/management service?

                It would need some heavy modification to use the Abebooks format - and some additional intelligence so that it didn’t reset your sold books to unsold, etc. Also, some quick googling reveals that the Homebase format has issues:
                In addition, Homebase databases are usually full of duplicate records and these have to be pre-purged to avoid problems after the fact.

                Presumably these steps were taken by ABE as a result of expediency or the desire to limit use of records outside of their system. Whatever the reason, they create huge problems for the bookseller.
                so watch out.

                Although I’ve spoken of osCommerce, it would be possible to use MODx and ShopX with some sort of import/update script. ShopX uses documents as product items, with a TV for Price. Therefore to import into ShopX you "just" need an import script that created/updated documents (and TVs) based upon the content of a text file and the values of the existing document.

                Either way, there is some coding to be done by someone!
                  No, I don't know what OpenGeek's saying half the time either.
                  MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
                  Forum: Where to post threads about add-ons | Forum Rules
                  Like MODx? donate (and/or share your resources)
                  Like me? See my Amazon wishlist
                  MODx "Most Promising CMS" - so appropriate!
                  • 2762
                  • 1,198 Posts
                  Quote from: Carsten at Sep 02, 2006, 04:41 AM

                  I hate to say it but I agree this is going to be a custom mod, I haven’t seen many carts recently that work with a flat file base, expeccially since SQL db hosting has become common place.
                  ......



                  QuickCart ? http://opensolution.org/?p=Quick.Cart
                    Free MODx Graphic resources and Templates www.tattoocms.it
                    -----------------------------------------------------

                    MODx IT  www.modx.it
                    -----------------------------------------------------

                    bubuna.com - Web & Multimedia Design
                    • 13207
                    • 59 Posts
                    Thanks, will check these out!
                    Am aware of issues with Homebase (is not my choice..)
                    The service I use is theartofbooks.com.
                    Daily uploads are sent via ftp in HomeBase format with the filename formatted like:
                    <username>_<time>_purge.txt
                    The _purge is dropped for non-purge updates.
                      • 22815
                      • 1,097 Posts
                      I see you can have 5 "custom venues". That’s a nice looking service.
                        No, I don&#39;t know what OpenGeek&#39;s saying half the time either.
                        MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
                        Forum: Where to post threads about add-ons | Forum Rules
                        Like MODx? donate (and/or share your resources)
                        Like me? See my Amazon wishlist
                        MODx "Most Promising CMS" - so appropriate!