Ups, sorry. it doesn't display either.
Ups, sorry. it doesn't display either.
“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison
I actually got it by adjusting the default_filter.php and the product listing.php from a previous posting.
The only thing now is if there is nothing in the database how do i hide the span from displaying.
This is my code
<span><strong>UPC:</strong> '. $listing->fields['upc'] . '' . '</span><br />
Something like
if ($listing->fields['upc']!='') {
echo '<span><strong>UPC:</strong> '. $listing->fields['upc'] . '' . '</span><br />';
}
“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison
hmm that does not seem to work on the product listing page. Any other ideas
well, one example from that file is
If you can see the field with the right values no matter what, the only thing you need is a IF condition.PHP Code:if ($listing->fields['products_qty_box_status'] == 0) {
$lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>';
} else {
$lc_button = TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART . "<input type=\"text\" name=\"products_id[" . $listing->fields['products_id'] . "]\" value=\"0\" size=\"4\" />";
}
Anyway, just pointing some direction...
“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison
this is my current code whwere i am trying to put it
<div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listi ng->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '<br /><br />' . '<strong>Model: </strong>' . $listing->fields['products_model'] . '' . '</span><br />
<span><strong>UPC:</strong> '. $listing->fields['upc'] . '' . '</span><br />
<span><strong>Manufacturer:</strong> '. $listing->fields['manufacturers_name'] . '' . '</span><br />
<span> <span style="color:#1a3c8a;"><strong>In Stock</strong></span></span><br />
<span class="freesh"><span style="color:#209b50;"><strong>Free Shipping</strong></span> on orders over $250</span><br /><br />
' . '</div>';
where the <span><strong>UPC:</strong> '. $listing->fields['upc'] . '' . '</span><br /> it wont let me put the if statement it says there is an error
So something like that ?
I don't know where that echo starts in your code. But see if you understand it:
Hope it helpsPHP Code:echo '<div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '<br /><br />' . '<strong>Model: </strong>' . $listing->fields['products_model'] . '' . '</span><br /> '; // [B]YOU CLOSE [/B]
if ($listing->fields['upc']!='') {
echo '<span><strong>UPC:</strong> '. $listing->fields['upc'] . '' . '</span><br />';
}
// [B]YOU ECHO AGAIN[/B]
echo '<span><strong>Manufacturer:</strong> '. $listing->fields['manufacturers_name'] . '' . '</span><br />
<span> <span style="color:#1a3c8a;"><strong>In Stock</strong></span></span><br />
<span class="freesh"><span style="color:#209b50;"><strong>Free Shipping</strong></span> on orders over $250</span><br /><br />
' . '</div>';
“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison