• Resolved SumoTTo

    (@sumotto)


    Hello, I am developing a website for a client that uses your plugin. And I noticed a couple of things that would be great to fix.

    1) Deprecation message, you can reproduce it by installing WP_DEBUG in TRUE.

    2021-03-22_21-41-23
    wp-content/plugins/precious-metals-automated-product-pricing-pro/WooCommerce_Plugin_Nfusion.php:330

    Now:
    add_options_page('nFusion Settings', 'nFusion Settings', 8, 'nfusion_global_setting', 't_nfusion_solutions_options');

    Correction:
    add_options_page('nFusion Settings', 'nFusion Settings', 'manage_options', 'nfusion_global_setting', 't_nfusion_solutions_options');

    2) An uninitialized variable, to see this message, you may need to enable the display of PHP errors.

    2021-03-22_21-31-37
    wp-content/plugins/precious-metals-automated-product-pricing-pro/WooCommerce_Plugin_Nfusion.php:266

    Correction:
    You need to declare a variable $row = '';

    3) I’m not sure if this is a mistake, but rather a question. Which URL should the data be requested from.
    On my local server, the data from “pricesbychannel” they don’t come. I found in the old version of the plugin that it uses “all”.
    I changed it “pricesbychannel” on “all” in the current version of the plugin, the data began to arrive correctly.
    What is the correct URL? Should I have to work with “pricesbychannel”?

    wp-content/plugins/precious-metals-automated-product-pricing-pro/WooCommerce_Plugin_Nfusion.php:57

    Now:
    $catalogUrl = 'https://'.$tenantAlias.'.nfusioncatalog.com/service/price/pricesbychannel?currency='.$cur_currency.'&channel='.$salesChannel.'&withretailtiers=true&token='.$token;

    Correction:
    $catalogUrl = 'https://'.$tenantAlias.'.nfusioncatalog.com/service/price/all?currency='.$cur_currency.'&channel='.$salesChannel.'&withretailtiers=true&token='.$token;

    • This topic was modified 3 years, 11 months ago by SumoTTo.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter SumoTTo

    (@sumotto)

    And another PHP warning about a non-existent array key:
    wp-content/plugins/precious-metals-automated-product-pricing-pro/WooCommerce_Plugin_Nfusion.php:339

    Now:
    if ( $_REQUEST['saved'] ) { echo '<div id="message" class="updated fade"><p><strong>settings saved.</strong></p></div>'; }

    Correction:
    if ( isset( $_REQUEST['saved'] ) ) { echo '<div id="message" class="updated fade"><p><strong>settings saved.</strong></p></div>'; }

    It would be great if you could fix these little things or if you have github, I could do a pull request.

    Plugin Author nfusionsolutions

    (@nfusionsolutions)

    Thank you for bringing these issues to our attention, and for the proposed fixes. Let me respond to your questions in order:

    1) This was resolved in version 2.9.5
    2) This has been fixed in version 2.9.6 per your suggestion
    3) This plugin behavior changed starting in version 2.8.5. That functionality change was to request products from the catalog API by sales channel instead of all. This should be considered the correct way going forward. You will need to ensure several things are configured correctly for the integration to update prices in WordPress / WooCommerce. 1) In your nFusion Catalog make sure that you have configured a Sales Channel and that you have added all the products you want to synchronize to that Sales Channel. 2) In the WordPress admin make sure that in the nFusion plugin settings you have set the “Sales Channel” field to the alias of the Sales Channel you configured in the nFusion Catalog in the previous step. 3) Make sure that for each product you want to synchronize that the field in WordPress / Woocommerce on the product edit page “nfusion sku” is set to the exact same value as the product in the nFusion Catalog that you want to match.
    4) This has been fixed in version 2.9.6 per your suggestion

    Thread Starter SumoTTo

    (@sumotto)

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘The plugin generates PHP warnings + a question on URL’ is closed to new replies.