Forums / Templates, Stylesheets, Page Layout / Product listings without picture all in-line

Product listings without picture all in-line

Locked

Views: 1,653

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
19 Nov 2006, 10:13 PM
#1
splieg avatar

splieg

New Zenner

Join Date:
Jul 2005
Location:
Newfoundland, Canada
Posts:
59
Plugin Contributions:
0

Product listings without picture all in-line

I'd like to change my product listings page so that the Item Name, Price and Add Quantity option are all on the same line and instead of a picture it has an icon of a camera. I know how to turn off the image but I can't seem to get the add option and the price on the same line. Also, I'd like to add the camera icon . I'm trying to fit as many product on one page and reduce scrolling. I believe I've seen an example of this layout here somewhere but I can't seen to find it now. Any suggestion or help would be appreciated.

6 Dec 2006, 2:11 PM
#2
splieg avatar

splieg

New Zenner

Join Date:
Jul 2005
Location:
Newfoundland, Canada
Posts:
59
Plugin Contributions:
0

Re: Product listings without picture all in-line

Anyone want to help me tackle this?

splieg:

I'd like to change my product listings page so that the Item Name, Price and Add Quantity option are all on the same line and instead of a picture it has an icon of a camera. I know how to turn off the image but I can't seem to get the add option and the price on the same line. Also, I'd like to add the camera icon . I'm trying to fit as many product on one page and reduce scrolling. I believe I've seen an example of this layout here somewhere but I can't seen to find it now. Any suggestion or help would be appreciated.

9 Jan 2007, 1:01 AM
#3
primvs avatar

primvs

New Zenner

Join Date:
Jan 2007
Posts:
7
Plugin Contributions:
0

Re: Product listings without picture all in-line

i am trying to separate the price and quantity box too, and put them next to each other rather than stacked. can anybody point me in the right direction? thanks.

9 Jan 2007, 3:27 AM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Product listings without picture all in-line

The price, quantity box, buy now button and related items are all set up in /includes/modules/your_template/product_listing.php, around lines 107-150.

Lines starting with $lc_button and $lc_text are where various different possible displays are formatted; find and remove <br /> tags in those lines to make elements display on one line. Work carefully and test frequently!

9 Jan 2007, 8:20 PM
#5
primvs avatar

primvs

New Zenner

Join Date:
Jan 2007
Posts:
7
Plugin Contributions:
0

Re: Product listings without picture all in-line

outstanding. thanks so much, glenn.

19 May 2007, 6:17 PM
#6
itchibahn avatar

itchibahn

New Zenner

Join Date:
May 2007
Posts:
6
Plugin Contributions:
0

Re: Product listings without picture all in-line

I am too trying get each items on same line: Item# Description Price Qty

After playing with $lc_align and $lc_text, I was able to get the Price and Qty on same line, but can't seem to get Item# and Description on same line. Also, changing $lc_align doesn't seem to make any difference in formatting. Did you get yours working?

19 May 2007, 8:44 PM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Product listings without picture all in-line

$lc_align only affects whether the element is left- or right-justified in its given box.
The description has a <div> tag, which by default is a block element that starts on a new line.```php
case 'PRODUCT_LIST_NAME':
$lc_align = '';
if (isset($_GET['manufacturers_id'])) {
$lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ;
} else {
$lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 0 ? 'cPath=' . $_GET['cPath'] . '&' : '') . 'products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
}
break;

You can either change that to a <span> in two places here, or give .productDescription a property of display: inline; in the stylesheet (but not both).```php
case 'PRODUCT_LIST_NAME':
        $lc_align = '';
        if (isset($_GET['manufacturers_id'])) {
          $lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><span class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ;
        } else {
          $lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 0 ? 'cPath=' . $_GET['cPath'] . '&' : '') . 'products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><span class="listingDescription">' . zen_trunc_string(zen_clean_html (stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
        }
        break;
``` ```php
.listingDescription {
    display: inline;
    }
21 May 2007, 6:37 PM
#8
itchibahn avatar

itchibahn

New Zenner

Join Date:
May 2007
Posts:
6
Plugin Contributions:
0

Re: Product listings without picture all in-line

I tried, and even removed all 'div' tags but it didn't work. Then I removed the 'h3' tag and that did it... Thanks.

What I don't get is even with the $lc_align = 'left' it still centers the items.

21 May 2007, 10:58 PM
#9
itchibahn avatar

itchibahn

New Zenner

Join Date:
May 2007
Posts:
6
Plugin Contributions:
0

Re: Product listings without picture all in-line

I went a head and used the css to aligned the text. But I'm still curious.