Okay
  Public Ticket #2671214
Importing dynamic prices with WP All Import
Closed

Comments

  •  6
    Jonas started the conversation

    Hi, 


    Can you tell me which metadata to import dynamic rules with WP All Import?

    I need to import rules with fixed price, one product, one mainaccount, one price:

    Rule template: https://gyazo.com/b5cf4aaea214fe9a3c8330a0284cbd0c

    I've tried with: https://gyazo.com/b411f4589da1a96f0514ddf62950f7dd

    I've put a title.
    b2bking_rule_what: fixed_price
    b2bking_rule_applies: Product id: 17626
    b2bking_rule_who: Mainaccount user id: 2982
    b2bking_rule_howmuch: the price that mainaccount should see on product: 666

    It only sets the title, but doesn't fill out the rule:
    https://gyazo.com/3f6fda8fd58cd6342c9b0c713cb4035b

    I also tried with following: 

    https://gyazo.com/f79ee8e85836cf1a74b8d3e28f1f478d

  •  6
    Jonas replied

    Solved by clicking : "Increase speed by disabling do_action calls in wp_insert_post during import."

  •  2,114
    WebWizards replied

    Hi,

    I'm glad to hear you found the solution - I think we have this in the plugin's Docs as well, hopefully that helped.


    Regarding setting the correct meta, I started writing a documentation article to document meta keys:

    https://woocommerce-b2b-plugin.com/docs/import-or-setup-dynamic-rules-programatically/


    It is not complete yet I'm afraid - but it has some information + information on how to get rule configurations by looking at the wp_postmeta table. Hopefully that can be of help.


    Kind Regards,

    Stefan

  •  6
    Jonas replied

    Hi again, 

    It seems like i was a little too fast. I can't really make it work. 
    Can you describe for me, how i import data to dynamic rules with WP All Import? Should it be with "create new rule" or "excisting rule"?

    I have attached a screenshot of my xml file, which is an example of how my file is build. 

    I need a rule with fixed price, single product, price, and quantity, for one single customer. (i have multiple accounts that can see the same product but with different price, therefor i need multiple rules but with the same product.)

    The ItemNO is the SKU in woocommerce. - here i use "get_product_id_by_sku" to recieve the product_id.
    The accountnumber is the username of our mainaccounts, here i use "get parent_id by username"

    When i try to import as "create new rule" the rule gets skipped by the SKU (already excist i suppose).

    Please guide me in a direction as im pretty cunfused right now... :/

  •  6
    Jonas replied

    Is it possible for me to hire you or an expert to set up our automatic import of dynamic rules? I’ve spend a lot of time trying to figure All the imports out, and I would apreciate to be done Soon.

  •  2,114
    WebWizards replied

    Hi Jonas,

    We don't have the capacity to do customization / custom development services I'm afraid - we're struggling with time as it is. If you are looking to hire WordPress experts you can have a look at https://codeable.io - we've heard good things about them.


    While I can give details about how this works with our plugin, I don't have much experience with using WP ALL Import. I had a look over the XML you posted but using WP ALL Import is not something we're very knowledegable about. It may be best to contact the plugin's support team about this - I think they may be able to help.