Forum Replies Created

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • in reply to: import post_date and post_modified #46628
    Dima
    Participant

    Ok I found the problem:
    You got a typo in the function woo_pd_is_valid_post_date,
    line #841 ‘if( !empty( $post_data ) ) {‘ , should be $post_date

    Another concern is the format you expect the date to be. As you know different places use different date format styles, you might consider adding it as an option into settings. As there is an option in WP settings->general “Date Format”.

    Now as for post_modified field: it still puts current date there and not the import. It might be due to the fact that the product actually is being updated(modified), anyhow if its not imported from csv there is no reason to use it at all.

    in reply to: Custom fields import manipulation #46495
    Dima
    Participant

    Ok so I got into this a bit:
    1) woo_pd_prepare_product does not exist.
    So I looked into “woo_pd_merge_product_addons” which needs to be followed by “woo_pd_merge_product_log_addons”. You also make comparison if new value is different from old.
    So we need to load existing product values fist using “woo_pd_merge_product_data_addons”.
    I think you might want to add these to that snippet/tutorial on how to add custom fields to the import. Coz I didn’t know that there are different hooks for merging.

    BTW I made a simple solution so that I’ll not need to write the custom fields array on each hook function. So I made a simple function that I can call and it gives me the fields. I only need to add/edit them in one place.

    function alo_import_product_fields( $fields ) {
    $woo_ped_addon_fields = array();
    $woo_ped_addon_fields[] = array(
    ‘name’ => ‘newprod_date’,
    ‘label’ => ‘New Product Date’,
    ‘acf’ => true,
    ‘group_open’ => ‘<optgroup label=”Extra Fields”>’
    );
    $woo_ped_addon_fields[] = array(
    ‘name’ => ‘prod_type_abnab’,
    ‘label’ => ‘Product Type ab/nab’,
    ‘acf’ => true,
    );
    $woo_ped_addon_fields[] = array(
    ‘name’ => ‘wc_productdata_options’,
    ‘label’ => ‘AB/NAB Fields’
    );

    $fields = array_merge($fields, $woo_ped_addon_fields);

    return $fields;
    }

    Maybe you can use it.

    in reply to: Little bug with Scheduled Exports #46445
    Dima
    Participant

    One more for you: I now cannot edit my previous reply, which is after you replied. So it does seem intentional not to edit the “already read” replies. But new posts before being replied I think should have edit option.

    in reply to: Little bug with Scheduled Exports #46443
    Dima
    Participant

    Re the forums: I am not finding any button to edit my posts)) Maybe you should login as regular user and check it out.
    –> Strangest thing: I can edit this reply, but nothing else. ??
    –> Ha! The “edit” button appears only for replies that are made after your reply on the topic. This is amusing lol

    “one time” – from what I have seen its nothing complicated there. Its just seem to not grab this option “one time”, so when you open the Scheduled Export template another time to do some changes, no option of “Frequency” is chosen. I think you missed this get_option or something. So since nothing chosen it reverts to its default which is “daily” when saved.

    in reply to: Product name dependency on import #46442
    Dima
    Participant

    Sent you the file via support.

    in reply to: Little bug with Scheduled Exports #46434
    Dima
    Participant

    Tested again, it actually happens only with “One Time”.
    It seem like there is no option to edit/update my previous post here. Is it intentional?

    in reply to: Import Categories how? #46408
    Dima
    Participant

    Oh happy to know that you have it released alredy!
    Few Questions:
    1) Will it install as separate plugin alongside PID?
    2) Will the plugin I made for PID work with this?
    3) Is this basically the same as PID but with more features or is it completely different?

    in reply to: Multi Currency Suite import #46190
    Dima
    Participant

    Hey no pressure, this solution gets me by just fine until then))
    Here is a thought: I figure since the import runs each ajax request, then its something that runs all the time and can have that currency info for ajax to pull off of it. Another approach, do you use frontpage ajax or admin ajax? Coz admin ajax might just pull the right currency and no need for any hassle at all. As for CRON – it probably runs as frontend as SED does, so there as you said it could be applied globally. I did not go in that deep into your plugin to know if its right, just thinking out loud 😉

    in reply to: Multi Currency Suite import #46110
    Dima
    Participant

    Ok so I debugged this myself. I think you can definitely use this info.
    WooCommerce Ultimate Multi Currency Suite(WUMCS) using geolocation in frontend (in our setup, which is one of the options of WUMCS). This is not applied in backend. In backend there is single base currency which is set in WC. Now somehow PID runs as frontend (I think) since “get_woocommerce_currency()” in “product-new.php” line 2097 and on, gets currency by geolocation. WCMCS uses this: “add_filter(‘woocommerce_currency’, array($this, ‘custom_currency’), 9999);”. Now the best solution would be to remove this filter while importing, but since it has “$this” its trickier and has overhead.
    So here is my solution which works:

    add_filter( 'woo_pd_create_product_defaults', 'set_right_base_currency', 10, 2 );
    function set_right_base_currency($defaults, $prod_id){
        add_filter('woocommerce_currency', 'back_my_currency', 99999);
        return $defaults;
    }
    function back_my_currency(){
        $currency = get_option('woocommerce_currency');
        return $currency;
    }

    There is only one small problem with this that you can help with:
    I used “woo_pd_create_product_defaults” hook, but it runs many times during import. Which hook would be better to use to set this up once in beginning of import?

    Thanks

    in reply to: Importing altered product type #46011
    Dima
    Participant

    I prefer to wait for the actual release, unless its gonna be a while. When is it due? Also when the new version of SED is coming out?

    in reply to: Importing altered product type #46009
    Dima
    Participant

    Hello Michael and thanks a lot for the answer. I checked and did not find “woo_pd_is_valid_product_type” filter in your code. There is a function “woo_pd_is_valid_product_type” in include/product.php but no filter. Unless You added that filter manually into that function for the Italian guy. I hoped avoiding altering your code as much as possible..

    in reply to: Missing filter product_orderby in sceduled export #45990
    Dima
    Participant

    You’re the best! 🙂

    in reply to: Little buggy maybe in product.php #45978
    Dima
    Participant

    Wow this is a great surprise: * Added: Export support for WooCommerce Ultimate Multi Currency Suite (thanks Manoj), I actually have that pending))
    I see you added my BOM issue, the name is Dima, Ziv is my boss ;).
    Thanks for the credit.

Viewing 13 posts - 1 through 13 (of 13 total)