Forums / Templates, Stylesheets, Page Layout / Making product prices larger in all/new/categories listings

Making product prices larger in all/new/categories listings

Locked

Views: 1,060

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
15 Jun 2010, 8:39 AM
#1
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Making product prices larger in all/new/categories listings

At the moment, the prices on these listings for the products are the same size as the description text - It would look better larger, but I don't think there is a seperate variable in the style sheet to alter it..

Any way of doing it?

15 Jun 2010, 8:37 PM
#2
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Making product prices larger in all/new/categories listings

there are no HTML attribute associated with price for those listing . what you need to do is to add html attribute for the price and then use CSS to style as you need.

i show you how to do this for Product All listing . I assume you know enough about Override . Override tpl_modules_products_all_listing.php
look for code on line 79 and add the change in Red to your code

    $display_products_price = TEXT_PRICE . ' ' .'<span id="PriceAll">'. $products_price .'</span>' . str_repeat('<br clear="all" />', substr(PRODUCT_ALL_LIST_PRICE, 3, 1)) . (zen_get_show_product_switch($products_all->fields[

I added Id to this span, you can remove it if you want
you can do the same with other template files

in your CSS you can use the span id to change font size , etc or you can use parent child relation to do the same .

#PriceAll {
font-weight : bold ;
font-size : 1em ;
}

or if you remove span ID , then you can use this in your stylesheet

.main span {
font-weight: bold;
font-size : 1em ;
}

2 Jul 2010, 1:20 PM
#3
rigel avatar

rigel

New Zenner

Join Date:
Jun 2010
Posts:
48
Plugin Contributions:
0

Re: Making product prices larger in all/new/categories listings

Hi, new to this so forgive any mistakes in protocol.

I have just tried your method and it hasn't made any difference. I have checked the code line you refer to and my line 79 is as follows:

$display_products_price = TEXT_PRICE . ' ' .'<span id="PriceAll">'. $products_price .'</span>' . str_repeat('<br clear="all" />', substr(PRODUCT_ALL_LIST_PRICE, 3, 1)) . (zen_get_show_product_switch($products_all->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($products_all->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : '');

I wasn't sure where to add the class elements in to the css file and so added it at the end under miscellaneous. I would be very grateful if someone can indicated where I might have gone wrong. Thanks.

https://www.plumfashion.co.uk/store
Zen Cart v1.3.9b fresh install

2 Jul 2010, 8:03 PM
#4
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Making product prices larger in all/new/categories listings

Rigel:

Hi, new to this so forgive any mistakes in protocol.

I have just tried your method and it hasn't made any difference. I have checked the code line you refer to and my line 79 is as follows:

$display_products_price = TEXT_PRICE . ' ' .'<span id="PriceAll">'. $products_price .'</span>' . str_repeat('<br clear="all" />', substr(PRODUCT_ALL_LIST_PRICE, 3, 1)) . (zen_get_show_product_switch($products_all->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($products_all->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : '');

I wasn't sure where to add the class elements in to the css file and so added it at the end under miscellaneous. I would be very grateful if someone can indicated where I might have gone wrong. Thanks.

https://www.plumfashion.co.uk/store
Zen Cart v1.3.9b fresh install

i don't see <span> tag in your listing page . are you sure you have made the change to correct file ?

5 Jul 2010, 6:35 PM
#5
rigel avatar

rigel

New Zenner

Join Date:
Jun 2010
Posts:
48
Plugin Contributions:
0

Re: Making product prices larger in all/new/categories listings

Thanks but I wasn't sure where in the css file to add the span tag. Can you suggest where it needs to sit. Thanks.

5 Jul 2010, 8:14 PM
#6
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Making product prices larger in all/new/categories listings

I tend to add them at the end of my CSS .

5 Jul 2010, 8:45 PM
#7
rigel avatar

rigel

New Zenner

Join Date:
Jun 2010
Posts:
48
Plugin Contributions:
0

Re: Making product prices larger in all/new/categories listings

I tried that but it didn't seem to make any difference. This is what I put at the end of the stylesheet:

/inserted following class to enable to style price info separately/
#PriceAll {
font-weight : bold ;
font-size : 1em ;
}

Presumably I have been stupid somewhere?

5 Jul 2010, 9:11 PM
#8
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Making product prices larger in all/new/categories listings

I don't think you have made a change to correct file . as i mentioned before , there are no SPAN tag in your Product All listing page ..
no span / class , no styling ..

5 Jul 2010, 9:39 PM
#9
rigel avatar

rigel

New Zenner

Join Date:
Jun 2010
Posts:
48
Plugin Contributions:
0

Re: Making product prices larger in all/new/categories listings

Thank you - I must have been tired when I did this - I had made the change but not uploaded it. Doh!:oops:

5 Jul 2010, 9:41 PM
#10
rigel avatar

rigel

New Zenner

Join Date:
Jun 2010
Posts:
48
Plugin Contributions:
0

Re: Making product prices larger in all/new/categories listings

Presumably you have to apply the same code to other mod pages for the same effect?

5 Jul 2010, 10:05 PM
#11
rigel avatar

rigel

New Zenner

Join Date:
Jun 2010
Posts:
48
Plugin Contributions:
0

Re: Making product prices larger in all/new/categories listings

I found I have to overwrite the default files - it doesn't work when you put them in an override directory. Surely this isn't right?