• Resolved u3r

    (@u3r)


    Hi. How can I map attribute a different name?

    For example, I have
    <tireType>Winter<tireType>

    I want to change “Winter” to “Winter Tire”, but at the same <tireType> line, it can be “Summer”, or “All-Season” and so on.

    How would I go about changing
    Winter > Winter Tire
    Summer > Summer Tire
    All Season > All Season Tire

    I have this code here, but I’m not sure how to point it correctly to <tireType> value.

    [str_replace(array(“Winter”,”Summer”,”All Season”),array(“Winter Tire”,”Summer Tire”,”All Season Tire”),{tireType/value[1]})]

    Any help is appreciated. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @u3r,

    I have this code here, but I’m not sure how to point it correctly to <tireType> value.

    The code looks correct, so can you show me an example of 1 record from your import file? You can use dummy data if you don’t want it to be public, we really just need to see the XML format to advise on how to point to the tire type value.

    Thread Starter u3r

    (@u3r)

    Sure, this is how my XML looks: https://prntscr.com/uayuq3

    And the line I’d need to map is let’s say <kodas_ls3>, (although in the end, I’ll be mapping most of them.)

    Thank you!

    Thread Starter u3r

    (@u3r)

    Solved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Mapping attributes?’ is closed to new replies.