WPPizza – A Restaurant Plugin for WordPress › Support › General Support › Price Tier Classes
- AuthorPosts
- 25 June, 2015 at 3:12 pm #10808
is there any way to get specific classes for different price tiers?
for example: i do not want “reg” to display under prices, but i do want “per dozen” to show (both are the single prices), so i dont want to select the option to only show the price tiers on items with more than one price..
Thank you
25 June, 2015 at 3:15 pm #10820hmm, you lost me here.
just rename “reg” to “per dozen” , no ?
25 June, 2015 at 5:38 pm #10826Some items are “per dozen” while some items just have a price (not by the dozen). i dont want “reg” to show, and if i leave the label for “reg” (regular) blank the HTML is still there, leaving a space where it would have been.
this is the example: http://whitestreetcafe.fusedigitalmarketing.com/menu/catering/
i was just wondering if there was a way to add a CSS class to each different price tier so that i could target “reg” to display:none;
🙂 thank you
also i apologize i sent a contact message before posting in the board because i couldnt figure out how to post. please ignore the message i sent 😀
25 June, 2015 at 6:45 pm #10829>i was just wondering if there was a way to add a CSS class to each different price tier ….
not for you unless
a) you wanted to use js/jQuery to add the missing classes for example (i.e an item will have an id of wppizza-38-4-2 , where 4 is the price tier id and 2 the size that goes with the sizes set – zero indexed)
or
b) you could just edit the template you are using and add the classes (should be reasonably obvious how the loop is set up)
however, it’s also easy enough for me to add in the next update for all templates. in fact, consider it done, but that update is a couple of weeks or so yet until it’ll be available
25 June, 2015 at 7:36 pm #10830OH i see now that the IDs are different between price tiers. I might try and target via jquery, thank you!
and it will be awesome to see this feature in the future!
25 June, 2015 at 10:31 pm #10837this is what i ended up using
<script type="text/javascript" charset="utf-8"> $(window).load(function() { if ($(".wppizza-article-price:only-child .wppizza-article-price-lbl:contains('Reg')").length) { $(".wppizza-article-price:only-child .wppizza-article-price-lbl:contains('Reg')").hide(); } }); </script>
- AuthorPosts
- The topic ‘Price Tier Classes’ is closed to new replies.