Forums

Post Relations Meta Data (6 posts)

  1. markzero
    Member
    Posted 1 year ago #

    Hi all,

    Can somebody offer me one solution to a problem which maybe is not a wordpress nature but I have to do it in wp?

    So I have products custom post types, and stores.
    Every product may be in several stores (like amazon, buy.com), but having different price in each of them. Something like this table.

    Also, found a plugin "posts-to-posts" which relate post types many-to-many. It's great because I can select stores when creating a product post, but I would need broader data.
    Every store has infos for products like, price, amount, buy url...
    So, I guess I need description (meta) of that relationship.

    If more info is required just say.
    How to implement things like this in wp (if can be) ??

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    custom fields?

    key = store
    value = price

  3. markzero
    Member
    Posted 1 year ago #

    It is not just the price, but more stuff like, quantity, shipping , url, etc etc
    So, if custom fields, then would have for one store n fields. Product is in several stores, so (number of fields) = (number of stores) x (n)
    Too much I guess, and hassle for end-user management..

  4. markzero
    Member
    Posted 1 year ago #

    Something like,

    product1 - price1,qunatity1,url1,shipping1 - store1
    product1 - price2,qunatity2,url2,shipping2 - store2
    product2 - price3,qunatity3,url3,shipping3 - store1
    product2 - price4,qunatity4,url4,shipping4 - store2
    ...

  5. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    yeah, for an end user it would be hard. I do think custom fields would provide the functionality you need....but the data entry would be a pain

    I do recall some tutorials aroung the google, for designing a menu system that runs on the edit post screen which allows for a clean, menu driven interface. But still uses the data as custom fields.... that may be useful if you can find it....

  6. markzero
    Member
    Posted 1 year ago #

    I guess will have to make custom table in database for this, maybe extending posts-to-posts plugin, or read using $wpdb completely customized

Topic Closed

This topic has been closed to new replies.

About this Topic