Last active
December 17, 2015 22:29
-
-
Save CameronGilroy/5682300 to your computer and use it in GitHub Desktop.
FireSale Sample 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ firesale:products limit="24" category="2" order="created desc" }} | |
{{ if products }} | |
<div id="accordion" class="accordion"> | |
{{ products }} | |
<div class="accordion-group"> | |
<div class="accordion-heading"><a href="#collapse{{ id }}" class="accordion-toggle" data-toggle="collapse" data-parent="#accordion">{{ title }}</a></div> | |
<div id="collapse{{ id }}" class="accordion-body collapse"> | |
<div class="accordion-inner"> | |
<p>{{ description }}</p> | |
<input type="number" id="quanty_{{ id }}" value="1" /> | |
{{ rrp_tax }} | |
{{ church_price_tax }} | |
{{ reseller_price_tax }} | |
<a href="{{ firesale:url route='cart' }}insert/{{ id }}/1" id="cart_{{ id }}" class="basket"><span class="icon"></span>Add to Cart</a> | |
</div> | |
</div> | |
</div> | |
{{ /products }} | |
</div> | |
{{ else }} | |
no products | |
{{ endif }} | |
{{ /firesale:products }} |
Hey @AJSturrock I'm running FireSale 1.2.2-dev & the original version of this code doesn't work & the current version doesn't work either. Any Idea?
It's a strange problem here - I'm completely confused, fully uninstalled FireSale & reinstalled.
Ended up going back to 1.2.0 and removed the {{ if products }}
{{ products }}
sections.
What were the changes between 1.2.2 & 1.2.0?
Hi Cameron,
Jamie has normalised all the plugins to return {{ entries }} rather than {{ products }} etc.. in the dev version.
Thanks
Adam
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This looks good, in reply to your question you can place this in the theme or through the CMS, it's entirely up to you. If your going to be upgrading to the latest version of FireSale at some point (That we're working on) then it'll be useful to know the product plugin has changed slightly. You'll require a loop inside the main plugin tags as follows:
This lets you put conditionals in for if there are any products.