• Resolved ilyapokrov

    (@ilyapokrov)


    Can you please tell me how can I solve the problem with prices?

    For example: In the import file, some products have a Regular Price {oldprice[1]} and a Sale price {price[1]}, while others only have a sale price {price[1]}.
    If you write the {oldprice[1]} into the Regular Price, and the {price[1]} into the Sale price, then the price will not be displayed at all in the product cards. I mean those products that do not have the old and the new price, but only one price is indicated.

    This is because woocommerce does not store the sale price unless the old price is specified.

    How can this problem be solved?

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

    (@wpallimport)

    Hi @ilyapokrov,

    If I’m understanding this correctly, you can fix it by putting this in the “Regular Price” field:

    [IF({oldprice[1][.=""]})]{price[1]}[ELSE]{oldprice[1]}[ENDIF]

    And this in the “Sale Price” field:

    [IF({oldprice[1][.=""]})][ELSE]{price[1]}[ENDIF]

    Let me know how it goes.

    Thread Starter ilyapokrov

    (@ilyapokrov)

    @wpallimport,
    I think you understood me correctly! Unfortunately, this code did not work. The price is still not displayed at all.

    Thread Starter ilyapokrov

    (@ilyapokrov)

    @wpallimport,

    This code works as it should!

    For the Regular Price input:
    [IF({oldprice[boolean(.)]})]{oldprice[1]}[ELSE]{price[1]}[ENDIF]

    For the Sales Price input:
    [IF({oldprice[boolean(.)]})]{price[1]}[ENDIF]

    Thank you very much!

    • This reply was modified 3 years, 10 months ago by ilyapokrov.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Regular price / Sale price’ is closed to new replies.