• Resolved dmandave

    (@dmandave)


    Hello there- I was wondering if you could potentially help me to integrate the Posts 2 Posts plugin with Supra CSV Pro. I’ve already made two custom post types: Products and Parts

    What I’d like to do is set up a connection between each of the Products I’m importing and the corresponding Parts that go with each of them.

    Looking at the code for the Posts 2 Posts plugin, it appears that this is the way to programatically make the connection:

    // Create connection
    p2p_type( 'YOUR_CONNECTION_TYPE' )->connect( $from_id, $to_id, array(
    	'date' => current_time('mysql')
    ) );

    (From here: https://github.com/scribu/wp-posts-to-posts/wiki/Creating-connections-programmatically)

    The trouble is that I don’t actually know the $from_id and $to_id and would have to manually create each of the pages first in order to do so…

    Any help on this would be greatly appreciated, as I’d love to not have to connect each of the thousands of products by hand!

    Thanks so much,
    Dave

    http://wordpress.org/plugins/supra-csv-parser/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Joseph Persie

    (@zmijevik)

    this would entail a major revision of the functionality of the plugin. It is possible but it is likely that I will not be able to address this issue immediately. I will let you know when I have implemented a solution for this.

    Plugin Author Joseph Persie

    (@zmijevik)

    This is possible with a patch. Consider it essentially a plugin inside of a plugin. Let me know if you are still interested and I would be willing to implement this for a small fee/donation .

    Plugin Author Joseph Persie

    (@zmijevik)

    In version 3.1.2 hooking implementation has been integrated into the workflow of the ingestion. A hook has been created for retrieving the last_post_id of the previous ingestion of every subsequent row. This gives you a from id. Contact me if you need me to write a hook.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Post Type Connections through CSV’ is closed to new replies.