Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Couple of changes in Product listing page .. any1 help me???

Couple of changes in Product listing page .. any1 help me???

Locked
This thread is locked. New replies are disabled.
12 Sep 2007, 7:11 AM
#1
lastpirate007 avatar

lastpirate007

Zen Follower

Join Date:
Jul 2007
Posts:
137
Plugin Contributions:
0

Post #1 by lastpirate007

hi
i have small changes in product listing page
here is the screen shot

any suggestion and help will be appreciated..

12 Sep 2007, 9:24 AM
#2
gjh42 avatar

gjh42

Black Belt

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

Post #2 by gjh42

For the "Value $...", you need to enable HTML in product listing pages. Then you can add a <br /> to make the Value start on a new line.

To move the price below the add to cart button, you will need to edit /includes/templates/your_template/product_listing.php. In the "case 'PRODUCT_LIST_PRICE':" near the middle of the file, you can move the price output down.
Find```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

Change
$lc_text =  $lc_price; 
to
$lc_text =  '';
(two single quotes '' ), and add "$lc_text .=  $lc_price . '<br />';" farther down:
```php
        case 'PRODUCT_LIST_PRICE':
        $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';
        $lc_align = 'right';
        $lc_text =  ''; /*move price down*/
        // more info in place of buy now

......................

        }
        $the_button = $lc_button;
        $products_link = '<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']) . '">' . 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 />' : '') : '');
        $lc_text .=  $lc_price . '<br />'; /*add this line to show price below button*/
        break;
        case 'PRODUCT_LIST_QUANTITY':
12 Sep 2007, 11:07 AM
#3
lastpirate007 avatar

lastpirate007

Zen Follower

Join Date:
Jul 2007
Posts:
137
Plugin Contributions:
0

Post #3 by lastpirate007

thanks a lot glenn

but i need price should be bold ..so wat will i do ????

12 Sep 2007, 11:13 AM
#4
lastpirate007 avatar

lastpirate007

Zen Follower

Join Date:
Jul 2007
Posts:
137
Plugin Contributions:
0

Post #4 by lastpirate007

lastpirate007:

thanks a lot glenn

but i need price should be bold ..so wat will i do ????

thanks glenn.
i did it.....
thanks a lot

12 Sep 2007, 3:35 PM
#5
gjh42 avatar

gjh42

Black Belt

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

Post #5 by gjh42

You can just put <strong> and </strong> tags around the $lc_price, if you only want the text bold and no other alterations to it.```php
$lc_text .= '<strong>' . $lc_price . '</strong><br />'; /add this line to show price below button/
break;
case 'PRODUCT_LIST_QUANTITY':

This is probably what you did.


If you want to fully control the price text, you can put a class on the price text and style it in your stylesheet. Modify the line you just added to this:
```php
        $lc_text .=  '<span class="productListPrice">' . $lc_price . '</span><br />'; /*add this line to show price below button*/
        break;
        case 'PRODUCT_LIST_QUANTITY':

and add to your stylesheet:```
.productListPrice {
font-weight: bold;
font-size: 1.2em; /adjust or delete properties as desired/
font-color: #dd3300;
}