Hi
Great contribution so far but i stumbled upon an error :(
in checkout_process.php i get: Parse error: syntax error, unexpected '[', expecting ')' in /.../..../public_html/dev/checkout_process.php on line 237
Line 222 until 246 - line 237 is bold
$products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";
// start Get 1 free
// If this product qualifies for free product(s) add the free products
// if (is_array ($free_product = $this->get1free ($products_id))) {
if (is_array ($free_product = $cart->get1free ($products_id))) {
// Update products_ordered (for bestsellers list)
// Comment out the next line if you don't want free products in the bestseller list
tep_db_query("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%d', $free_product['quantity']) . " where products_id = '" . tep_get_prid($free_product['id']) . "'");
$sql_data_array = array('orders_id' => $insert_id,
'products_id' => $free_product['id'],
'products_model' => $free_product['model'],
[b]'products_name' => free_product['name'],[/b]
'products_price' => 0,
'final_price' => 0,
'products_tax' => '',
'products_quantity' => $free_product['quantity']
);
tep_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array);
$total_weight += ($free_product['quantity'] * $free_product['weight']);
}
// end Get 1 free
}
does anyone know a fix for this?