-
AuthorPosts
-
July 8, 2015 at 4:15 pm #470365
Dear Kriesi,
we are using a plugin to display in table rows the prices of the variations “Woocommerce Variations Table – Grid”, so now is useless to show the price just under the product name. I hide it with the help of Firebug with:
#top .price, div .stock { display: none; }
and I set price style like this:
span.amount {
font-size: 20px !important;
text-align: right;
display: block;
}and it works..
The problem is that in the footer there is a widget to display product on sale that use the same span class=”amount”, and may be that class is used also in other places.
How can I reference just the price on top of product page leaving others instances untouched?Thank you Mauro
July 8, 2015 at 4:36 pm #470376A second problem is that there are two line brakes to display discounted products
<span class=”amount”>€ 177.53</span><ins><span class=”amount”>€ 163.65</span></ins>Please see screenshots
http://www.profumo.it/footer.png
and
July 8, 2015 at 5:33 pm #470423Also if I use
#top .price, div .stock { display: none; }prices disappear from product category pages.
(I have canceled from Quick css)
Please see http://goo.gl/LIcmjq
July 9, 2015 at 7:31 am #470639Hi!
Thank you for using Enfold.
You can use this instead:
.single-product .template-shop span.amount { font-size: 20px !important; text-align: right; display: block; }
It will not affect the widgets in the footer area.
Cheers!
IsmaelJuly 9, 2015 at 2:05 pm #470854Thank you Ismail,
can you please look at my other two questions?
1) now is useless to show the price range just under the product name. If I hide it with the help of Firebug with:
#top .price, div .stock { display: none; }
prices disappear also from product category pages.
2) there are two strange line brakes to display discounted products
<span class=”amount”>€ 177.53</span> <ins><span class=”amount”>€ 163.65</span></ins>
Please see screenshots
http://www.profumo.it/footer.png
and
http://www.profumo.it/prices.png
Thank you Mauro
July 9, 2015 at 2:43 pm #470903Hi!
In your header.php file, use the following:
<?php if ( is_product('') ) { ?> <style> #top .price, div .stock { display: none; } </style> <?php } else {} ?>
That will load the code only into your product and nowhere else! ;-)
Cheers!
BasilisJuly 9, 2015 at 5:28 pm #471020Thank you Basilis
I have copied header.php in our child theme and I have placed the code before<?php do_action(‘ava_after_main_container’); ?>
and it works. Where is best to put it?
What will happen if there will be major modification in future updates of header.php?
Would you mind in the future to add a dedicated class to this div
<div itemprop=”offers” itemscope=”” itemtype=”http://schema.org/Offer”>
so that will be possible to hide it without touching headers.php?Can please answer also to
2) there are two strange line brakes to display discounted products<span class=”amount”>€ 177.53</span> <ins><span class=”amount”>€ 163.65</span></ins>
Please see screenshots
http://www.profumo.it/footer.png
and
http://www.profumo.it/prices.png
How can I have discounted price and regular price all in the same line?
Thank you Mauro
July 10, 2015 at 12:42 pm #471412Hi!
I think you can out the code into the bottom of your new header.php. As you are using it inside a child theme you are safe when future updates are coming.
You can make a feature request for Kriesi here about your dedicated class: kriesi.at/support/enfold-feature-requests/2.) Use this code:
span.amount { display: inherit; }
Regards,
AndyJuly 10, 2015 at 5:49 pm #471643Dear Andy ,
if I use display: inherit; than it doesn’t work anymore the right alignment declared with text-align: right;
Thank you Mauro
July 10, 2015 at 6:06 pm #471650ok I fix it with
td.pricecol { text-align: right; }July 10, 2015 at 6:10 pm #471653Hi!
Great you have solved your issues!
We will be here for anything else needed.Best regards,
Basilis -
AuthorPosts
- The topic ‘Product price style’ is closed to new replies.