Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Price doesn't line up with product title

Price doesn't line up with product title

Views: 986

Results 1 to 7 of 7
8 Mar 2011, 12:14 AM
#1
reach100 avatar

reach100

New Zenner

Join Date:
Aug 2006
Posts:
11
Plugin Contributions:
0

Price doesn't line up with product title

HI there,
I am using an installation of v1.3.9h.
On my product listing in each categories, the price doesn't line up horizontally with the product title.
Its hard to easily tell what the price is at a glance.
I want to make these line up but I cant figure it out.
http://www.smartcontactless.com/index.php?main_page=index&cPath=1

Any help please?
Thanks,
Rich V

8 Mar 2011, 1:29 AM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Price doesn't line up with product title

In your stylesheet, find

	tr.productListing-odd {
		border:1px red solid;
	margin-bottom:100px	
	}
	tr.productListing-even {
			border:1px blue solid;
	margin-bottom:10px	
	}
```and replace it with```
tr.productListing-odd, tr.productListing-even {
	vertical-align: top;
	}
h3.itemTitle {margin-top: 0;}
8 Mar 2011, 4:03 AM
#3
skipjensen avatar

skipjensen

New Zenner

Join Date:
Jun 2010
Location:
Tacoma, Washington
Posts:
27
Plugin Contributions:
0

Re: Price doesn't line up with product title

I am working on my first Zen Cart in v1.39h and I have a similar but different problem. I want to put the price inline with the add to cart box, but for the life of me I can't find where the <br/> tags are being generated. I have searched every line of code I could think of, but not figured it out. Any clues would be welcome.
Attachment #8962

Attachment #8963
Thank you very much

8 Mar 2011, 4:39 AM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Price doesn't line up with product title

I can't find where the <br/> tags are being generated. I have searched every line of code I could think ofWhat code did you search? The HTML view source? That doesn't tell where the <br /> tags are generated. The product listing is built in /includes/modules/your_template/product_listing.php. The price display in that is built by a very complex set of functions and subfiles.

8 Mar 2011, 4:49 AM
#5
skipjensen avatar

skipjensen

New Zenner

Join Date:
Jun 2010
Location:
Tacoma, Washington
Posts:
27
Plugin Contributions:
0

Re: Price doesn't line up with product title

I included the source just to show what I was searching for. I searched through pretty much all of the PHP files that had anything to do with the product listings, and all of the pages I could find called in them. I can live (reluctantly) with the way it is, but I would very much like to make it right if it is possible.

8 Mar 2011, 5:02 AM
#6
gjh42 avatar

gjh42

Black Belt

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

Re: Price doesn't line up with product title

In product_listing.php:```
case 'PRODUCT_LIST_PRICE':
$lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
$lc_align = 'right';
$lc_text = $lc_price;

    // more info in place of buy now
    $lc_button = '';

...

      } else {

// qty box with add to cart button
if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) {
$lc_button= zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($listing->fields['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>';
} else {
$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>';
}
}
}
$the_button = $lc_button;
$products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . ( ($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ? zen_get_generated_category_path_rev($_GET['filter_id']) : $_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id'])) . '&products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
$lc_text .= '<br />' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']);
$lc_text .= '<br />' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : '');

    break;
8 Mar 2011, 5:12 AM
#7
skipjensen avatar

skipjensen

New Zenner

Join Date:
Jun 2010
Location:
Tacoma, Washington
Posts:
27
Plugin Contributions:
0

Re: Price doesn't line up with product title

Perfect ! I knew I had to simply be missing it, my eyes were getting blurry! Thank you very much for breaking this logjam for me. I appreciate the help.