sorry for disturbing again but the last time you had a perfect solution.
I have a problem with the script again. I have the regular magento price and would like to have a second price that I can export for other websites that use the csv.
I added an attribute field for example called amazon_price which contains a second price, but not all products contain a price. So the script should use the price in the attribute amazon_price if it contains a value and if not use the regular magento price.
I tried this solution but unfortunately its not working right.
$amzprice = $product->getResource()->getAttribute('amazon_preis')->getFrontend()->getValue($product);
$price = $product->getPrice();
if ($amzprice => 1) $price = $amzprice;
$product_data['price'] = number_format($price, 2);
It takes the amazon_preis value for every product that has now value until a product has a value and then it repeats it again until there is a product with a different value.
Would be great if you could help me.
Thanks a lot.