I'm hoping somebody can help me. I'm trying to use this contrib with the "Ezier New Fields" contrib to show the retail price and customer savings. The only problem is that I can't get the Ezier contrib to work in column mode (they work fine together in row mode).
A check of the Ezier support thread didn't show anyone using the two contribs together, so I thought I'd start here for some help.
Here is the relevent section of product_listing.php (the column section):
} elseif (PRODUCT_LISTING_DISPLAY_STYLE == 'columns') {
$info_box_contents = array();
if ($listing_split->number_of_rows > 0) {
$row = 0;
$col = 0;
$listing_query = tep_db_query($listing_split->sql_query);
while ($listing = tep_db_fetch_array($listing_query)) {
$listing['products_name'] = tep_get_products_name($listing['products_id']);
if (PRODUCT_LIST_IMAGE > 0) {
$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br>';
}
if (PRODUCT_LIST_NAME > 0) {
$lc_text .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a><br>';
}
if (PRODUCT_LIST_MODEL > 0) {
$lc_text .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id']) . '">' . $listing['products_model'] . '</a><br>';
}
if (PRODUCT_LIST_MANUFACTURER > 0) {
$lc_text .= '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a><br>';
}
// if (PRODUCT_LIST_RETAIL_PRICE > 0) {
// if ((tep_not_null($listing['products_retail_price'])) && ($listing['products_retail_price']) > 0) {
// $lc_text = '<font color="#55508a">' . $currencies->display_price($listing['products_retail_price'], tep_get_tax_rate($listing['products_tax_class_id']));
// } else {
// $lc_text = ' ';
// }
// }
if (PRODUCT_LIST_PRICE > 0) {
if (tep_not_null($listing['specials_new_products_price'])) {
$lc_text .= '<s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>';
} else {
$lc_text .= ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';
}
}
// if (PRODUCT_LIST_SAVE > 0) {
// if ((tep_not_null($listing['products_retail_price'])) && ($listing['products_retail_price']) > 0) {
// $lc_save = round(100 - (( $listing['products_price'] / $listing['products_retail_price'] ) * 100 ));
// $lc_text = '<font color="red"> ' . $lc_save . '% </font>';
// } else {
// $lc_text = ' ';
// }
// }
if (PRODUCT_LIST_BUY_NOW) {
$lc_text .= '<br><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id'], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $listing['products_name'] . TEXT_NOW) . '</a>';
}
I have the contrib set up for three columns and I'm expecting to see the following in each column:
Image
Name
Retail Price
List Price
Savings
Buy Now
However, when I uncomment the PRODUCT_LIST_RETAIL_PRICE and PRODUCT_LIST_SAVE sections above all I get is the savings percent number (everything else disappears). I haven't as of yet figured out what the problem is.
Can anyone help?