How do I display products count in bigcommerce - count

I want to display product count in my bigcommerce store, I am using Cornerstone theme
I have tried a few codes I had found in their support forums but they didn't work
{{category.total_products}}
{{category.count}}
I want it be written like this Showing 1 - 17 of 200 results

This code should get you what you are looking for (assuming there is pagination):
Showing {{pagination.category.start}} - {{pagination.category.end}} of {{category.total_products}} results

Related

Wordpress APIs how to list all posts in category using rest route

I know of wp-json, but I cannot use it. I need to use ?rest_route
While this returns first 10 posts in any category
?rest_route=/wp/v2/posts
I would like to display specific category i.e 60
None of the combinations I tried work
ie. ?rest_route=/wp/v2/posts/?categories=60
Any ideas?
Try with & instead of ? like this - http://www.example.com/?rest_route=/wp/v2/posts/&categories=60.
You can also have multiple categories separated by comma like http://www.example.com/?rest_route=/wp/v2/posts/&categories=60,61.

WooCommerce Custom Attribute being indexed but shows no results

We're running WordPress 4.7, WooCommerce 2.6.9 and the Algolia 1.6.0.
We've got 7 indexes setup:
Searchable posts [searchable_posts]
Posts [posts_post]
Pages [posts_page]
Products [posts_product]
Brands [terms_product_brand]
Product Categories [terms_product_cat]
Full Code [terms_pa_full-code]
The first 6 all return results as expected but Full Code [terms_pa_full-code], although indexed returns no results. However, there should be several 100 if not 1000 as if a product has a Full Code it is set to be 'Visible on the product page'.
Because it's showing as something that can be indexed I'm assuming we don't need to do any custom coding so not sure why it wouldn't display any results?
Has anyone experienced anything similar
The terms_pa_full-code does only contain some metadata, not the values which are them correctly pushed as part of the product data if everything goes well.
You can then use values of that taxonomy as a facet to display a list of available options given a user search query.
You can also register for the Algolia plugin for WooCommerce here: https://community.algolia.com/wordpress/#woocommerce and get this setup for you in a few clicks.

Custom loop for getting products flagged as new

I was looking for a way to build a custom loop to get the products flagged with the "new" label.
I could use the sort from the insert time, but that would always include a certain number of products, my goal here is to get those products that conform to the WooCommerce setting that says the product is considered new for a given number of days.
i have a free plugin - WooCommerce Product Badge, it has your requested feature to display "New" label with certain days defined.

WooCommerce Variable Products - Can't choose products with '0' as an attribute - Error 'please choose all product options'

I've been developing an e-commerce store for a client using WooCommerce and I've come across a very strange issue. All of my products are variable products and I have set them up like this:
Variation 1 - Weight (0,0.5,1.0,1.5,2.0...5.0 in Kgs)
Variation 2 - Units (0,1,2,3,4,5...10)
Variation 3 - Cut Type (Ground, Slices, Whole etc)
I set the variations in such a way that a customer has to choose either Variation 1 or Variation 2 (weight or in units) and Variation 3. If they choose to purchase a product by Weight (Weight is great than '0') the only choice in 'Units' is 0 and vice versa. This worked for me for a day or two and stopped working, I keep getting an error 'please select product options'..
I then changed the '0' value to 'Zero' and the combination works, has anyone come across this problem before?
I tried to switch to the default theme of WP and shut off all plugins except WooCommerce but nothing works.
Any ideas?
Link to a product page - http://www.best-foods-for-fat-burning.com/wordpress/?product=%D7%90%D7%A1%D7%90%D7%93%D7%95
Thanks,
Ofer
This is a bug. I've tested it on several different installation. Using the latest versions of Woocommerce 2.0.20 and WordPress 3.8.1. The best thing to do is add additional info like 0-Kgs to your attribute slug and that solves the problem until woothemes fixes this bug.

Linklist with most recent blog at top?

I would like to have a simple linklist of blogs with their latest entry, author, blog name, and date be listed in order of latest update. So, kinda like what Blogger has on their sidebars -- whenever they have linklists, it auto-reorders based on which blog has been updated recently (though it usually doesn't have summaries, just the title of the site).
What I'd like to do is plug in multiple RSS feeds into one place that just checks the latest entry in each feed and then reorders them
The magpie plugin or RSS plugin in EE currently only allows you plug in ONE feed. It will show the latest entry per blog if I repeat the magpie tags several times (one per blog), but that doesn't help with re-ordering, and also it's a bit messy.
Help? Thoughts?
UPDATE: I want to make sure that each blog is still featured even if the last post they've done is a year ago. A blog like that will be the last in the link list for example, while an entry/site updated this hour will be at the top. So for example, if I limit the linklist to 5, it's not going to show the 5 most recent entries, period, from just one site if that one site updated 5 times in one hour. It will show 1 recent entry per site.
Sample behaviour: like the Flickr Friends Page sorted by date and 1 photo per person. http://www.flickr.com/photos/friends/ Except this time, just titles of blog posts and the site they belong to, author, etc.
There is an RSS Aggregator EE Add-on available which combines feeds for you
http://devot-ee.com/add-ons/rss-aggregator
{exp:rss_aggregator:items feed_ids="6|7" limit="10" order_by="pub_date" order="desc" pub_date_format="m-d-Y g:ia" cache_timeout="60"}
<li>
{title}<br />
<small>{pub_date} - From {channel_title}</small><br />
</li>
{/exp:rss_aggregator:items}
You could do this using Yahoo! Pipes. In fact, I created one a bit ago: http://pipes.yahoo.com/pipes/pipe.info?_id=82e8b23b84bf2d6c3014f50c0f6b2f1d
Just call it with a comma-delimited list of RSS feeds and voila! It gives you the latest entry for all the RSS feeds, sorted in reverse chronological order.
Example:
http://pipes.yahoo.com/pipes/pipe.run?_id=82e8b23b84bf2d6c3014f50c0f6b2f1d&_render=json&feedurls=appleinsider.com.feedsportal.com/c/33975/f/616168/index.rss,feeds.foxnews.com/foxnews/latest?format=xml
So now that you have the feed's URL, you can pull out the individual entries using the REST module from Phil Sturgeon.
For those interested, here's how the pipe is setup:
Fairly sure Stash could handle this via set_list and get_list. I haven't tested this but perhaps something like:
{exp:channel:entries channel="feed_urls"}
{exp:magpie url="{url}" limit="1"}
{items}
{exp:stash:append_list name="feed_items"}
{stash:title}{title}{/stash:title}
{stash:pubdate}{pubdate}{/stash:pubdate}
{/exp:stash:append_list}
{/items}
{/exp:magpie}
{/exp:channel:entries}
{exp:stash:get_list name="feed_items" orderby="pubdate"}
<h3>{title}</h3>
<p>{pubdate}</p>
{/exp:stash:get_list}
https://github.com/croxton/Stash
What about using an entries loop with multiple channels, pulling lastest from that and stashing it. Then get the stash in the RSS feed? I think that would work.
You could probably do it with Datagrab because it lets you import XML feeds into your own site and then you'd be able to order them as EE channel entries.

Resources