RE: Greyed out "in cart" button if out of stock
valley <[email protected]>
| Newsgroups | gmane.comp.web.oscommerce.tips |
|---|---|
| Message-ID | <b3a9a2f6424508854d99db8a795ec01f@osCommerce-Forums> |
This message was sent from: Tips and Tricks
http://forums.oscommerce.com/viewtopic.php?p=183679#183679
----------------------------------------------------------------
Hello Mark
after adding the above code in product_listing.php
I get this error message
Parse error: parse error in /home/affili43/affili43-www/catalog/includes/modules/product_listing.php on line 178
wich is [code]} else {[/code]
in the code
[code] /* case 'PRODUCT_LIST_BUY_NOW':
$lc_align = 'center';
$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $listing['products_name'] . TEXT_NOW) . '</a> ';
break;
} */
case 'PRODUCT_LIST_BUY_NOW':
$lc_align = 'center';
if (tep_get_products_stock($listing_values['products_id'])> 0)
{
$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing_values['products_id'], 'NONSSL') . '">' . tep_image_submit('button_in_cart_small.gif',
TEXT_BUY . $listing_values['products_name'] . TEXT_NOW) . '</a> ';
}
else
{
$lc_text = tep_image_button('button_in_cart_small_faded.gif').' ';
}
break;
$list_box_contents[$cur_row][] = array('align' => $lc_align,
'params' => 'class="productListing-data"',
'text' => $lc_text);
}
}
new tableBox($list_box_contents, true);
echo ' </td>' . "\n" .
' </tr>' . "\n";
} else {[/code]
I still get theCART EMPTY Error after modifying the codes in
i the product_info.php and product_listing .php