I have a auction website which is all working ok except one thing product attribute and its all down to if else command
This page has two commands normal quantity and product attribute quantity
this is the code
Code: Select all
$attributes = attributes_display_to_raw($_POST['product_attributes']);
$quantity_unlimited = false;
if ($item_details['enable_product_attributes']) {
$quantity_output = getQuantity($item_details['auction_id'], $attributes);
$item_details['quantity'] = $quantity_output;
}
else {
$quantity_output = $item_details['quantity'];
}
$template->set('quantity_output', $quantity_output);
the product attribute work ok if there is a product attribute but if there is no attribute the listing is show 0 even if the data base has 10
if i remove
Code: Select all
$attributes = attributes_display_to_raw($_POST['product_attributes']);
$quantity_unlimited = false;
if ($item_details['enable_product_attributes']) {
$quantity_output = getQuantity($item_details['auction_id'], $attributes);
$item_details['quantity'] = $quantity_output;
too me it looks like a if else problem but im not experienced enough to say
please help i have been on this for over a week
thank you