• mitsi380

    (@mitsi380)


    I need to manipulate dimensions for manufacturing reports, eg; width – 40 i have tried your examples with no luck. Would you be able to help me with an example of the above?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author algol.plus

    (@algolplus)

    hi

    please, use this code in “MIsc Settings”
    add_filter('woe_get_order_product_value_width', function ($value, $order, $item, $product,$item_meta) {
    return (float)$value - 40;
    }, 10, 5);

    more details https://docs.algolplus.com/algol_order_export/hooks-filters/

    Thread Starter mitsi380

    (@mitsi380)

    Hi thank you for the quick response. It working better that it did, however i would like slat_width to equal the: width – 40

    add_filter('woe_get_order_product_value_slat_width', function ($value, $order, $item, $product,$item_meta) {
    return (float)$value - 40;
    }, 10, 5);
    Plugin Author algol.plus

    (@algolplus)

    Please, try

    return (float)$product->get_width() – 40;

    Thread Starter mitsi380

    (@mitsi380)

    Thank you, although i get an error.

    The code you are trying to save produced a fatal error on line 2:syntax error, unexpected ‘–’ (T_STRING), expecting ‘;’

    add_filter(‘woe_get_order_product_value_slat_width’, function ($value, $order, $item, $product,$item_meta) {
    return (float)$product->get_width() – 40;
    }, 10, 5);

    Plugin Author algol.plus

    (@algolplus)

    forum replaced - with –
    Use

    return (float)$product->get_width() - 40;

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Basic Calculations from custom fields’ is closed to new replies.