• Resolved davidcoimbra

    (@davidcoimbra)


    Hello,

    I am really enjoying using your plugin. Currently, I am trying to import data using All Import or the default import system from WooCommerce. I was wondering if you could guide me on how to target the inputs for pricing by cm and other units. Is there any documentation available to help me use the price calculator for imports?

    Thank you, David Coimbra

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support przemyslawrosa

    (@przemyslawrosa)

    Hi David, thanks for using and enjoying the plugin!

    Currently, unfortunately, there is no possibility to import products with Flexible Quantity values, but this functionality is on our roadmap. I will let you know when it is implemented.

    argate7

    (@argate7)

    Could you tell me if there is a way to get some info such as the selected measurement unit by coding? Is there any global variable with the appropriate function to get such info?

    Plugin Support Tomasz WP Desk

    (@tomaszwp)

    Hello @argate7

    Save the FQ settings in the product edit panel.
    Then go to the product meta key called flexible_quantity_settings which stores information about all settings – including measurement units.
    Then deserialize this array and get the needed data.

    argate7

    (@argate7)

    I get the info from wp_postmeta but I was looking for a function to deserialize the meta_value column data.

    Plugin Support Tomasz WP Desk

    (@tomaszwp)

    Hello @argate7

    This could help.

    $product = wc_get_product( $product_id );
    $fq_settings = $product->get_meta('flexible_quantity_settings', true);
    if( is_array( $fq_settings ) && isset( $fq_settings['fq']['unit'] ) ){
    	$unit = $fq_settings['fq']['unit']; //unit from product settings
    	var_dump( $unit ); //show
    	if( class_exists('WDFQVendorFree\WPDesk\Library\FlexibleQuantityCore\WooCommerce\Units') && !empty($unit) ){
    		$all_units = WDFQVendorFree\WPDesk\Library\FlexibleQuantityCore\WooCommerce\Units::get_all_units(); //get all units settings
    		var_dump( $all_units[$unit]); //more info about unit
    	}
    }

    If you want to use the class WDFQVendorFree\WPDesk\Library\FlexibleQuantityCore\WooCommerce\Units
    then please make sure that the code executes when the plugin is loaded.

    Plugin Support Tomasz WP Desk

    (@tomaszwp)

    I am marking this topic as resolved as we have not received any new replies. Please let us know if you need our help again.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Import Products’ is closed to new replies.