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 / Any way of increasing the font size of prices in side and centre boxes?

Any way of increasing the font size of prices in side and centre boxes?

27 Jan 2011, 10:54 AM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Post #2 by schoolboy

The issue here is that there is no specific DIV ID given over to the price element in these pages.

I would imagine that it is possible to delve into the relevant php files and encase these elements in their own DIV, but I am not the person to ask how to achieve this.

20 years a Zencart User

27 Jan 2011, 5:07 PM
#4
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Post #4 by badarac

dgent:

This site has styling for the prices, any way of looking at the code though?

http://www.pasikonik.co.uk/
A link to the page you are trying to style would be helpful. On the site that you referenced are you speaking about the orange color of the prices that has been styled?

28 Jan 2011, 3:07 PM
#7
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Post #7 by badarac

dgent:

The prices change and are stylized when you make an item discounted (strikethrough'd and made red) so somewhere in a template file there is a DIV for this styling. Anyone know where?
In the .css
.priceinnewproducts {
color: #FF6600;
}

28 Jan 2011, 3:26 PM
#9
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Post #9 by badarac

dgent:

Cheers, but that won't work on its own. It needs a class/div to relate to in the code.
The orange text on the site you provided
http://www.pasikonik.co.uk/ is defined in the css with the statement I provided. What specifically are you trying to do that requires a separate div? Are you doing it on that website? Changing the font definitions in the css provided will only affect the prices in what's new product listings. How much more targeted do you need it?

28 Jan 2011, 3:32 PM
#10
dgent avatar

dgent

Totally Zenned

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

Post #10 by dgent

badarac:

The orange text on the site you provided
http://www.pasikonik.co.uk/ is defined in the css with the statement I provided. What specifically are you trying to do that requires a separate div? Are you doing it on that website? Changing the font definitions in the css provided will only affect the prices in what's new product listings. How much more targeted do you need it?

Yes it is defined on that site, but somewhere in the code for the centre box is a div or a class that corresponds to that definition in the CSS. You can't just put definitions in a CSS file and hope they will change things, they need to be linked.

And no, Im not doing it on that website, I picked that as an example as I quoted above. If I had access to that site for instance, I could simply use the developer tool kit in Admin, search for that definition, and it would find the module/template etc that its called from.

28 Jan 2011, 4:16 PM
#11
badarac avatar

badarac

Totally Zenned

Join Date:
Aug 2009
Location:
Longs, SC
Posts:
635
Plugin Contributions:
0

Post #11 by badarac

dgent:

Yes it is defined on that site, but somewhere in the code for the centre box is a div or a class that corresponds to that definition in the CSS. You can't just put definitions in a CSS file and hope they will change things, they need to be linked.

And no, Im not doing it on that website, I picked that as an example as I quoted above. If I had access to that site for instance, I could simply use the developer tool kit in Admin, search for that definition, and it would find the module/template etc that its called from.
Not enough info to work with for me anyway. On a stock ZC template the price inherits the font characteristics as you described, from the body tag. The color of the text on the site you provided is defined in the css as I described and called on the span tag <span style="font-size: larger;" class="priceinnewproducts">£x.xx</span>. This is in the div id=whatsNew. You are correct that changing the font characteristics in a stock ZC template would require definition of additional css and/or divs in whatever sections you want to target. Without more specific information about what you are trying to do I find it impossible to help. On the main page the prices are displayed in multiple divs. New products, featured products, bestsellers... They are also displayed on product listings and other places throughout the site which would involve different templates. From the info you've provided and without a link to the site I can't tell what you need to change.

28 Jan 2011, 4:45 PM
#12
dgent avatar

dgent

Totally Zenned

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

Post #12 by dgent

Yep, this is why I mentioned that even on a stock template, if you change a price to a 'special' price, there is then individual styling for the price (as it changes to strike through, with the discounted price below it in red etc) so its possible. Shame they didnt add it as a styling as standard, Im sure everyone would use it.

28 Jan 2011, 5:55 PM
#13
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Post #13 by kuroi

By default there is no obvious hook for the normal price in the current version of Zen Cart (I hear a whisper that this will change in the next major upgrade).

If you want to add tags onto which you can hook some styling (as has been done on the site referred to earlier in this thread), then you could try this ...

... includes/functions/functions_prices.php, find this line

          $show_normal_price = $currencies->display_price($display_normal_price, zen_get_tax_rate($product_check->fields['products_tax_class_id']));

and replace it with

          $show_normal_price = '<span class="standardprice">' . $currencies->display_price($display_normal_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</span>';

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

1 Feb 2011, 9:39 AM
#15
dgent avatar

dgent

Totally Zenned

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

Post #15 by dgent

kuroi:

By default there is no obvious hook for the normal price in the current version of Zen Cart (I hear a whisper that this will change in the next major upgrade).

If you want to add tags onto which you can hook some styling (as has been done on the site referred to earlier in this thread), then you could try this ...

... includes/functions/functions_prices.php, find this line

      $show_normal_price = $currencies->display_price($display_normal_price, zen_get_tax_rate($product_check->fields['products_tax_class_id']));
> and replace it with
> ```php
          $show_normal_price = '<span class="standardprice">' . $currencies->display_price($display_normal_price, zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '</span>';

Ah found a problem. Doing that works on the front page, but the issue is it has also put the same styling on the prices on a product page, and all multiple listings (new, special, featured), even though for instance, there was already specific styling for them eg...

#productPrices, #reviewsInfoDefaultPrice {
font: 44px Arial;
color: #a30101;
margin: 0 0 16px 0;
display: block;

This made my product prices nice and large - now the new bit of code you have given me is overriding this...