• I have used PODS to create a hierarchical set of tables to capture information relating to multiple parent organizations and their respective child stores and other related tables. I plan to add custom meta-data to the WP Store Locator ‘Stores’ table in order to capture additional information about each Store.

    I need to know whether it is advisable to link the WPSL ‘Stores’ using foreign-key values established in the PODS tables. These foreign keys would link back to the parent WPSL ‘Stores’ post_ID values.

    Any feedback would be appreciated.

    Thanks.

Viewing 1 replies (of 1 total)
  • Hi there,

    Unfortunately I don’t have any experience with PODS, so I really couldn’t tell if your solution is viable or not.

    As you have probably noticed, wp store locator uses the default WordPress practice of custom post types for the stores in the database, so all the stores are actually rows in the “wpsl_posts” table with the value “wpsl_stores” in the “post_type” column.

    Since all posts in wp_posts have their primary key “ID” field, and even without knowing the internals of the PODS framework, I can assume it is safe to use this ID as the foreign key in another table where you will save additional information for the stores.

    Then, you are responsible for retrieving this additional data fields, and bear in mind that you are doing things differently from the default mechanism that wp store locator uses for additional metadata, which is described in the documentation and it is also the standard WordPress way (it uses the wp_postmeta table for this purpose).

    I am not sure I cleared your doubts, but those were my two cents 😉

    Regards,

    • This reply was modified 1 year, 6 months ago by farroyo.
Viewing 1 replies (of 1 total)
  • The topic ‘PODS relationships to WPSL Stores table’ is closed to new replies.