Dears,
I've created a python script that exports data from MSSQL and imports into the MySQL database. Everything works smoothly.
Now I want to display the new column data which I've added... but I don't have any PHP skills.
The data is in wc_product_meta_lookup table. The column name is dLieferdatum. The content of dLieferdatum is the estimated date of availability of an item.
I would highly appreciate any idea how to display this on my product :-)
Further note: I already built a function that displays if an item is available or not available. I want to display the data from dLieferdatum instead of "bestellbar" if dLieferdatum is not NULL
function show_stock() {
global $product;
// if manage stock is enabled
if ( $product->stock ) {
// if stock is low
if ( number_format($product->stock,0,'','') > 0 && number_format($product->stock,0,'','') < 7) {
echo '<div class="less-available"><i class="fa fa-truck"></i> auf Lager</div>';
echo '<div class="ind_individual-delivery-time">Zustellung in 1 - 3 Werktagen</div>';
}
// if more than 6 are available
if ( number_format($product->stock,0,'','') > 0 && number_format($product->stock,0,'','') > 6) {
echo '<div class="available"><i class="fa fa-truck"></i> auf Lager</div>';
echo '<div class="ind_individual-delivery-time">Zustellung in 1 - 3 Werktagen</div>';
}
}
if ( $product->managing_stock() && number_format($product->stock,0,'','') < 1) {
echo '<div class="backorder_item"><i class="fa fa-truck"></i> bestellbar</div>';
}
}