I need to update the Price for all configurable products in the database but I am not sure what table or column to use within my query.
I am almost there as I can enter the lowest priced simple product Price for all configurable products in a new table I created but what I need is to update the current price of the configurable products.
require_once('app/Mage.php');
umask(0);
Mage::app();
include 'pathtocredentials.php';
$con = mysqli_connect ($host, $username, $password, $dbname);
$configurable = Mage::getResourceModel('catalog/product_collection')->addAttributeToFilter('type_id', array('eq' => 'configurable'));
foreach ($configurable as $_configurableproduct) {
$product = Mage::getModel('catalog/product')->load($_configurableproduct->getId());
$id = $product->getId();
$price = $product->getFinalprice();
mysqli_query($con,"UPDATE some_table SET some_column=$price WHERE id=$id";
}
mysqli_close($con);