We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3632
    • 22 Posts
    Ok folks,

    As the title says, I’m starting implementation of a product catalogue for a site I am working on and have been thinking about the best way to architect it. Initially, I was going to store my product information solely in a third party table, build my schema and generate my classes, manage the products via CMP’s and use snippets for the front end display all products with one dynamic ’product details’ page which would display a particular product based on the product ID sent to it but then I got to thinking about leveraging the power of what is already in ModX. I know there is work being done at the moment on the VisionCart project but it looks like this is some way off in terms of delivery and also, I am not sure it would be able to handle my product modifiers which are inter-dependent and whose pricing need to be generated based on a particular formula rather than entered by hand.

    Specifically, I like the idea of having one page per product. That means I can have the end user easily customise the page content to best SEO effect, benefit from the security model of ModX (some products would need to be available for viewing by the general public, others only to logged-in distributors) and provide a somewhat more intuitive interface for my client consistent with how the rest of the site is managed. I can also use Ditto to generate product listings and Wayfinder to navigate through them.

    It seems I have a few options when it comes to doing this.
    1. Given that there is a class_key field in the site_content table I assume that similar to extending modUser I can extend the site_content class and link my products table to it with a one to one relationship. In this case I would use form customisation to tailor the creation and update forms for a product template based resource using a plugin to save my extended fields. In the past I have used managermanager with Evo but have no experience using form customisation in Revo yet so should I be expecting a big learning curve there? I am somewhat hazy about how I would implement this on the frontend of the site yet but since in this scheme I am mostly using existing fields in site_content I can use those such as as title for product name, content for product description etc and set placeholders in the underlying template for product pages and populate them with other attributes of my extended site_content class that I can’t map to site_content fields directly (such as the product image) before the page renders.
    2. Map a particular page to a product via a template variable and manage the creation and updating of products through CMP’s. With this option though, the frontend implementation seems more cumbersome.

    So, I’m interested in hearing what you guys think - especially any of you working on VisionCart (in general terms how have you implemented your product details pages?)