We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27210
    • 158 Posts
    I just finished my first MODx site (www.midatlanticdocks.com).

    I don’t know PHP yet.

    We have 16 area dealers that may link to this site.

    We have prices on items, for example (http://www.midatlanticdocks.com/accessories-all.html)

    I would like to find a way to either:
    - optionally show the prices based on a flag passed in by the linking site
    - show prices based on an external file supplied by the linking site - i know the @file option exists but i don’t know how to implement it or if would be the proper mechanism

    Can you point me in the general direction of how to do this?

    Thanks,
    Steve
      • 3749
      • 24,544 Posts
      I don’t think @FILE will help you because it will only pull the contents of a file from the local server.

      One way to do what you want is to have the remote sites submit a form with data (probably a couple of yes/no variables and sometimes a comma-separated list of product ids and prices) in the $_POST variable (it wouldn’t have to be obvious on the remote site that a form was involved -- just a few radio buttons and a submit button).

      On your site, you’d have a simple snippet that checked the $_POST data and created the appropriate output. The PHP part of it would be fairly simple.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 27210
        • 158 Posts
        Thank you BobRay!

        If i had the price lists for each dealer on my server in a file, could i use the @file?

        Steve
          • 3749
          • 24,544 Posts
          Quote from: signcarver at Feb 20, 2010, 06:57 AM

          Thank you BobRay!

          If i had the price lists for each dealer on my server in a file, could i use the @file?

          Steve

          Yes, although it might be easier to put each price list in a chunk and use @CHUNK. You could use permissions so your dealers could edit only their own price-list chunks in the Manager.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 27210
            • 158 Posts
            Thanks again, BobRay!