This function allows you to adjust your prices based on an element in your import. In this example, we pass the category to the function and mark-up prices based on that:
function my_adjust_price( $price, $element = '' ) {
$adjust_map = array(
'Monitor LED' => 1.20,
'PC Notebook Consumer' => 1.25,
'TV LED' => 1.30
);
return ( array_key_exists( $element, $adjust_map ) ) ? ( number_format( $price * $adjust_map[ $element ], 2 ) ) : $price;
}
Usage example:
[my_adjust_price({price[1]},{category[1]})]
Thanks for the guide but when I do as written it doesn't work I forget something for sure ..
For example the "{column_4 [1]}" which for example in my case corresponds to the column of the price xml file where should I insert it?