• Resolved Nadek67

    (@nadek67)


    Hello! I have got an xml file with lots of products. Some products have such titles as:
    T-shirt (size S)
    T-shirt (size M)
    T-shirt (size L)
    etc.
    When I drag and drop <model> from the XML code, I see {model[1]} in my Title field. It means, that I will have “T-shirt (size S)” in the title, but I need only “T-shirt”

    How do I import only the title “T-shirt” without text in brackets?
    May be it has something to do with syntax?

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

    (@wpallimport)

    Hi Nadek67.

    You would need to use a PHP function for this:

    [preg_replace("/\s\(.*\)/","",{model[1]})]

    Thread Starter Nadek67

    (@nadek67)

    It works with the titles! Thank you!
    But if I want to make a variable produt from these
    T-shirt (size S)
    T-shirt (size M)
    T-shirt (size L)
    I thought I could also use your code in the field for variations (see screenshot)screenshot And it didn’t work, they are imported as simple products.. Will you kindly help me with this?

    Thread Starter Nadek67

    (@nadek67)

    Found the solution myself) Changed the pricelist in Notepad++: removed the text and the brackets.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Import part of title\description’ is closed to new replies.