• Resolved cliqueradar

    (@cliqueradar)


    Hi,

    First up… this is a great plugin. Thanks.

    I do have a little issue, tho.

    Within an export, I want to export the name of the shipping method chosen by the customer, however, in the shipping method column, it instead shows the ‘flat rate version number’.

    For instance… [“flat_rate:11”] or [“flat_rate:3”], etc.

    Is their a way to get the display name of the shipping method, instead of the internal flat rate version?

    Thanks. ??

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

    (@algolplus)

    hi

    please, use field “Shipping method title” (>Setup fields>Cart).

    + all fields “USER_xxx” are empty for guests .
    thanks, Alex

    Thread Starter cliqueradar

    (@cliqueradar)

    Thanks for the quick reply, Alex.

    However, since posting my question, I’ve now come to understand that what it needs is actually the service code for the chosen delivery method.

    So, I think I need to be a bit more clever about this.

    Delivery method title may be ‘Royal Mail 24hr’ but the service code needed for the export into Royal Mail’s software would be ‘TPN24’ so, I need to figure out how to get that into the data, so the plugin can export it.

    Appreciate the tip for the shipping method titles, tho.

    Del.

    Plugin Author algol.plus

    (@algolplus)

    hi Del

    so you should just rename exported text ?

    please, visit page https://algolplus.com/plugins/code-samples/ and try code “remap shipping method titles”

    thanks, Alex

    Thread Starter cliqueradar

    (@cliqueradar)

    Ah, I see.

    So, the following would populate the shipping method column with entries… ’32’ and ‘TPN24’ in the example below?

    // remap shipping method titles
    add_filter('woe_get_order_value_shipping_method_title', function ($value, $order, $fieldname) {
    	if($value == 'Flat rate') // copy these 2 lines for other mappings
    		$value = 'DPD Next Day'; 
    	return $value = '32';
    		$value = 'Royal Mail 24 (Tracked. Deliveries Mon - Sat)'; 
    	return $value = 'TPN24;
    }, 10, 3);

    Thanks,

    Del.

    Plugin Author algol.plus

    (@algolplus)

    adjusted code

    // remap shipping method titles
    add_filter('woe_get_order_value_shipping_method_title', function ($value, $order, $fieldname) {
    	if($value == 'DPD Next Day') // copy these 2 lines for other mappings
    		$value = '32'; 
    	if($value == 'Royal Mail 24 (Tracked. Deliveries Mon - Sat)') // copy these 2 lines for other mappings
    		$value = 'TPN24'; 
    	return $value;
    }, 10, 3);
    Thread Starter cliqueradar

    (@cliqueradar)

    Aha… great. I’ll give that a try and let you know if it works.

    Thanks Alex.

    Del.

    Thread Starter cliqueradar

    (@cliqueradar)

    Initial test seems to have worked.

    Will see what happens tomorrow when we’ll have orders with multiple different delivery options, and see if it correctly puts the service codes in for the method title.

    Looks good so far though.

    Thank you Alex!

    Del.

    Plugin Author algol.plus

    (@algolplus)

    you’re welcome

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘USER_shipping_method’ is closed to new replies.